diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 78e28d24fec..c8cd2a46e32 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -102,7 +102,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures { $invoice_source->fetch($object->fk_facture_source); } - $alreadypayed=price($object->getSommePaiement(),0,$outputlangs); + $sumpayed = $object->getSommePaiement(); + $alreadypayed=price($sumpayed,0,$outputlangs); return array( 'object_id'=>$object->id, @@ -128,7 +129,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures 'object_note'=>$object->note_public, // Payments 'object_already_payed'=>$alreadypayed, - 'object_remain_to_pay'=>price($object->total_ttc - $alreadypayed,0,$outputlangs) + 'object_remain_to_pay'=>price($object->total_ttc - $sumpayed,0,$outputlangs) ); }