From c94689e9a972e431de79965d223af5c0c416f5f2 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 12 Sep 2018 09:21:23 +0200 Subject: [PATCH 1/2] FIX remain to pay for credit note was wrong on invoice list --- htdocs/compta/facture/list.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 859889966eb..1fbdfcf380a 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1014,6 +1014,9 @@ if ($resql) $facturestatic->ref=$obj->ref; $facturestatic->type=$obj->type; $facturestatic->statut=$obj->fk_statut; + $facturestatic->total_ttc=$obj->total_ttc; + $facturestatic->paye=$obj->paye; + $facturestatic->fk_soc=$obj->fk_soc; $facturestatic->date_lim_reglement=$db->jdate($obj->datelimite); $facturestatic->note_public=$obj->note_public; $facturestatic->note_private=$obj->note_private; @@ -1022,7 +1025,13 @@ if ($resql) $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); $totaldeposits = $facturestatic->getSumDepositsUsed(); $totalpay = $paiement + $totalcreditnotes + $totaldeposits; - $remaintopay = $obj->total_ttc - $totalpay; + $remaintopay = $facturestatic->total_ttc - $totalpay; + if($facturestatic->type == Facture::TYPE_CREDIT_NOTE && $obj->paye == 1) { + $discount = new DiscountAbsolute($db); + $remaincreditnote = $discount->getAvailableDiscounts($obj->fk_soc, '', 'rc.fk_facture_source='.$facturestatic->id); + $remaintopay = -$remaincreditnote; + $totalpay = $facturestatic->total_ttc - $remaintopay; + } print ''; if (! empty($arrayfields['f.facnumber']['checked'])) From d62118dca83ca6f57758deabf3cbb82c759cddbc Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 19 Sep 2018 14:53:56 +0200 Subject: [PATCH 2/2] FIX : langs fr --- htdocs/langs/fr_FR/agenda.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index dbbf3513041..5efd3959e6e 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -108,7 +108,7 @@ MyAvailability=Ma disponibilité ActionType=Type événement DateActionBegin=Date début événément CloneAction=Cloner l'événement -ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner cette facture %s ? +ConfirmCloneEvent=Êtes-vous sûr de vouloir cloner l'événement %s ? RepeatEvent=Répétez événement EveryWeek=Chaque semaine EveryMonth=Chaque mois