Fixing style errors.

This commit is contained in:
stickler-ci 2021-10-23 20:37:07 +00:00
parent b027db49b5
commit 53e9da4748
2 changed files with 19 additions and 21 deletions

View File

@ -609,20 +609,18 @@ if ($action == 'create') { // Create. Seems to no be used
$object->lines[$i]->fetch_optionals(); $object->lines[$i]->fetch_optionals();
if ($action == 'create_delivery') { if ($action == 'create_delivery') {
$srcLine = new ExpeditionLigne($db); $srcLine = new ExpeditionLigne($db);
$extrafields->fetch_name_optionals_label($srcLine->table_element);
$srcLine->id = $expedition->lines[$i]->id;
$srcLine->fetch_optionals();
$object->lines[$i]->array_options = array_merge($object->lines[$i]->array_options, $srcLine->array_options);
} else {
$srcLine = new DeliveryLine($db);
$extrafields->fetch_name_optionals_label($srcLine->table_element); $extrafields->fetch_name_optionals_label($srcLine->table_element);
$srcLine->id = $expedition->lines[$i]->id; }
$srcLine->fetch_optionals();
$object->lines[$i]->array_options = array_merge($object->lines[$i]->array_options, $srcLine->array_options);
}
else {
$srcLine = new DeliveryLine($db);
$extrafields->fetch_name_optionals_label($srcLine->table_element);
}
print $object->lines[$i]->showOptionals($extrafields, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), ''); print $object->lines[$i]->showOptionals($extrafields, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), '');
//} //}
} }

View File

@ -286,10 +286,10 @@ class Delivery extends CommonObject
$id = $this->db->last_insert_id(MAIN_DB_PREFIX."deliverydet"); $id = $this->db->last_insert_id(MAIN_DB_PREFIX."deliverydet");
if (is_array($array_options) && count($array_options) > 0) { if (is_array($array_options) && count($array_options) > 0) {
$line = new DeliveryLine($this->db); $line = new DeliveryLine($this->db);
$line->id = $id; $line->id = $id;
$line->array_options = $array_options; $line->array_options = $array_options;
$result = $line->insertExtraFields(); $result = $line->insertExtraFields();
} }
if ($error == 0) { if ($error == 0) {
@ -541,7 +541,7 @@ class Delivery extends CommonObject
$line->qty = $expedition->lines[$i]->qty_shipped; $line->qty = $expedition->lines[$i]->qty_shipped;
$line->fk_product = $expedition->lines[$i]->fk_product; $line->fk_product = $expedition->lines[$i]->fk_product;
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($expedition->lines[$i]->array_options) && count($expedition->lines[$i]->array_options) > 0) { // For avoid conflicts if trigger used if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($expedition->lines[$i]->array_options) && count($expedition->lines[$i]->array_options) > 0) { // For avoid conflicts if trigger used
$line->array_options = $expedition->lines[$i]->array_options; $line->array_options = $expedition->lines[$i]->array_options;
} }
$this->lines[$i] = $line; $this->lines[$i] = $line;
} }
@ -608,13 +608,13 @@ class Delivery extends CommonObject
{ {
global $conf; global $conf;
$num = count($this->lines); $num = count($this->lines);
$line = new DeliveryLine($this->db); $line = new DeliveryLine($this->db);
$line->origin_id = $origin_id; $line->origin_id = $origin_id;
$line->qty = $qty; $line->qty = $qty;
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && is_array($array_options) && count($array_options) > 0) { // For avoid conflicts if trigger used
$line->array_options = $array_options; $line->array_options = $array_options;
} }
$this->lines[$num] = $line; $this->lines[$num] = $line;
} }