diff --git a/.travis.yml b/.travis.yml index 752dd572371..1112454c991 100644 --- a/.travis.yml +++ b/.travis.yml @@ -291,7 +291,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . + phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . #if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi set +e echo diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index a50e22315d5..a1077a4f845 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -183,8 +183,7 @@ if ($action != 'create_updater' && $action != 'edit_updater') print ''; } } - else - { + else { print '
| '.$langs->trans("Nature").' | ';
$statutarray = array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial"));
@@ -1734,8 +1708,7 @@ else
print '';
}
// Fiche en mode visu
- else
- {
+ else {
$showbarcode = empty($conf->barcode->enabled) ? 0 : 1;
if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0;
@@ -1791,8 +1764,7 @@ else
{
print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type');
}
- else
- {
+ else {
$object->fetch_barcode();
print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? ' '.$langs->trans("SetDefaultBarcodeType").' ' : '');
}
@@ -1819,8 +1791,7 @@ else
print ' ';
print '';
}
- else
- {
+ else {
print $object->barcode;
}
print ' | ||
| '.$langs->trans("Nature").' | '; print $object->getLibFinished(); @@ -2025,8 +1995,7 @@ else { print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); } - else - { + else { print ' '; } print " | ||
| '; $html .= $langs->trans("AddToDraftProposals").' | '; $html .= $langs->trans("NoDraftProposals"); @@ -2300,8 +2260,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == $html .= $form->selectarray("commandeid", $othercom, 0, 1); $html .= ' | ||
| '; $html .= $langs->trans("AddToDraftOrders").' | '; $html .= $langs->trans("NoDraftOrders"); @@ -2324,8 +2283,7 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); $html .= ' | ||
| '; $html .= $langs->trans("AddToDraftInvoices").' | '; $html .= $langs->trans("NoDraftInvoices"); diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index b04560dab32..66cef158439 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -303,8 +303,7 @@ class Products extends DolibarrApi // We update price only if it was changed $pricemodified = false; if ($this->product->price_base_type != $oldproduct->price_base_type) { $pricemodified = true; - } else - { + } else { if ($this->product->tva_tx != $oldproduct->tva_tx) { $pricemodified = true; } if ($this->product->tva_npr != $oldproduct->tva_npr) { $pricemodified = true; @@ -318,8 +317,7 @@ class Products extends DolibarrApi if ($this->product->price_min_ttc != $oldproduct->price_min_ttc) { $pricemodified = true; } } - else - { + else { if ($this->product->price != $oldproduct->price) { $pricemodified = true; } if ($this->product->price_min != $oldproduct->price_min) { $pricemodified = true; @@ -805,7 +803,7 @@ class Products extends DolibarrApi $product_fourn = new ProductFournisseur($this->db); $product_fourn_list = $product_fourn->list_product_fournisseur_price($obj->rowid, '', '', 0, 0); - foreach($product_fourn_list as $tmpobj) { + foreach ($product_fourn_list as $tmpobj) { $this->_cleanObjectDatas($tmpobj); } //var_dump($product_fourn_list->db);exit; diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 0eeddd15c07..b38501cb788 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -102,8 +102,7 @@ class FormProduct { $sql .= ", pb.qty as stock"; } - else - { + else { $sql .= ", ps.reel as stock"; } } @@ -126,8 +125,7 @@ class FormProduct { $sql .= " AND e.statut IN (".$this->db->escape(implode(',', $warehouseStatus)).")"; } - else - { + else { $sql .= " AND e.statut = 1"; } @@ -179,8 +177,7 @@ class FormProduct return $num; } - else - { + else { dol_print_error($this->db); return -1; } @@ -271,8 +268,7 @@ class FormProduct if ($arraytypes['stock'] <= 0) { $label .= ' ('.$langs->trans("Stock").':'.$arraytypes['stock'].')'; } - else - { + else { $label .= ' ('.$langs->trans("Stock").':'.$arraytypes['stock'].')'; } } @@ -437,8 +433,7 @@ class FormProduct { if (!empty($fk_product)) $productIdArray[] = $fk_product; } - else - { + else { foreach ($objectLines as $line) { if ($line->fk_product) $productIdArray[] = $line->fk_product; } @@ -459,8 +454,7 @@ class FormProduct { $productIdArray = array($fk_product); // only show lot stock for product } - else - { + else { foreach ($this->cache_lot as $key => $value) { $productIdArray[] = $key; @@ -527,8 +521,7 @@ class FormProduct { return count($this->cache_lot); } - else - { + else { // clear cache $this->cache_lot = array(); $productIdList = implode(',', $productIdArray); @@ -561,8 +554,7 @@ class FormProduct return $num; } - else - { + else { dol_print_error($this->db); return -1; } diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 7b6892552d1..f072d04916e 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -457,8 +457,7 @@ class Product extends CommonObject if ($err > 0) { return 0; } - else - { + else { return 1; } } @@ -683,34 +682,29 @@ class Product extends CommonObject $error++; } } - else - { + else { $error++; $this->error = $this->db->lasterror(); } } - else - { + else { $error++; $this->error = 'ErrorFailedToGetInsertedId'; } } - else - { + else { $error++; $this->error = $this->db->lasterror(); } } - else - { + else { // Product already exists with this ref $langs->load("products"); $error++; $this->error = "ErrorProductAlreadyExists"; } } - else - { + else { $error++; $this->error = $this->db->lasterror(); } @@ -727,14 +721,12 @@ class Product extends CommonObject $this->db->commit(); return $this->id; } - else - { + else { $this->db->rollback(); return -$error; } } - else - { + else { $this->db->rollback(); dol_syslog(get_class($this)."::Create fails verify ".join(',', $this->errors), LOG_WARNING); return -3; @@ -811,8 +803,7 @@ class Product extends CommonObject $result = $mod->verif($this->db, $valuetotest, $this, 0, $typefortest); return $result; } - else - { + else { return 0; } } @@ -1104,14 +1095,12 @@ class Product extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->db->rollback(); return -$error; } } - else - { + else { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); if (empty($conf->barcode->enabled) || empty($this->barcode)) { @@ -1123,8 +1112,7 @@ class Product extends CommonObject $this->db->rollback(); return -1; } - else - { + else { $this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql; $this->errors[] = $this->error; $this->db->rollback(); @@ -1132,8 +1120,7 @@ class Product extends CommonObject } } } - else - { + else { $this->db->rollback(); dol_syslog(get_class($this)."::Update fails verify ".join(',', $this->errors), LOG_WARNING); return -3; @@ -1281,8 +1268,7 @@ class Product extends CommonObject $this->db->commit(); return 1; } - else - { + else { foreach ($this->errors as $errmsg) { dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); @@ -1292,8 +1278,7 @@ class Product extends CommonObject return -$error; } } - else - { + else { $this->error = "ErrorRecordIsUsedCantDelete"; return 0; } @@ -1332,8 +1317,7 @@ class Product extends CommonObject } $sql2 .= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } - else - { + else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description"; if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", note"; } @@ -1370,8 +1354,7 @@ class Product extends CommonObject } $sql2 .= " WHERE fk_product=".$this->id." AND lang='".$this->db->escape($key)."'"; } - else - { + else { $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_lang (fk_product, lang, label, description"; if (!empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2 .= ", note"; } @@ -1392,8 +1375,7 @@ class Product extends CommonObject } } } - else - { + else { // language is not current language and we didn't provide a multilang description for this language } } @@ -1435,8 +1417,7 @@ class Product extends CommonObject // End call triggers return 1; } - else - { + else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR); return -1; @@ -1498,8 +1479,7 @@ class Product extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -1538,8 +1518,7 @@ class Product extends CommonObject } return 1; } - else - { + else { $this->error = "Error: ".$this->db->lasterror()." - ".$sql; return -1; } @@ -1581,8 +1560,7 @@ class Product extends CommonObject dol_print_error($this->db); return -1; } - else - { + else { return 1; } } @@ -1609,8 +1587,7 @@ class Product extends CommonObject if ($resql) { return 1; } - else - { + else { $this->error = $this->db->lasterror(); return -1; } @@ -1687,8 +1664,7 @@ class Product extends CommonObject { $pu_ht = $priceforthequantityarray['unitprice']; } - else - { + else { $pu_ttc = $priceforthequantityarray['unitprice']; } break; @@ -1708,8 +1684,7 @@ class Product extends CommonObject { $pu_ht = $priceforthequantityarray['unitprice']; } - else - { + else { $pu_ttc = $priceforthequantityarray['unitprice']; } break; @@ -1852,20 +1827,17 @@ class Product extends CommonObject $result = $obj->fk_product; return $result; } - else - { + else { return -1; // Ce produit n'existe pas avec cet id tarif fournisseur ou existe mais qte insuffisante, ni pour le couple produit/ref fournisseur dans la quantité. } } - else - { + else { $this->error = $this->db->lasterror(); return -3; } } } - else - { + else { $this->error = $this->db->lasterror(); return -2; } @@ -1937,14 +1909,12 @@ class Product extends CommonObject $price_min = price2num($newminprice) / (1 + ($newvat / 100)); $price_min = price2num($price_min, 'MU'); } - else - { + else { $price_min = 0; $price_min_ttc = 0; } } - else - { + else { $price = price2num($newprice, 'MU'); $price_ttc = ($newnpr != 1) ? price2num($newprice) * (1 + ($newvat / 100)) : $price; $price_ttc = price2num($price_ttc, 'MU'); @@ -1955,8 +1925,7 @@ class Product extends CommonObject $price_min_ttc = price2num($price_min_ttc, 'MU'); //print 'X'.$newminprice.'-'.$price_min; } - else - { + else { $price_min = 0; $price_min_ttc = 0; } @@ -1969,7 +1938,7 @@ class Product extends CommonObject $localtaxtype2 = $localtaxes_array['2']; $localtax2 = $localtaxes_array['3']; } - else // old method. deprecated because ot can't retreive type + else // old method. deprecated because ot can't retreive type { $localtaxtype1 = '0'; $localtax1 = get_localtax($newvat, 1); @@ -2045,8 +2014,7 @@ class Product extends CommonObject $this->db->commit(); } - else - { + else { $this->db->rollback(); dol_print_error($this->db); } @@ -2281,8 +2249,7 @@ class Product extends CommonObject } }*/ } - else - { + else { dol_print_error($this->db); return -1; } @@ -2330,15 +2297,13 @@ class Product extends CommonObject } $this->prices_by_qty_list[0] = $resultat; } - else - { + else { dol_print_error($this->db); return -1; } } } - else - { + else { dol_print_error($this->db); return -1; } @@ -2394,15 +2359,13 @@ class Product extends CommonObject } $this->prices_by_qty_list[$i] = $resultat; } - else - { + else { dol_print_error($this->db); return -1; } } } - else - { + else { dol_print_error($this->db); return -1; } @@ -2427,13 +2390,11 @@ class Product extends CommonObject return 1; } - else - { + else { return 0; } } - else - { + else { dol_print_error($this->db); return -1; } @@ -2507,8 +2468,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -2558,8 +2518,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -2661,8 +2620,7 @@ class Product extends CommonObject if ($reshook > 0) $this->stats_commande = $hookmanager->resArray['stats_commande']; return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -2718,8 +2676,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -2802,8 +2759,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -2855,8 +2811,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -2946,8 +2901,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -3020,8 +2974,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -3094,8 +3047,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -3147,8 +3099,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->error(); return -1; } @@ -3182,8 +3133,7 @@ class Product extends CommonObject $i++; } } - else - { + else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -3192,8 +3142,7 @@ class Product extends CommonObject $year = strftime('%Y', time()); $month = strftime('%m', time()); } - else - { + else { $month = 12; // We imagine we are at end of year, so we get last 12 month before, so all correct year. } $result = array(); @@ -3674,8 +3623,7 @@ class Product extends CommonObject dol_print_error($this->db); return -1; } - else - { + else { $result = $this->db->query($sql); if ($result) { $num = $this->db->num_rows($result); @@ -3683,16 +3631,14 @@ class Product extends CommonObject $this->error = "isFatherOfThis"; return -1; } - else - { + else { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'product_association(fk_product_pere,fk_product_fils,qty,incdec)'; $sql .= ' VALUES ('.$id_pere.', '.$id_fils.', '.$qty.', '.$incdec.')'; if (!$this->db->query($sql)) { dol_print_error($this->db); return -1; } - else - { + else { return 1; } } @@ -3736,8 +3682,7 @@ class Product extends CommonObject dol_print_error($this->db); return -1; } - else - { + else { return 1; } } @@ -3800,13 +3745,11 @@ class Product extends CommonObject return true; } - else - { + else { return false; } } - else - { + else { dol_print_error($this->db); return -1; } @@ -3896,21 +3839,18 @@ class Product extends CommonObject $this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price"); return 1; } - else - { + else { $this->error = $this->db->lasterror(); return -1; } } // If the supplier price already exists for this product and quantity - else - { + else { $this->product_fourn_price_id = $obj->rowid; return 0; } } - else - { + else { $this->error = $this->db->lasterror(); return -2; } @@ -4106,8 +4046,7 @@ class Product extends CommonObject $this->db->rollback(); return -1; } - else - { + else { $this->db->commit(); return 1; } @@ -4218,8 +4157,7 @@ class Product extends CommonObject if ($obj) { $nb = $obj->nb; } } - else - { + else { return -1; } @@ -4304,8 +4242,7 @@ class Product extends CommonObject } return $prods; } - else - { + else { dol_print_error($this->db); return -1; } @@ -4369,8 +4306,7 @@ class Product extends CommonObject return $prods; } - else - { + else { dol_print_error($this->db); return -1; } @@ -4498,8 +4434,7 @@ class Product extends CommonObject $linkclose .= ' title="'.dol_escape_htmltag($label, 1, 1).'"'; $linkclose .= ' class="nowraponall classfortooltip"'; } - else - { + else { $linkclose = ' class="nowraponall"'; } @@ -4574,8 +4509,7 @@ class Product extends CommonObject if (!empty($conf->global->PRODUCT_ADDON_PDF)) { $modele = $conf->global->PRODUCT_ADDON_PDF; } - else - { + else { $modele = 'strato'; } } @@ -4744,8 +4678,7 @@ class Product extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->error = $movementstock->error; $this->errors = $movementstock->errors; @@ -4792,8 +4725,7 @@ class Product extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->error = $movementstock->error; $this->errors = $movementstock->errors; @@ -4872,8 +4804,7 @@ class Product extends CommonObject return 1; } - else - { + else { $this->error = $this->db->lasterror(); return -1; } @@ -5019,8 +4950,7 @@ class Product extends CommonObject } return $result; } - else - { + else { dol_print_error($this->db); $this->db->rollback(); return array(); @@ -5258,8 +5188,7 @@ class Product extends CommonObject $this->db->free($resql); return 1; } - else - { + else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -5395,8 +5324,7 @@ class Product extends CommonObject $this->db->free($resql); return $label; } - else - { + else { $this->error = $this->db->error().' sql='.$sql; dol_syslog(get_class($this)."::getLabelOfUnit Error ".$this->error, LOG_ERR); return -1; @@ -5629,8 +5557,7 @@ class Product extends CommonObject $this->db->free($result); } - else - { + else { dol_print_error($this->db); } } diff --git a/htdocs/product/class/productbatch.class.php b/htdocs/product/class/productbatch.class.php index 05cfd7523e0..3c56221863c 100644 --- a/htdocs/product/class/productbatch.class.php +++ b/htdocs/product/class/productbatch.class.php @@ -120,8 +120,7 @@ class Productbatch extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return $this->id; } @@ -179,8 +178,7 @@ class Productbatch extends CommonObject return 1; } - else - { + else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -233,8 +231,7 @@ class Productbatch extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -275,8 +272,7 @@ class Productbatch extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -331,8 +327,7 @@ class Productbatch extends CommonObject $this->db->commit(); return $object->id; } - else - { + else { $this->db->rollback(); return -1; } @@ -425,8 +420,7 @@ class Productbatch extends CommonObject return 1; } - else - { + else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -495,8 +489,7 @@ class Productbatch extends CommonObject return $ret; } - else - { + else { $error = "Error ".$db->lasterror(); return -1; } diff --git a/htdocs/product/class/propalmergepdfproduct.class.php b/htdocs/product/class/propalmergepdfproduct.class.php index 9ca53d167cf..26c627ee0e4 100644 --- a/htdocs/product/class/propalmergepdfproduct.class.php +++ b/htdocs/product/class/propalmergepdfproduct.class.php @@ -140,8 +140,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return $this->id; } @@ -199,8 +198,7 @@ class Propalmergepdfproduct extends CommonObject return 1; } - else - { + else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; @@ -273,8 +271,7 @@ class Propalmergepdfproduct extends CommonObject return 1; } - else - { + else { $this->error = "Error ".$this->db->lasterror(); dol_syslog(get_class($this)."::fetch_by_product ".$this->error, LOG_ERR); return -1; @@ -334,8 +331,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -377,8 +373,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -427,8 +422,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -470,8 +464,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->rollback(); return -1 * $error; } - else - { + else { $this->db->commit(); return 1; } @@ -526,8 +519,7 @@ class Propalmergepdfproduct extends CommonObject $this->db->commit(); return $object->id; } - else - { + else { $this->db->rollback(); return -1; } diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index dbdb6cb6f42..194a342d391 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -81,27 +81,23 @@ if ($action == 'add_prod' && ($user->rights->produit->creer || $user->rights->se //var_dump($i.' '.GETPOST("prod_id_".$i, 'int'), $qty, GETPOST("prod_incdec_".$i, 'int')); $action = 'edit'; } - else - { + else { $error++; $action = 're-edit'; if ($object->error == "isFatherOfThis") { setEventMessages($langs->trans("ErrorAssociationIsFatherOfThis"), null, 'errors'); } - else - { + else { setEventMessages($object->error, $object->errors, 'errors'); } } } - else - { + else { if ($object->del_sousproduit($id, GETPOST("prod_id_".$i, 'int')) > 0) { $action = 'edit'; } - else - { + else { $error++; $action = 're-edit'; setEventMessages($object->error, $object->errors, 'errors'); @@ -235,8 +231,7 @@ if ($id > 0 || !empty($ref)) { print price($object->price_ttc).' '.$langs->trans($object->price_base_type); } - else - { + else { print price($object->price).' '.$langs->trans($object->price_base_type ? $object->price_base_type : 'HT'); } print ' | ||
| '.$langs->trans("None").' | '; print ''; if ($qty) print ''; - else - { + else { // TODO Hide field and show it when setting a qty print ''; //print ''; @@ -636,8 +624,7 @@ if ($id > 0 || !empty($ref)) print ''; } } - else - { + else { dol_print_error($db); } print ' | ||