FIX #yogosha5752
This commit is contained in:
parent
22da450a96
commit
5c2ee240b2
@ -1324,9 +1324,9 @@ if (empty($reshook)) {
|
||||
// Terms of payment
|
||||
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
|
||||
} elseif ($action == 'setremisepercent' && $usercancreate) {
|
||||
$result = $object->set_remise_percent($user, $_POST['remise_percent']);
|
||||
$result = $object->set_remise_percent($user, price2num(GETPOST('remise_percent')));
|
||||
} elseif ($action == 'setremiseabsolue' && $usercancreate) {
|
||||
$result = $object->set_remise_absolue($user, $_POST['remise_absolue']);
|
||||
$result = $object->set_remise_absolue($user, price2num(GETPOST('remise_absolue')));
|
||||
} elseif ($action == 'setmode' && $usercancreate) {
|
||||
// Payment choice
|
||||
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
|
||||
|
||||
@ -24,6 +24,8 @@
|
||||
* \brief Page to edit absolute discounts for a customer
|
||||
*/
|
||||
|
||||
if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
@ -1778,7 +1778,7 @@ if (empty($reshook)) {
|
||||
$product->fetch(GETPOST('idprod'.$i, 'int'));
|
||||
$startday = dol_mktime(12, 0, 0, GETPOST('date_start'.$i.'month'), GETPOST('date_start'.$i.'day'), GETPOST('date_start'.$i.'year'));
|
||||
$endday = dol_mktime(12, 0, 0, GETPOST('date_end'.$i.'month'), GETPOST('date_end'.$i.'day'), GETPOST('date_end'.$i.'year'));
|
||||
$result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, $_POST['idprod'.$i], $_POST['remise_percent'.$i], $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit);
|
||||
$result = $object->addline($product->description, $product->price, price2num(GETPOST('qty'.$i), 'MS'), $product->tva_tx, $product->localtax1_tx, $product->localtax2_tx, GETPOST('idprod'.$i, 'int'), price2num(GETPOST('remise_percent'.$i)), $startday, $endday, 0, 0, '', $product->price_base_type, $product->price_ttc, $product->type, -1, 0, '', 0, 0, null, 0, '', 0, 100, '', $product->fk_unit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -290,7 +290,7 @@ if (empty($reshook)) {
|
||||
}
|
||||
|
||||
if ($action == 'setremisepercent' && $usercancreate) {
|
||||
$result = $object->set_remise($user, $_POST['remise_percent']);
|
||||
$result = $object->set_remise($user, price2num(GETPOST('remise_percent')));
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user