Fix: Do not close automatically deposits

This commit is contained in:
Laurent Destailleur 2011-08-08 01:01:45 +00:00
parent 92d55d1121
commit b1a71d2cec
5 changed files with 15 additions and 15 deletions

View File

@ -19,10 +19,9 @@ beta version of Dolibarr, step by step.
- Add a CVS Tag (DOLIBARR_x_y_BETA) - Add a CVS Tag (DOLIBARR_x_y_BETA)
- Create a branch (DOLIBARR_x_y_BRANCH). - Create a branch (DOLIBARR_x_y_BRANCH).
- Update the CVS on server that build automatically the tgz beta package - Run makepack-dolibarr.pl to generate all packages.
or build Dolibarr and DoliWamp with makepack-dolibarr.pl - Enable the category that point to the beta files on joomla
- Enable entries on joomla web site www.dolibarr.org with links web site www.dolibarr.org
that point to that file ("Dolibarr CVS snapshot of current beta").
- Post a news on dolibarr.org/dolibarr.fr - Post a news on dolibarr.org/dolibarr.fr
- Send mail on mailings-list - Send mail on mailings-list

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');
@ -289,7 +289,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
json["amountPayment"] = jQuery("#amountpayment").attr("value"); json["amountPayment"] = jQuery("#amountpayment").attr("value");
json["amounts"] = elemToJson(form.find("input[name*=\"amount_\"]")); json["amounts"] = elemToJson(form.find("input[name*=\"amount_\"]"));
json["remains"] = elemToJson(form.find("input[name*=\"remain_\"]")); json["remains"] = elemToJson(form.find("input[name*=\"remain_\"]"));
if(imgId != null)json["imgClicked"] = imgId; if(imgId != null)json["imgClicked"] = imgId;
jQuery.post("ajaxpayment.php", json, function(data) jQuery.post("ajaxpayment.php", json, function(data)
@ -300,13 +300,13 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
for(var key in json) for(var key in json)
{ {
if(key == "result") { if(key == "result") {
if(json["makeRed"]) { if(json["makeRed"]) {
jQuery("#"+key).css("color", "red"); jQuery("#"+key).css("color", "red");
} else { } else {
jQuery("#"+key).removeAttr("style"); jQuery("#"+key).removeAttr("style");
} }
json[key]=json["label"]+" "+json[key]; json[key]=json["label"]+" "+json[key];
jQuery("#"+key).text(json[key]); jQuery("#"+key).text(json[key]);
} else { } else {
form.find("input[name*=\""+key+"\"]").each(function() { form.find("input[name*=\""+key+"\"]").each(function() {
@ -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,'','');
} }

View File

@ -366,7 +366,7 @@ DisabledBecausePayments=Not possible since there is some payments
CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified payed CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified payed
ExpectedToPay=Expected payment ExpectedToPay=Expected payment
PayedByThisPayment=Payed by this payment PayedByThisPayment=Payed by this payment
ClosePaidInvoicesAutomatically=Classify "Payed" all invoices entierely payed. ClosePaidInvoicesAutomatically=Classify "Payed" all standard or replacement invoices entierely payed.
AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Payed". AllCompletelyPayedInvoiceWillBeClosed=All invoice with no remain to pay will be automatically closed to status "Payed".
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice

View File

@ -366,7 +366,7 @@ DisabledBecausePayments=Non disponible car il existe des paiements
CantRemovePaymentWithOneInvoicePaid=Suppression impossible quand il existe au moins une facture classée payée. CantRemovePaymentWithOneInvoicePaid=Suppression impossible quand il existe au moins une facture classée payée.
ExpectedToPay=Paiement attendu ExpectedToPay=Paiement attendu
PayedByThisPayment=Règlé par ce paiement PayedByThisPayment=Règlé par ce paiement
ClosePaidInvoicesAutomatically=Classer automatiquement à "Payé" les factures entièrement payées. ClosePaidInvoicesAutomatically=Classer automatiquement à "Payé" les factures standards et de remplacement entièrement payées.
AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures avec un reste à payer nul seront automatiquement fermées au statut "Payé". AllCompletelyPayedInvoiceWillBeClosed=Toutes les factures avec un reste à payer nul seront automatiquement fermées au statut "Payé".
##### Types de contacts ##### ##### Types de contacts #####
TypeContact_facture_internal_SALESREPFOLL=Responsable suivi facture client TypeContact_facture_internal_SALESREPFOLL=Responsable suivi facture client