Commit de2c4b9f4e471f0dce80877aae1deae8e8c6bd1c

Authored by Darkjeff
1 parent 6fb0918a
Exists in 3.5 and in 1 other branch 3.6

bug selection compte ventil client

Showing 1 changed file with 32 additions and 1 deletions   Show diff stats
accountingex/customer/liste.php
... ... @@ -96,6 +96,36 @@ if ($action == 'ventil') {
96 96 print '<div><font color="red">' . $langs->trans("EndProcessing") . '</font></div>';
97 97 }
98 98  
  99 +/*
  100 + * Liste des comptes
  101 + */
  102 +
  103 +$sqlCompte = "SELECT a.rowid, a.account_number, a.label, a.fk_pcg_version";
  104 +$sqlCompte .= " , s.rowid, s.pcg_version";
  105 +$sqlCompte .= " FROM ".MAIN_DB_PREFIX."accountingaccount as a, ".MAIN_DB_PREFIX."accounting_system as s";
  106 +$sqlCompte .= " WHERE a.fk_pcg_version = s.pcg_version AND s.rowid=".$conf->global->CHARTOFACCOUNTS;
  107 +$sqlCompte .= " AND a.active = '1'";
  108 +$sqlCompte .= " ORDER BY a.account_number ASC";
  109 +
  110 +$resultCompte = $db->query($sqlCompte);
  111 +$cgs = array();
  112 +$cgn = array();
  113 +if ($resultCompte)
  114 +{
  115 + $numCompte = $db->num_rows($resultCompte);
  116 + $iCompte = 0;
  117 +
  118 + while ($iCompte < $numCompte)
  119 + {
  120 + $rowCompte = $db->fetch_row($resultCompte);
  121 + $cgs[$rowCompte[0]] = $rowCompte[1] . ' ' . $rowCompte[2];
  122 + $cgn[$rowCompte[1]] = $rowCompte[0];
  123 + $iCompte++;
  124 + }
  125 +}
  126 +
  127 +
  128 +
99 129 /*
100 130 * Customer Invoice lines
101 131 */
... ... @@ -223,7 +253,8 @@ if ($result) {
223 253  
224 254 // Colonne choix du compte
225 255 print '<td align="center">';
226   - print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1);
  256 + //print $formventilation->select_account($objp->aarowid, 'codeventil[]', 1);
  257 + print $form->selectarray("codeventil[]",$cgs, $cgn[$objp->code_sell]);
227 258 print '</td>';
228 259  
229 260 // Colonne choix ligne a ventiler
... ...