Fix: Do not close automatically deposits

This commit is contained in:
Laurent Destailleur 2011-08-08 01:01:45 +00:00
parent 7b809e11ae
commit e58aa3fcb0
2 changed files with 10 additions and 9 deletions

View File

@ -23,7 +23,7 @@
* \file htdocs/compta/paiement.php * \file htdocs/compta/paiement.php
* \ingroup compta * \ingroup compta
* \brief Page to create a payment * \brief Page to create a payment
* \version $Id: paiement.php,v 1.113 2011/08/03 00:46:23 eldy Exp $ * \version $Id: paiement.php,v 1.114 2011/08/08 01:01:46 eldy Exp $
*/ */
require('../main.inc.php'); require('../main.inc.php');
@ -581,7 +581,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
$langs->load("withdrawals"); $langs->load("withdrawals");
if ($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed"); if ($conf->global->WITHDRAW_DISABLE_AUTOCREATE_ONPAYMENTS) print '<br>'.$langs->trans("IfInvoiceNeedOnWithdrawPaymentWontBeClosed");
}*/ }*/
print '<br><input type="submit" class="button" value="'.$langs->trans('Save').'"></center>'; print '<br><input type="submit" class="button" value="'.$langs->trans('Save').'"><br><br></center>';
// print '</td></tr>'; // print '</td></tr>';
} }
@ -672,5 +672,5 @@ if (! GETPOST('action'))
$db->close(); $db->close();
llxFooter('$Date: 2011/08/03 00:46:23 $ - $Revision: 1.113 $'); llxFooter('$Date: 2011/08/08 01:01:46 $ - $Revision: 1.114 $');
?> ?>

View File

@ -21,7 +21,7 @@
* \file htdocs/compta/paiement/class/paiement.class.php * \file htdocs/compta/paiement/class/paiement.class.php
* \ingroup facture * \ingroup facture
* \brief File of class to manage payments of customers invoices * \brief File of class to manage payments of customers invoices
* \version $Id: paiement.class.php,v 1.23 2011/08/05 21:06:55 eldy Exp $ * \version $Id: paiement.class.php,v 1.24 2011/08/08 01:01:45 eldy Exp $
*/ */
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
@ -200,7 +200,8 @@ class Paiement extends CommonObject
} }
} }
if ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); if ($invoice->type != 0 && $invoice->type != 1) dol_syslog("Invoice ".$facid." is not a standard nor replacement 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 if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more.");
else $result=$invoice->set_paid($user,'',''); else $result=$invoice->set_paid($user,'','');
} }