diff -BNaur '--exclude=CVS' '--exclude=*.patch' '--exclude=.#*' '--exclude=*~' '--exclude=*.rej' '--exclude=*.orig' '--exclude=*.bak' '--exclude=conf.php' '--exclude=documents' dolibarr/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php dev/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php --- dolibarr/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php 2012-09-27 13:53:24.658560842 +0200 +++ dev/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php 2012-09-27 14:06:53.478530785 +0200 @@ -102,7 +102,8 @@ { $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 @@ '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) ); }