diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index dbbdf5fa8b9..139fe355d3d 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -876,7 +876,8 @@ if ($resql) print "\n"; $projectstatic=new Project($db); - + $discount = new DiscountAbsolute($db); + if ($num > 0) { $i=0; @@ -890,6 +891,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; @@ -909,7 +913,12 @@ 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) { + $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'])) diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 4fa8438eb42..897b5e3be25 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -1766,6 +1766,7 @@ MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculcation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') +NothingToSetup=There is no specific setup to do for this module. ##### Resource #### ResourceSetup=Configuration du module Resource UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list). diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 322fe871d7a..c60508ef9e1 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -122,7 +122,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=Evénement répétitif EveryWeek=Chaque semaine EveryMonth=Chaque mois