Fixing style errors.
This commit is contained in:
parent
58d3cdb13c
commit
50e2545bea
@ -1116,7 +1116,7 @@ if (empty($reshook)) {
|
|||||||
|
|
||||||
$date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
$date_start = dol_mktime(GETPOST('date_start'.$predef.'hour'), GETPOST('date_start'.$predef.'min'), GETPOST('date_start'.$predef.'sec'), GETPOST('date_start'.$predef.'month'), GETPOST('date_start'.$predef.'day'), GETPOST('date_start'.$predef.'year'));
|
||||||
$date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
$date_end = dol_mktime(GETPOST('date_end'.$predef.'hour'), GETPOST('date_end'.$predef.'min'), GETPOST('date_end'.$predef.'sec'), GETPOST('date_end'.$predef.'month'), GETPOST('date_end'.$predef.'day'), GETPOST('date_end'.$predef.'year'));
|
||||||
|
|
||||||
// Prepare a price equivlanet for mimum price check
|
// Prepare a price equivlanet for mimum price check
|
||||||
$pu_equivalent = $pu_ht;
|
$pu_equivalent = $pu_ht;
|
||||||
$currency_tx = $object->multicurrency_tx;
|
$currency_tx = $object->multicurrency_tx;
|
||||||
@ -1126,7 +1126,7 @@ if (empty($reshook)) {
|
|||||||
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
||||||
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Local Taxes
|
// Local Taxes
|
||||||
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $tva_npr);
|
$localtax1_tx = get_localtax($tva_tx, 1, $object->thirdparty, $tva_npr);
|
||||||
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $tva_npr);
|
$localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $tva_npr);
|
||||||
@ -1135,7 +1135,7 @@ if (empty($reshook)) {
|
|||||||
if ($tva_npr) {
|
if ($tva_npr) {
|
||||||
$info_bits |= 0x01;
|
$info_bits |= 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check minimum price
|
// Check minimum price
|
||||||
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!empty($price_min) && (price2num($pu_equivalent) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) {
|
if (((!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->produit->ignore_price_min_advance)) || empty($conf->global->MAIN_USE_ADVANCED_PERMS)) && (!empty($price_min) && (price2num($pu_equivalent) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) {
|
||||||
$mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency));
|
$mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency));
|
||||||
@ -1229,7 +1229,7 @@ if (empty($reshook)) {
|
|||||||
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear'));
|
||||||
|
|
||||||
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
$remise_percent = price2num(GETPOST('remise_percent'), '', 2);
|
||||||
|
|
||||||
// Prepare pu_equivament for checking the minimun price
|
// Prepare pu_equivament for checking the minimun price
|
||||||
$pu_equivalent = $pu_ht;
|
$pu_equivalent = $pu_ht;
|
||||||
$currency_tx = $object->multicurrency_tx;
|
$currency_tx = $object->multicurrency_tx;
|
||||||
@ -1237,8 +1237,8 @@ if (empty($reshook)) {
|
|||||||
// Check if we have a foreing currency
|
// Check if we have a foreing currency
|
||||||
// If so, we update the pu_equiv as the equivalent price in base currency
|
// If so, we update the pu_equiv as the equivalent price in base currency
|
||||||
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
||||||
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
|
|||||||
@ -629,14 +629,14 @@ if (empty($reshook)) {
|
|||||||
$idprod = GETPOST('idprod', 'int');
|
$idprod = GETPOST('idprod', 'int');
|
||||||
$tva_tx = '';
|
$tva_tx = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$price_equivalent = $price_ht;
|
$price_equivalent = $price_ht;
|
||||||
$currency_tx = $object->multicurrency_tx;
|
$currency_tx = $object->multicurrency_tx;
|
||||||
|
|
||||||
// Check if we have a foreing currency
|
// Check if we have a foreing currency
|
||||||
// If so, we update the pu_equiv as the equivalent price in base currency
|
// If so, we update the pu_equiv as the equivalent price in base currency
|
||||||
if ($price_ht == '' && $price_ht_devise != '' && $currency_tx != '') {
|
if ($price_ht == '' && $price_ht_devise != '' && $currency_tx != '') {
|
||||||
$price_equivalent = $price_ht_devise * $currency_tx;
|
$price_equivalent = $price_ht_devise * $currency_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS');
|
||||||
@ -999,14 +999,14 @@ if (empty($reshook)) {
|
|||||||
$pu_ht = price2num(GETPOST('price_ht'), '', 2);
|
$pu_ht = price2num(GETPOST('price_ht'), '', 2);
|
||||||
$vat_rate = (GETPOST('tva_tx') ?GETPOST('tva_tx') : 0);
|
$vat_rate = (GETPOST('tva_tx') ?GETPOST('tva_tx') : 0);
|
||||||
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2);
|
$pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2);
|
||||||
|
|
||||||
$pu_equivalent = $pu_ht;
|
$pu_equivalent = $pu_ht;
|
||||||
$currency_tx = $object->multicurrency_tx;
|
$currency_tx = $object->multicurrency_tx;
|
||||||
|
|
||||||
// Check if we have a foreing currency
|
// Check if we have a foreing currency
|
||||||
// If so, we update the pu_equiv as the equivalent price in base currency
|
// If so, we update the pu_equiv as the equivalent price in base currency
|
||||||
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
if ($pu_ht == '' && $pu_ht_devise != '' && $currency_tx != '') {
|
||||||
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
$pu_equivalent = $pu_ht_devise * $currency_tx;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define info_bits
|
// Define info_bits
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user