Overview
Comment:Déplacement de la vérification du moyen de paiement
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 6c590e5bb9201e667dbb681ffe76637a73bc46c1
User & Date: bohwaz on 2014-02-06 17:25:41
Other Links: manifest | tags
Context
2014-02-06
17:38
détection de fallback plus simple et rapide et fonctionnant avec chrome, pour input type="date" check-in: 8e270b999e user: bohwaz tags: trunk
17:25
Déplacement de la vérification du moyen de paiement check-in: 6c590e5bb9 user: bohwaz tags: trunk
2014-02-03
17:32
suppression de paiement membre check-in: 7c6bc65121 user: bohwaz tags: trunk
Changes

Modified src/include/class.compta_journal.php from [2133db4f09] to [14ac19bca2].

190
191
192
193
194
195
196






197
198
199
200
201
202
203
        {
            $data['moyen_paiement'] = strtoupper($data['moyen_paiement']);

            if ($data['moyen_paiement'] != 'CH')
            {
                $data['numero_cheque'] = null;
            }






        }

        $data['montant'] = str_replace(',', '.', $data['montant']);
        $data['montant'] = (float)$data['montant'];

        if ($data['montant'] <= 0)
        {







>
>
>
>
>
>







190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
        {
            $data['moyen_paiement'] = strtoupper($data['moyen_paiement']);

            if ($data['moyen_paiement'] != 'CH')
            {
                $data['numero_cheque'] = null;
            }

            if (!$db->simpleQuerySingle('SELECT 1 FROM compta_moyens_paiement WHERE code = ? LIMIT 1;',
                false, $data['moyen_paiement']))
            {
                throw new UserException('Moyen de paiement invalide.');
            }
        }

        $data['montant'] = str_replace(',', '.', $data['montant']);
        $data['montant'] = (float)$data['montant'];

        if ($data['montant'] <= 0)
        {

Modified src/www/admin/compta/operations/saisir.php from [d4241581d2] to [82c0973e8e].

79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
                        (utils::post('compte') != 4010 && utils::post('compte') != 4110))
                    {
                        throw new UserException('Type de dette invalide.');
                    }
                }
                else
                {
                    if (!array_key_exists(utils::post('moyen_paiement'), $cats->listMoyensPaiement()))
                    {
                        throw new UserException('Moyen de paiement invalide.');
                    }

                    if (utils::post('moyen_paiement') == 'ES')
                    {
                        $a = Compta_Comptes::CAISSE;
                        $b = $cat['compte'];
                    }
                    else
                    {







<
<
<
<
<







79
80
81
82
83
84
85





86
87
88
89
90
91
92
                        (utils::post('compte') != 4010 && utils::post('compte') != 4110))
                    {
                        throw new UserException('Type de dette invalide.');
                    }
                }
                else
                {





                    if (utils::post('moyen_paiement') == 'ES')
                    {
                        $a = Compta_Comptes::CAISSE;
                        $b = $cat['compte'];
                    }
                    else
                    {