FIX #13118
This commit is contained in:
parent
7c07589850
commit
d0d352be1a
@ -95,6 +95,8 @@ if (empty($reshook))
|
||||
$totalpayment = 0;
|
||||
$multicurrency_totalpayment = 0;
|
||||
$atleastonepaymentnotnull = 0;
|
||||
$formquestion = array();
|
||||
$i = 0;
|
||||
|
||||
// Generate payment array and check if there is payment higher than invoice and payment date before invoice date
|
||||
$tmpinvoice = new Facture($db);
|
||||
@ -214,7 +216,7 @@ if (empty($reshook))
|
||||
{
|
||||
$error = 0;
|
||||
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
|
||||
$datepaye = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
|
||||
|
||||
$db->begin();
|
||||
|
||||
@ -260,8 +262,10 @@ if (empty($reshook))
|
||||
$paiement->amounts = $amounts; // Array with all payments dispatching with invoice id
|
||||
$paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching
|
||||
$paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1);
|
||||
$paiement->num_paiement = GETPOST('num_paiement', 'alpha');
|
||||
$paiement->note = GETPOST('comment', 'alpha');
|
||||
$paiement->num_payment = GETPOST('num_paiement', 'alpha');
|
||||
$paiement->note_private = GETPOST('comment', 'alpha');
|
||||
$paiement->num_paiement = $paiement->num_payment; // For bacward compatibility
|
||||
$paiement->note = $paiement->note_private; // For bacward compatibility
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
|
||||
@ -297,9 +297,13 @@ if (empty($reshook))
|
||||
$paiement->datepaye = $datepaye;
|
||||
$paiement->amounts = $amounts; // Array of amounts
|
||||
$paiement->multicurrency_amounts = $multicurrency_amounts;
|
||||
$paiement->paiementid = $_POST['paiementid'];
|
||||
$paiement->num_paiement = $_POST['num_paiement'];
|
||||
$paiement->note = $_POST['comment'];
|
||||
$paiement->paiementid = GETPOST('paiementid', 'int');
|
||||
|
||||
$paiement->num_payment = GETPOST('num_paiement', 'alpha');
|
||||
$paiement->note_private = GETPOST('comment', 'alpha');
|
||||
$paiement->num_paiement = $paiement->num_payment; // For bacward compatibility
|
||||
$paiement->note = $paiement->note_private; // For bacward compatibility
|
||||
|
||||
if (!$error)
|
||||
{
|
||||
$paiement_id = $paiement->create($user, (GETPOST('closepaidinvoices') == 'on' ? 1 : 0), $thirdparty);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user