Commit fa03786ac0b144ceffe4a7ccd94365019c01cce4
1 parent
de2c4b9f
Exists in
3.5
and in
1 other branch
bug selection compte ventil fournisseur
Showing
1 changed file
with
35 additions
and
1 deletions
Show diff stats
accountingex/supplier/liste.php
... | ... | @@ -98,6 +98,39 @@ if ($action == 'ventil') { |
98 | 98 | print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>'; |
99 | 99 | } |
100 | 100 | |
101 | +/* | |
102 | + * Liste des comptes | |
103 | + */ | |
104 | + | |
105 | +$sqlCompte = "SELECT a.rowid, a.account_number, a.label, a.fk_pcg_version"; | |
106 | +$sqlCompte .= " , s.rowid, s.pcg_version"; | |
107 | +$sqlCompte .= " FROM ".MAIN_DB_PREFIX."accountingaccount as a, ".MAIN_DB_PREFIX."accounting_system as s"; | |
108 | +$sqlCompte .= " WHERE a.fk_pcg_version = s.pcg_version AND s.rowid=".$conf->global->CHARTOFACCOUNTS; | |
109 | +$sqlCompte .= " AND a.active = '1'"; | |
110 | +$sqlCompte .= " ORDER BY a.account_number ASC"; | |
111 | + | |
112 | +$resultCompte = $db->query($sqlCompte); | |
113 | +$cgs = array(); | |
114 | +$cgn = array(); | |
115 | +if ($resultCompte) | |
116 | +{ | |
117 | + $numCompte = $db->num_rows($resultCompte); | |
118 | + $iCompte = 0; | |
119 | + | |
120 | + while ($iCompte < $numCompte) | |
121 | + { | |
122 | + $rowCompte = $db->fetch_row($resultCompte); | |
123 | + $cgs[$rowCompte[0]] = $rowCompte[1] . ' ' . $rowCompte[2]; | |
124 | + $cgn[$rowCompte[1]] = $rowCompte[0]; | |
125 | + $iCompte++; | |
126 | + } | |
127 | +} | |
128 | + | |
129 | + | |
130 | + | |
131 | + | |
132 | + | |
133 | + | |
101 | 134 | /* |
102 | 135 | * Supplier Invoice Lines |
103 | 136 | * |
... | ... | @@ -204,7 +237,8 @@ if ($result) { |
204 | 237 | |
205 | 238 | // Colonne choix du compte |
206 | 239 | print '<td align="center">'; |
207 | - print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1); | |
240 | + //print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1); | |
241 | + print $form->selectarray("codeventil[]",$cgs, $cgn[$objp->code_buy]); | |
208 | 242 | print '</td>'; |
209 | 243 | // Colonne choix ligne a ventiler |
210 | 244 | print '<td align="center">'; | ... | ... |