From ae7f49b5d81d0cd44528738e9ef129bcc600ea59 Mon Sep 17 00:00:00 2001 From: Ferran Marcet Date: Wed, 21 Dec 2016 18:40:05 +0100 Subject: [PATCH 1/2] FIX: Deposits and credit notes weren't added in the received and pending columns --- htdocs/compta/facture/list.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index d9e5ae8ce23..8d0cc61d5d6 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1216,6 +1216,12 @@ if ($resql) $facturestatic->type=$obj->type; $facturestatic->statut=$obj->fk_statut; $facturestatic->date_lim_reglement=$db->jdate($obj->datelimite); + + $paiement = $facturestatic->getSommePaiement(); + $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); + $totaldeposits = $facturestatic->getSumDepositsUsed(); + $totalpay = $paiement + $totalcreditnotes + $totaldeposits; + $remaintopay = $obj->total_ttc - $totalpay; print ''; if (! empty($arrayfields['f.facnumber']['checked'])) @@ -1223,9 +1229,7 @@ if ($resql) print ''; $notetoshow=dol_string_nohtmltag(($user->societe_id>0?$obj->note_public:$obj->note_private),1); - $paiement = $facturestatic->getSommePaiement(); - $remaintopay = $obj->total_ttc - $paiement; - + print ''; print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalamfield']=$totalarray['nbfield']; - $totalarray['totalam'] += $paiement; + $totalarray['totalam'] += $totalpay; } if (! empty($arrayfields['rtp']['checked'])) From d53a238b49fd0425a8fae52f310f0602a567b61e Mon Sep 17 00:00:00 2001 From: aspangaro Date: Thu, 22 Dec 2016 06:12:42 +0100 Subject: [PATCH 2/2] Fix: Accountancy - Problem on quadratus export --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 268b5fa69c2..524326e320c 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -357,7 +357,7 @@ class AccountancyExport $Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20); $Tab['sens'] = $data->sens; // C or D $Tab['signe_montant'] = '+'; - $Tab['montant'] = str_pad(abs($data->montant) * 100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount + $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount $Tab['contrepartie'] = str_repeat(' ', 8); if (! empty($data->date_echeance)) $Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE);
'; @@ -1372,10 +1376,10 @@ if ($resql) if (! empty($arrayfields['dynamount_payed']['checked'])) { - print ''.(! empty($paiement)?price($paiement,0,$langs):' ').''.(! empty($totalpay)?price($totalpay,0,$langs):' ').'