Fixing style errors.

This commit is contained in:
stickler-ci 2023-01-02 11:52:34 +00:00
parent 658753d242
commit 59ed7b9f96
2 changed files with 35 additions and 36 deletions

View File

@ -1235,7 +1235,7 @@ if (empty($reshook)) {
// Prepare a price equivalent for minimum price check // Prepare a price equivalent for minimum price check
$pu_equivalent = $pu_ht; $pu_equivalent = $pu_ht;
$pu_equivalent_ttc = $pu_ttc; $pu_equivalent_ttc = $pu_ttc;
$currency_tx = $object->multicurrency_tx; $currency_tx = $object->multicurrency_tx;
// Check if we have a foreing currency // Check if we have a foreing currency
@ -1243,7 +1243,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;
} }
if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') {
$pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; $pu_equivalent_ttc = $pu_ttc_devise * $currency_tx;
} }
@ -1364,18 +1364,18 @@ if (empty($reshook)) {
$remise_percent = price2num(GETPOST('remise_percent'), '', 2); $remise_percent = price2num(GETPOST('remise_percent'), '', 2);
// Prepare a price equivalent for minimum price check // Prepare a price equivalent for minimum price check
$pu_equivalent = $pu_ht; $pu_equivalent = $pu_ht;
$pu_equivalent_ttc = $pu_ttc; $pu_equivalent_ttc = $pu_ttc;
$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;
} }
if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') {
$pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; $pu_equivalent_ttc = $pu_ttc_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);

View File

@ -684,18 +684,18 @@ if (empty($reshook)) {
// Prepare a price equivalent for minimum price check // Prepare a price equivalent for minimum price check
$pu_equivalent = $pu_ht; $pu_equivalent = $pu_ht;
$pu_equivalent_ttc = $pu_ttc; $pu_equivalent_ttc = $pu_ttc;
$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;
} }
if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') {
$pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; $pu_equivalent_ttc = $pu_ttc_devise * $currency_tx;
} }
$qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2);
@ -1013,7 +1013,6 @@ if (empty($reshook)) {
} }
if (!$error) { if (!$error) {
// Insert line // Insert line
$result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, min($rank, count($object->lines) + 1), 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $fk_unit, '', 0, $pu_ht_devise); $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $info_bits, 0, $price_base_type, $pu_ttc, $date_start, $date_end, $type, min($rank, count($object->lines) + 1), 0, GETPOST('fk_parent_line'), $fournprice, $buyingprice, $label, $array_options, $fk_unit, '', 0, $pu_ht_devise);
@ -1093,18 +1092,18 @@ if (empty($reshook)) {
$qty = price2num(GETPOST('qty', 'alpha'), 'MS'); $qty = price2num(GETPOST('qty', 'alpha'), 'MS');
// Prepare a price equivalent for minimum price check // Prepare a price equivalent for minimum price check
$pu_equivalent = $pu_ht; $pu_equivalent = $pu_ht;
$pu_equivalent_ttc = $pu_ttc; $pu_equivalent_ttc = $pu_ttc;
$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;
} }
if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') { if ($pu_ttc == '' && $pu_ttc_devise != '' && $currency_tx != '') {
$pu_equivalent_ttc = $pu_ttc_devise * $currency_tx; $pu_equivalent_ttc = $pu_ttc_devise * $currency_tx;
} }
// Define info_bits // Define info_bits
$info_bits = 0; $info_bits = 0;