Overview
Comment:Ajout carte / chèque à encaisser pour les recettes dans la modif d'opération
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 9c9687266d3c08d4c73ebdb2e446f801ef41f21b
User & Date: bohwaz on 2017-10-16 23:11:32
Other Links: branch diff | manifest | tags
Context
2017-10-17
00:10
Correction appel méthode erroné check-in: 64816bfed3 user: bohwaz tags: dev
2017-10-16
23:11
Ajout carte / chèque à encaisser pour les recettes dans la modif d'opération check-in: 9c9687266d user: bohwaz tags: dev
23:04
Ajout liens vers comptes d'encaissement check-in: d3c27b7bab user: bohwaz tags: dev
Changes

Modified src/templates/admin/compta/operations/modifier.tpl from [f67c5ea98b] to [fd3771f52b].

36
37
38
39
40
41
42




43
44
45
46
47
48
49
            <dd class="f_cheque"><input type="text" name="numero_cheque" id="f_numero_cheque" value="{form_field name=numero_cheque data=$operation}" /></dd>
            <dt class="f_banque"><label for="f_banque">Compte bancaire</label></dt>
            <dd class="f_banque">
                <select name="banque" id="f_banque">
                {foreach from=$comptes_bancaires item="compte"}
                    <option value="{$compte.id}"{if ($type == Garradin\Compta\Categories::DEPENSES && $compte.id == $operation.compte_credit) || $compte.id == $operation.compte_debit} selected="selected"{/if}>{$compte.libelle} - {$compte.banque}</option>
                {/foreach}




                </select>
            </dd>
{/if}

            <dt><label for="f_numero_piece">Numéro de pièce comptable</label></dt>
            <dd><input type="text" name="numero_piece" id="f_numero_piece" value="{form_field name=numero_piece data=$operation}" /></dd>
            <dt><label for="f_remarques">Remarques</label></dt>







>
>
>
>







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
            <dd class="f_cheque"><input type="text" name="numero_cheque" id="f_numero_cheque" value="{form_field name=numero_cheque data=$operation}" /></dd>
            <dt class="f_banque"><label for="f_banque">Compte bancaire</label></dt>
            <dd class="f_banque">
                <select name="banque" id="f_banque">
                {foreach from=$comptes_bancaires item="compte"}
                    <option value="{$compte.id}"{if ($type == Garradin\Compta\Categories::DEPENSES && $compte.id == $operation.compte_credit) || $compte.id == $operation.compte_debit} selected="selected"{/if}>{$compte.libelle} - {$compte.banque}</option>
                {/foreach}
                {if ($type == Garradin\Compta\Categories::RECETTES)}
                    <option value="{$id_cheque_a_encaisser}"{form_field name="banque" selected=$id_cheque_a_encaisser default=$operation.compte_debit}>Chèques à encaisser</option>
                    <option value="{$id_carte_a_encaisser}"{form_field name="banque" selected=$id_carte_a_encaisser default=$operation.compte_debit}>Paiement CB à encaisser</option>
                {/if}
                </select>
            </dd>
{/if}

            <dt><label for="f_numero_piece">Numéro de pièce comptable</label></dt>
            <dd><input type="text" name="numero_piece" id="f_numero_piece" value="{form_field name=numero_piece data=$operation}" /></dd>
            <dt><label for="f_remarques">Remarques</label></dt>

Modified src/www/admin/compta/operations/modifier.php from [a97e3dd3ad] to [7c8e198965].

81
82
83
84
85
86
87
88


89
90
91
92
93
94
95
                else
                {
                    if (!trim(f('banque')))
                    {
                        throw new UserException('Le compte bancaire choisi est invalide.');
                    }

                    if (!array_key_exists(f('banque'), $banques->getList()))


                    {
                        throw new UserException('Le compte bancaire choisi n\'existe pas.');
                    }

                    $a = f('banque');
                    $b = $cat->compte;
                }







|
>
>







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
                else
                {
                    if (!trim(f('banque')))
                    {
                        throw new UserException('Le compte bancaire choisi est invalide.');
                    }

                    if (!array_key_exists(f('banque'), $banques->getList())
                        && f('banque') != Compta\Comptes::CHEQUE_A_ENCAISSER
                        && f('banque') != Compta\Comptes::CARTE_A_ENCAISSER)
                    {
                        throw new UserException('Le compte bancaire choisi n\'existe pas.');
                    }

                    $a = f('banque');
                    $b = $cat->compte;
                }