diff --git a/ChangeLog b/ChangeLog index 9c230457e91..b29d19e5966 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ Fix: Action event SHIPPING_VALIDATE is not implemented Fix: The customer code was set to uppercase when using numbering module leopard. We must keep data safe of any change. Fix: Loading actions extrafields fails. +Fix: [ bug #1123 ] Paid deposit invoices are always shown as partially paid when fully paid ***** ChangeLog for 3.5 compared to 3.4.* ***** For users: diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 7ef5f44fb88..86ff46d2a53 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -2,6 +2,7 @@ /* Copyright (C) 2002-2004 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2014 Marcos GarcĂ­a * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -209,7 +210,15 @@ class Paiement extends CommonObject } } - if ($invoice->type != 0 && $invoice->type != 1 && $invoice->type != 2) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note. We do nothing more."); + //Invoice types that are eligible for changing status to paid + $affected_types = array( + 0, + 1, + 2, + 3 + ); + + if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice. We do nothing more."); else if ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); else $result=$invoice->set_paid($user,'','');