From 1ab5eece6b7e79ab5b03c7c214b4dfb715693a5b Mon Sep 17 00:00:00 2001 From: jean Date: Tue, 22 May 2018 09:40:49 +0200 Subject: [PATCH 01/46] Adding code to show update date of supplier price shown --- htdocs/fourn/class/fournisseur.product.class.php | 4 ++-- htdocs/langs/en_US/suppliers.lang | 1 + htdocs/langs/fr_FR/suppliers.lang | 1 + htdocs/product/fournisseurs.php | 6 ++++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index b9a2f72b9bd..dc04139232c 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -526,7 +526,7 @@ class ProductFournisseur extends Product $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,"; - $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation"; + $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation, pfp.tms as date_modification "; $sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -568,7 +568,7 @@ class ProductFournisseur extends Product $prodfourn->fourn_tva_npr = $record["info_bits"]; $prodfourn->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; $prodfourn->supplier_reputation = $record["supplier_reputation"]; - + $prodfourn->date_modification = $this->db->jdate($record["date_modification"]); $prodfourn->fourn_multicurrency_price = $record["multicurrency_price"]; $prodfourn->fourn_multicurrency_unitprice = $record["multicurrency_unitprice"]; $prodfourn->fourn_multicurrency_tx = $record["multicurrency_tx"]; diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index d0cf540d3eb..0e6ffe8a6cd 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -45,3 +45,4 @@ BuyerName=Buyer name AllProductServicePrices=All product / service prices AllProductReferencesOfSupplier=All product / service references of supplier BuyingPriceNumShort=Vendor prices +PriceUpdate=Updated on \ No newline at end of file diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 2f9b93ff323..0aad31d294c 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -45,3 +45,4 @@ BuyerName=Nom de l'acheteur AllProductServicePrices=Tous les prix du produits / service AllProductReferencesOfSupplier=Toutes les références des produits/services du fournisseur BuyingPriceNumShort=Prix fournisseurs +PriceUpdate=Mis à jour le \ No newline at end of file diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 21439a1ac8a..70776a989df 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -754,6 +754,7 @@ SCRIPT; print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); } print_liste_field_titre("DiscountQtyMin",$_SERVER["PHP_SELF"],'','',$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre("PriceUpdate",$_SERVER["PHP_SELF"],"pfp.date_modification","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre("NbDaysToDelivery",$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre("ReputationForThisProduct",$_SERVER["PHP_SELF"],"pfp.supplier_reputation","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre(''); @@ -828,6 +829,11 @@ SCRIPT; print price2num($productfourn->fourn_remise_percent).'%'; print ''; + // Date + print ''; + print dol_print_date($productfourn->date_modification, "%d/%m/%Y %H:%M"); + print ''; + // Delivery delay print ''; print $productfourn->delivery_time_days; From fb96857b734148d9f75c6348bc82a6319c1f9ec3 Mon Sep 17 00:00:00 2001 From: jean Date: Fri, 25 May 2018 15:33:27 +0200 Subject: [PATCH 02/46] use dayhour instead of % format --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 70776a989df..b63c22482b4 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -831,7 +831,7 @@ SCRIPT; // Date print ''; - print dol_print_date($productfourn->date_modification, "%d/%m/%Y %H:%M"); + print dol_print_date($productfourn->date_modification, "dayhour"); print ''; // Delivery delay From f51b89def32d90b2284f2adb0a623bffc1c78104 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 20 Feb 2019 16:14:24 +0100 Subject: [PATCH 03/46] NEW supplier buyprice barcode --- htdocs/core/class/html.form.class.php | 11 ++++- .../fourn/class/fournisseur.product.class.php | 24 ++++++++-- .../install/mysql/migration/8.0.0-9.0.0.sql | 7 ++- .../llx_product_fournisseur_price.key.sql | 5 +++ .../tables/llx_product_fournisseur_price.sql | 2 + htdocs/langs/fr_FR/companies.lang | 1 + htdocs/product/fournisseurs.php | 45 +++++++++++++++++-- htdocs/product/list.php | 1 + 8 files changed, 87 insertions(+), 9 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index e41bcf2b5e4..c6e22a3b3a1 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2636,6 +2636,7 @@ class Form $sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,"; $sql.= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,"; $sql.= " pfp.supplier_reputation"; + if (! empty($conf->barcode->enabled)) $sql.= " ,pfp.barcode"; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product"; if ($socid) $sql.= " AND pfp.fk_soc = ".$socid; @@ -2660,7 +2661,11 @@ class Form $i++; } if (count($scrit) > 1) $sql.=")"; - if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + if (! empty($conf->barcode->enabled)){ + $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + + } $sql.=')'; } $sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC"; @@ -2780,6 +2785,10 @@ class Form $opt .= " - ".dol_trunc($objp->name, 8); $outval.=" - ".dol_trunc($objp->name, 8); } + if (! empty($conf->barcode->enabled) && !empty($objp->barcode)){ + $opt .= " - ".$objp->barcode; + $outval.=" - ".$objp->barcode; + } if ($objp->supplier_reputation) { //TODO dictionary diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 731695d8d27..1a1ebecf0f5 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -229,7 +229,7 @@ class ProductFournisseur extends Product * @param string $desc_fourn Custom description for product_fourn_price * @return int <0 if KO, >=0 if OK */ - function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges = 0, $remise_percent = 0, $remise = 0, $newnpr = 0, $delivery_time_days = 0, $supplier_reputation = '', $localtaxes_array = array(), $newdefaultvatcode = '', $multicurrency_buyprice = 0, $multicurrency_price_base_type = 'HT', $multicurrency_tx = 1, $multicurrency_code = '', $desc_fourn = '') + function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='', $barcode='', $fk_barcode_type='') { // phpcs:enable global $conf, $langs; @@ -350,7 +350,9 @@ class ProductFournisseur extends Product $sql.= " info_bits = ".$newnpr.","; $sql.= " charges = ".$charges.","; // deprecated $sql.= " delivery_time_days = ".($delivery_time_days != '' ? $delivery_time_days : 'null').","; - $sql.= " supplier_reputation = ".(empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'"); + $sql.= " supplier_reputation = ".(empty($supplier_reputation) ? 'NULL' : "'".$this->db->escape($supplier_reputation)."'").","; + $sql.= " barcode = ".(empty($barcode) ? 'NULL' : "'".$this->db->escape($barcode)."'").","; + $sql.= " fk_barcode_type = ".(empty($fk_barcode_type) ? 'NULL' : "'".$this->db->escape($fk_barcode_type)."'"); $sql.= " WHERE rowid = ".$this->product_fourn_price_id; // TODO Add price_base_type and price_ttc @@ -400,7 +402,7 @@ class ProductFournisseur extends Product // Add price for this quantity to supplier $sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_fournisseur_price("; $sql.= " multicurrency_price, multicurrency_unitprice, multicurrency_tx, fk_multicurrency, multicurrency_code,"; - $sql .= "datec, fk_product, fk_soc, ref_fourn, desc_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, fk_availability, default_vat_code, info_bits, entity, delivery_time_days, supplier_reputation)"; + $sql .= "datec, fk_product, fk_soc, ref_fourn, desc_fourn, fk_user, price, quantity, remise_percent, remise, unitprice, tva_tx, charges, fk_availability, default_vat_code, info_bits, entity, delivery_time_days, supplier_reputation, barcode, fk_barcode_type)"; $sql .= " values("; $sql.= (isset($multicurrency_buyprice)?"'".$this->db->escape(price2num($multicurrency_buyprice))."'":'null').","; $sql.= (isset($multicurrency_unitBuyPrice)?"'".$this->db->escape(price2num($multicurrency_unitBuyPrice))."'":'null').","; @@ -426,6 +428,8 @@ class ProductFournisseur extends Product $sql .= $conf->entity . ","; $sql .= $delivery_time_days . ","; $sql .= (empty($supplier_reputation) ? 'NULL' : "'" . $this->db->escape($supplier_reputation) . "'"); + $sql .= (empty($barcode) ? 'NULL' : "'" . $this->db->escape($barcode) . "'"); + $sql .= (empty($fk_barcode_type) ? 'NULL' : "'" . $this->db->escape($fk_barcode_type) . "'"); $sql .= ")"; $idinserted = 0; @@ -490,6 +494,7 @@ class ProductFournisseur extends Product $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product, pfp.charges, pfp.fk_supplier_price_expression, pfp.delivery_time_days,"; $sql.= " pfp.supplier_reputation, pfp.fk_user, pfp.datec"; $sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; + if($conf->barcode->enabled) $sql.=" ,pfp.barcode, pfp.fk_barcode_type"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.rowid = ".$rowid; @@ -529,7 +534,10 @@ class ProductFournisseur extends Product $this->fourn_multicurrency_tx = $obj->multicurrency_tx; $this->fourn_multicurrency_id = $obj->fk_multicurrency; $this->fourn_multicurrency_code = $obj->multicurrency_code; - + if($conf->barcode->enabled) { + $this->fourn_barcode = $obj->barcode; + $this->fourn_fk_barcode_type = $obj->fk_barcode_type; + } if (empty($ignore_expression) && !empty($this->fk_supplier_price_expression)) { $priceparser = new PriceParser($this->db); @@ -583,6 +591,9 @@ class ProductFournisseur extends Product $sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,"; $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,"; $sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms"; + if($conf->barcode->enabled){ + $sql.= " ,pfp.barcode, pfp.fk_barcode_type"; + } $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")"; $sql.= " AND pfp.fk_soc = s.rowid"; @@ -632,6 +643,11 @@ class ProductFournisseur extends Product $prodfourn->fourn_multicurrency_id = $record["fk_multicurrency"]; $prodfourn->fourn_multicurrency_code = $record["multicurrency_code"]; + if($conf->barcode->enabled){ + $prodfourn->barcode = $record["barcode"]; + $prodfourn->fk_barcode_type = $record["fk_barcode_type"]; + } + if (!empty($conf->dynamicprices->enabled) && !empty($prodfourn->fk_supplier_price_expression)) { $priceparser = new PriceParser($this->db); $price_result = $priceparser->parseProductSupplier($prodfourn); diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index 575573c41c9..e7054be51fd 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -279,4 +279,9 @@ ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account; ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version); - +ALTER TABLE llx_product_fournisseur_price ADD COLUMN barcode varchar(180) DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_barcode_type integer DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_barcode (barcode); +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); +ALTER TABLE llx_product_fournisseur_price ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); +ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql index 110736718d1..67817733255 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql @@ -31,3 +31,8 @@ ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fourn_price_fk_p ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fourn_price_fk_soc (fk_soc, entity); ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); + +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_barcode (barcode); +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); +ALTER TABLE llx_product_fournisseur_price ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); +ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 940967b13d4..af5aa743db2 100755 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -37,6 +37,8 @@ create table llx_product_fournisseur_price unitprice double(24,8) DEFAULT 0, -- unit price without tax charges double(24,8) DEFAULT 0, -- to store transport cost. Constant PRODUCT_CHARGES must be set to see it. default_vat_code varchar(10), + barcode varchar(180) DEFAULT NULL, -- barcode + fk_barcode_type integer DEFAULT NULL, -- barcode type tva_tx double(6,3) NOT NULL, localtax1_tx double(6,3) DEFAULT 0, localtax1_type varchar(10) NOT NULL DEFAULT '0', diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index 7a423b0b007..f88f418e8d3 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -103,6 +103,7 @@ WrongSupplierCode=Code fournisseur incorrect CustomerCodeModel=Modèle de code client SupplierCodeModel=Modèle de code fournisseur Gencod=Code-barres +GencodBuyPrice=Code-barres lié au prix d'achat ##### Professional ID ##### ProfId1Short=Id. prof. 1 ProfId2Short=Id. prof. 2 diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index c0e4c7fabb2..0be06145886 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_expression.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_parser.class.php'; - +if(!empty($conf->barcode->enabled)) dol_include_once('/core/class/html.formbarcode.class.php'); // Load translation files required by the page $langs->loadLangs(array('products', 'suppliers', 'bills', 'margins')); @@ -158,6 +158,8 @@ if (empty($reshook)) $delivery_time_days = GETPOST('delivery_time_days', 'int') ? GETPOST('delivery_time_days', 'int') : ''; $supplier_reputation = GETPOST('supplier_reputation'); $supplier_description = GETPOST('supplier_description', 'alpha'); + $barcode=GETPOST('barcode', 'alpha'); + $fk_barcode_type=GETPOST('fk_barcode_type', 'int'); if ($tva_tx == '') { @@ -258,9 +260,9 @@ if (empty($reshook)) $multicurrency_price = price2num(GETPOST("multicurrency_price", 'alpha')); $multicurrency_code = GETPOST("multicurrency_code", 'alpha'); - $ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', $multicurrency_price, $_POST["multicurrency_price_base_type"], $multicurrency_tx, $multicurrency_code, $supplier_description); + $ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', $multicurrency_price, $_POST["multicurrency_price_base_type"], $multicurrency_tx, $multicurrency_code, $supplier_description, $barcode, $fk_barcode_type); } else { - $ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', 0, 'HT', 1, '', $supplier_description); + $ret = $object->update_buyprice($quantity, $newprice, $user, $_POST["price_base_type"], $supplier, $_POST["oselDispo"], $ref_fourn, $tva_tx, $_POST["charges"], $remise_percent, 0, $npr, $delivery_time_days, $supplier_reputation, array(), '', 0, 'HT', 1, '', $supplier_description, $barcode, $fk_barcode_type); } if ($ret < 0) { @@ -666,8 +668,24 @@ SCRIPT; print ''.$langs->trans("SupplierReputation").''; echo $form->selectarray('supplier_reputation', $object->reputations, $supplier_reputation?$supplier_reputation:$object->supplier_reputation); print ''; + if(!empty($conf->barcode->enabled)) { // Option to define a transport cost on supplier price + print ''; + print '' . $langs->trans('BarcodeValue') . ''; + print ''; + print ''; + $formbarcode = new FormBarCode($db); + + // Barcode type + print ''; + print '' . $langs->trans('BarcodeType') . ''; + print ''; + print $formbarcode->selectBarcodeType(($rowid ? $object->fourn_fk_barcode_type : ''), 'fk_barcode_type', 1); + print ''; + print ''; + } + // Option to define a transport cost on supplier price if ($conf->global->PRODUCT_CHARGES) { if (! empty($conf->margin->enabled)) @@ -780,6 +798,10 @@ SCRIPT; print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center '); + if($conf->barcode->enabled) { + print_liste_field_titre("BarcodeValue", $_SERVER["PHP_SELF"], "pfp.barcode", "", $param, 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, 'align="center"', $sortfield, $sortorder); + } print_liste_field_titre(''); print "\n"; @@ -871,6 +893,23 @@ SCRIPT; } print''; + if($conf->barcode->enabled) { + // Barcode + print ''; + print $productfourn->barcode; + print ''; + + + + // Barcode type + print ''; + + $productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type:0; + $productfourn->fetch_barcode(); + print $productfourn->barcode_type_label?$productfourn->barcode_type_label:($productfourn->barcode?'
'.$langs->trans("SetDefaultBarcodeType").'
':''); + print ''; + } + if (is_object($hookmanager)) { $parameters=array('id_pfp'=>$productfourn->product_fourn_price_id,'id_fourn'=>$id_fourn,'prod_id'=>$object->id); diff --git a/htdocs/product/list.php b/htdocs/product/list.php index b37a0d31df9..a938c8e5e7f 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -142,6 +142,7 @@ if (! empty($conf->global->MAIN_MULTILANGS)) } if (! empty($conf->barcode->enabled)) { $fieldstosearchall['p.barcode']='Gencod'; + $fieldstosearchall['pfp.barcode']='GencodBuyPrice'; } if (empty($conf->global->PRODUIT_MULTIPRICES)) From 394659f84a30fa3ebc08387898a2eff4320f4584 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 20 Feb 2019 17:00:07 +0100 Subject: [PATCH 04/46] missing doc --- htdocs/fourn/class/fournisseur.product.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 1a1ebecf0f5..cc31bbdb4d5 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -227,6 +227,8 @@ class ProductFournisseur extends Product * @param float $multicurrency_tx Rate currency * @param string $multicurrency_code Currency code * @param string $desc_fourn Custom description for product_fourn_price + * @param string $barcode Barcode + * @param int $fk_barcode_type Barcode type * @return int <0 if KO, >=0 if OK */ function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='', $barcode='', $fk_barcode_type='') From f1055d0e5cc6fe91f15104df9f2c94d571797240 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 20 Feb 2019 17:09:54 +0100 Subject: [PATCH 05/46] make select2 focus to earn time during scanning --- htdocs/fourn/commande/card.php | 8 ++++++++ htdocs/fourn/facture/card.php | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 644ebd79347..e951bfa3813 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2769,6 +2769,14 @@ elseif (! empty($object->id)) } } +?> + +close(); diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 70407661d52..69ca7f85a14 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3234,6 +3234,13 @@ else } } +?> + +close(); From 95593bfaadfe27db4886ab442d12d8bb763d4192 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Thu, 21 Feb 2019 09:34:05 +0100 Subject: [PATCH 06/46] fix scan barcode only one time instead of 2 (when it was focus we need to open and then write) --- htdocs/fourn/commande/card.php | 7 ++++++- htdocs/fourn/facture/card.php | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index e951bfa3813..2aa0b3a3460 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2772,7 +2772,12 @@ elseif (! empty($object->id)) ?> Date: Thu, 21 Feb 2019 09:35:52 +0100 Subject: [PATCH 07/46] FIX blank space travis --- htdocs/core/class/html.form.class.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c6e22a3b3a1..a24cb0cab40 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2664,7 +2664,6 @@ class Form if (! empty($conf->barcode->enabled)){ $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - } $sql.=')'; } From cb3a4ac94c5cbd1582b0d234f9428a07a0a4fb9c Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Thu, 21 Feb 2019 09:47:00 +0100 Subject: [PATCH 08/46] missing 1st char --- htdocs/fourn/commande/card.php | 4 +++- htdocs/fourn/facture/card.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 2aa0b3a3460..99ce83fef1a 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2771,10 +2771,12 @@ elseif (! empty($object->id)) ?> + '; echo ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 99ce83fef1a..229d31c35a5 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2769,20 +2769,7 @@ elseif (! empty($object->id)) } } -?> - - - -close(); From e39f85ac4d3e7a33f381aafa55ed4fe282adf63c Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Thu, 21 Feb 2019 15:51:45 +0100 Subject: [PATCH 10/46] FIX js focusing --- htdocs/core/tpl/objectline_create.tpl.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 8b24d555a9a..446e81f4bae 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -280,11 +280,13 @@ else { From 1b9a2e5cfc638ac6c16a6c7ddcbfebc9a8794101 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 27 Feb 2019 09:27:15 +0100 Subject: [PATCH 11/46] FIX migration 9 to 10 --- htdocs/install/mysql/migration/8.0.0-9.0.0.sql | 6 ------ htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index e7054be51fd..df370e0f54f 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -279,9 +279,3 @@ ALTER TABLE llx_accounting_account DROP INDEX uk_accounting_account; ALTER TABLE llx_accounting_account ADD UNIQUE INDEX uk_accounting_account (account_number, entity, fk_pcg_version); -ALTER TABLE llx_product_fournisseur_price ADD COLUMN barcode varchar(180) DEFAULT NULL; -ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_barcode_type integer DEFAULT NULL; -ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_barcode (barcode); -ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); -ALTER TABLE llx_product_fournisseur_price ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); -ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index fe7cdb9faf6..3d6d995eebd 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -229,3 +229,10 @@ ALTER TABLE llx_bom_bom ADD INDEX idx_bom_bom_fk_product (fk_product); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_rowid (rowid); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_product (fk_product); ALTER TABLE llx_bom_bomline ADD INDEX idx_bom_bomline_fk_bom (fk_bom); + +ALTER TABLE llx_product_fournisseur_price ADD COLUMN barcode varchar(180) DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD COLUMN fk_barcode_type integer DEFAULT NULL; +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_barcode (barcode); +ALTER TABLE llx_product_fournisseur_price ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); +ALTER TABLE llx_product_fournisseur_price ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); +ALTER TABLE llx_product_fournisseur_price ADD CONSTRAINT fk_product_fournisseur_price_barcode_type FOREIGN KEY (fk_barcode_type) REFERENCES llx_c_barcode_type (rowid); From 7dcdbe64773aa8361fb4829a4c434e089f88f911 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:04:57 +0100 Subject: [PATCH 12/46] update with html5 compliant code --- htdocs/bom/bom_list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index b0ffd62155c..baa2ced0c4a 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -387,7 +387,7 @@ $parameters=array('arrayfields'=>$arrayfields); $reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print ''; +print ''; $searchpicto=$form->showFilterButtons(); print $searchpicto; print ''; @@ -509,7 +509,7 @@ if (isset($totalarray['pos'])) while ($i < $totalarray['nbfield']) { $i++; - if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).''; + if (! empty($totalarray['pos'][$i])) print ''.price($totalarray['val'][$totalarray['pos'][$i]]).''; else { if ($i == 1) From 43b827aae77054f3c9ef0e204f3f16d60492c540 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:07:26 +0100 Subject: [PATCH 13/46] update with html5 compliant code --- htdocs/comm/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index cfe6ff817f7..c4ec266d454 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -7,7 +7,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2013 Alexandre Spangaro - * Copyright (C) 2015-2019 Frédéric France + * Copyright (C) 2015-2019 Frédéric France * Copyright (C) 2015 Marcos García * * This program is free software; you can redistribute it and/or modify @@ -386,7 +386,7 @@ if ($object->id > 0) print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; } else { print ''; - print ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; // Parametrage du prefix suppliers $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; $texte.= '
'; print $langs->trans("CustomerRelativeDiscountShort"); - print ''; + print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { print ''.img_edit($langs->trans("Modify")).''; @@ -400,7 +400,7 @@ if ($object->id > 0) print ''; print ''; // Opp status - print ''; // Opp percent - print ''; // Status - print ''; + print ''; print ''; } @@ -887,7 +887,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') 't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10), 't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20), 't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30), - 't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>40, 'align'=>'center'), + 't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>40, 'class'=>'center'), ); // Extra fields if (is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) From 0832e9873caf6b7909ee292cbf79456f372c8060 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:10:41 +0100 Subject: [PATCH 15/46] update with html5 compliant code --- htdocs/core/lib/doleditor.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index ef58497ccdd..e2c863cd2ba 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -64,7 +64,7 @@ function show_skin($fuser, $edit = 0) // Title print ''; - print '
'; print $langs->trans("CustomerAbsoluteDiscountShort"); - print ''; + print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { print ''.img_edit($langs->trans("Modify")).''; From 63b1a1459bd9954f7726bfc7ff1fa50c48ad8984 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:09:54 +0100 Subject: [PATCH 14/46] update with html5 compliant code --- htdocs/core/lib/company.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 94707467166..1dda075afe6 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -800,15 +800,15 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel } print ''; + print ''; if ($obj->opp_status_code) print $langs->trans("OppStatus".$obj->opp_status_code); print ''; + print ''; if ($obj->opp_percent) print price($obj->opp_percent, 1, '', 1, 0).'%'; print ''.$projecttmp->getLibStatut(5).''.$projecttmp->getLibStatut(5).'
'.$langs->trans("DefaultSkin").''; + print ''; $url='http://ckeditor.com/addons/skins/all'; /*print ''; print $langs->trans('DownloadMoreSkins'); @@ -84,7 +84,7 @@ function show_skin($fuser, $edit = 0) // print '
'; - print ''; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; if (! empty($conf->stock->enabled)) { print ''; @@ -236,8 +236,8 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') if (! empty($conf->livraison_bon->enabled)) { print ''; - //print ''; - print ''; + //print ''; + print ''; } print "\n"; @@ -248,7 +248,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; // Sending id - print ''; @@ -324,16 +324,16 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print "\n"; } - //print ''; + //print ''; // Date creation - print ''; + print ''; // Date shipping creation - print ''; + print ''; // Qty shipped - print ''; + print ''; // Warehouse if (! empty($conf->stock->enabled)) @@ -403,13 +403,13 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') //print ''.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.''; print ''; // Qty received - //print ''; // Date shipping real - print ''; } From d506cf7700655e97d699f8804e1d4bcbb835ad80 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:21:54 +0100 Subject: [PATCH 19/46] update with html5 compliant code --- htdocs/core/lib/treeview.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index eacf0386eb5..34683e5b29f 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -171,7 +171,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset print '   '; print $tab[$x]['title']; print '  (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')'; - print '
'; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; // Customer proposals @@ -339,11 +339,11 @@ function show_stats_for_company($product, $socid) $langs->load("propal"); print ''; print ''; @@ -357,11 +357,11 @@ function show_stats_for_company($product, $socid) $langs->load("propal"); print ''; print ''; @@ -375,11 +375,11 @@ function show_stats_for_company($product, $socid) $langs->load("orders"); print ''; print ''; @@ -393,11 +393,11 @@ function show_stats_for_company($product, $socid) $langs->load("orders"); print ''; print ''; @@ -411,11 +411,11 @@ function show_stats_for_company($product, $socid) $langs->load("bills"); print ''; print ''; @@ -429,11 +429,11 @@ function show_stats_for_company($product, $socid) $langs->load("bills"); print ''; print ''; @@ -448,11 +448,11 @@ function show_stats_for_company($product, $socid) $langs->load("contracts"); print ''; print ''; From 38822a9bb13a2110b5a26cb26cb5e3812d89191a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:18:44 +0100 Subject: [PATCH 17/46] update with html5 compliant code --- htdocs/core/lib/project.lib.php | 78 ++++++++++++++++----------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index 83072279268..92df28d9922 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -489,12 +489,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print "\n"; // Date start - print ''; // Date end - print ''; // Time spent - print ''; // Progress calculated (Note: ->duration is time spent) - print ''; // Progress declared - print ''; + print ''; } print "\n"; @@ -605,15 +605,15 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; print ''; print ''; - print ''; - print ''; - print ''; print ''; @@ -773,7 +773,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec print "\n"; // Date - print ''; @@ -794,7 +794,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec } // Hour - print ''; @@ -804,7 +804,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon '; // Duration - print ''; // Note - print ''; // Warning - print '\n"; // Planned Workload - print ''; // Progress declared % - print ''; // Time spent by everybody - print '\n"; // Time spent by user - print ''; @@ -1097,13 +1097,13 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print ''; // Note - print ''; // Warning - print '\n"; // Planned Workload - print ''; // Progress declared % - print ''; // Time spent by everybody - print '\n"; // Time spent by user - print ''; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print ''; - print ''; } if (empty($conf->global->PROJECT_HIDE_TASKS)) { - print ''; + print ''; $plannedworkload=$objp->planned_workload; $total_plannedworkload+=$plannedworkload; if (! in_array('plannedworkload', $hiddenfields)) { - print ''; + print ''; } if (! in_array('declaredprogress', $hiddenfields)) { $declaredprogressworkload=$objp->declared_progess_workload; $total_declaredprogressworkload+=$declaredprogressworkload; - print ''; } } - print ''; + print ''; print "\n"; $total_task = $total_task + $objp->nb; @@ -1673,14 +1673,14 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print '"; if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { - print ''; - print ''; + print ''; + print ''; } if (empty($conf->global->PROJECT_HIDE_TASKS)) { - print ''; - if (! in_array('plannedworkload', $hiddenfields)) print ''; - if (! in_array('declaredprogress', $hiddenfields)) print ''; + print ''; + if (! in_array('plannedworkload', $hiddenfields)) print ''; + if (! in_array('declaredprogress', $hiddenfields)) print ''; } print ''; print ''; @@ -1702,7 +1702,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print '
'; $i=0; foreach($dirskins as $dir) From 6984cd25d8025ca0b15ae253840407402535c800 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:11:43 +0100 Subject: [PATCH 16/46] update with html5 compliant code --- htdocs/core/lib/product.lib.php | 50 ++++++++++++++++----------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 162bee68128..9592cd7fb16 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -324,10 +324,10 @@ function show_stats_for_company($product, $socid) $nblines = 0; print '
'.$langs->trans("Referers").''.$langs->trans("NbOfThirdParties").''.$langs->trans("NbOfObjectReferers").''.$langs->trans("TotalQuantity").''.$langs->trans("Referers").''.$langs->trans("NbOfThirdParties").''.$langs->trans("NbOfObjectReferers").''.$langs->trans("TotalQuantity").'
'; print ''.img_object('', 'propal').' '.$langs->trans("Proposals").''; - print ''; + print ''; print $product->stats_propale['customers']; - print ''; + print ''; print $product->stats_propale['nb']; - print ''; + print ''; print $product->stats_propale['qty']; print '
'; print ''.img_object('', 'propal').' '.$langs->trans("SupplierProposals").''; - print ''; + print ''; print $product->stats_proposal_supplier['suppliers']; - print ''; + print ''; print $product->stats_proposal_supplier['nb']; - print ''; + print ''; print $product->stats_proposal_supplier['qty']; print '
'; print ''.img_object('', 'order').' '.$langs->trans("CustomersOrders").''; - print ''; + print ''; print $product->stats_commande['customers']; - print ''; + print ''; print $product->stats_commande['nb']; - print ''; + print ''; print $product->stats_commande['qty']; print '
'; print ''.img_object('', 'order').' '.$langs->trans("SuppliersOrders").''; - print ''; + print ''; print $product->stats_commande_fournisseur['suppliers']; - print ''; + print ''; print $product->stats_commande_fournisseur['nb']; - print ''; + print ''; print $product->stats_commande_fournisseur['qty']; print '
'; print ''.img_object('', 'bill').' '.$langs->trans("CustomersInvoices").''; - print ''; + print ''; print $product->stats_facture['customers']; - print ''; + print ''; print $product->stats_facture['nb']; - print ''; + print ''; print $product->stats_facture['qty']; print '
'; print ''.img_object('', 'bill').' '.$langs->trans("SuppliersInvoices").''; - print ''; + print ''; print $product->stats_facture_fournisseur['suppliers']; - print ''; + print ''; print $product->stats_facture_fournisseur['nb']; - print ''; + print ''; print $product->stats_facture_fournisseur['qty']; print '
'; print ''.img_object('', 'contract').' '.$langs->trans("Contracts").''; - print ''; + print ''; print $product->stats_contrat['customers']; - print ''; + print ''; print $product->stats_contrat['nb']; - print ''; + print ''; print $product->stats_contrat['qty']; print '
'; + print ''; print dol_print_date($lines[$i]->date_start, 'dayhour'); print ''; + print ''; $taskstatic->projectstatus = $lines[$i]->projectstatus; $taskstatic->progress = $lines[$i]->progress; $taskstatic->fk_statut = $lines[$i]->status; @@ -509,7 +509,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if (! empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat=$conf->global->PROJECT_TIME_SPENT_FORMAT; // Planned Workload (in working hours) - print ''; + print ''; $fullhour=convertSecondToTime($lines[$i]->planned_workload, $plannedworkloadoutputformat); $workingdelay=convertSecondToTime($lines[$i]->planned_workload, 'all', 86400, 7); // TODO Replace 86400 and 7 to take account working hours per day and working day per weeks if ($lines[$i]->planned_workload != '') @@ -522,7 +522,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; + print ''; if ($showlineingray) print ''; else print ''; if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration, $timespentoutputformat); @@ -532,7 +532,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; + print ''; if ($lines[$i]->planned_workload || $lines[$i]->duration) { if ($lines[$i]->planned_workload) print round(100 * $lines[$i]->duration / $lines[$i]->planned_workload, 2).' %'; @@ -541,7 +541,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t print ''; + print ''; if ($lines[$i]->progress != '') { print $lines[$i]->progress.' %'; @@ -572,7 +572,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t // Tick to drag and drop if ($addordertick) { - print '  
'; + print ''; print convertSecondToTime($total_projectlinesa_planned, 'allhourmin'); print ''; + print ''; if ($projectidfortotallink > 0) print ''; print convertSecondToTime($total_projectlinesa_spent, 'allhourmin'); if ($projectidfortotallink > 0) print ''; print ''; + print ''; if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2).' %'; print ''; + print ''; print dol_print_date($lines[$i]->timespent_datehour, 'day'); print ''; + print ''; print dol_print_date($lines[$i]->timespent_datehour, 'hour'); print ''; + print ''; $dayWorkLoad = $lines[$i]->timespent_duration; $totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration; @@ -825,14 +825,14 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec print ''; + print ''; print ''; print ''; + print ''; /*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject")); else if ($disabledtask) { @@ -1001,18 +1001,18 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print "'; + print ''; if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); else print '--:--'; print ''; + print ''; print $formother->select_percent($lines[$i]->progress, $lines[$i]->id . 'progress'); print ''; + print ''; // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user if ($lines[$i]->duration) { @@ -1024,7 +1024,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print "'; + print ''; $tmptimespent=$taskstatic->getSummaryOfTimeSpent($fuser->id); if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); else print '--:--'; @@ -1047,7 +1047,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr } // Form to add new time - print ''; + print ''; $tableCell = $form->selectDate($preselectedday, $lines[$i]->id, 1, 1, 2, "addtime", 0, 0, $disabledtask); print $tableCell; print ''; + print ''; print ''; print ''; + print ''; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); elseif ($disabledtask) { @@ -1291,18 +1291,18 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print "'; + print ''; if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin'); else print '--:--'; print ''; + print ''; print $formother->select_percent($lines[$i]->progress, $lines[$i]->id . 'progress'); print ''; + print ''; // $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user if ($lines[$i]->duration) { @@ -1314,7 +1314,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print "'; + print ''; $tmptimespent=$taskstatic->getSummaryOfTimeSpent($fuser->id); if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin'); else print '--:--'; @@ -1381,7 +1381,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ } // Warning - print ''; + print ''; if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject")); elseif ($disabledtask) { @@ -1629,36 +1629,36 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print ''; + print ''; if ($objp->opp_amount) print price($objp->opp_amount, 0, '', 1, -1, -1, $conf->currency); print ''; + print ''; $code = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code'); if ($code) print $langs->trans("OppStatus".$code); print ''.$objp->nb.''.$objp->nb.''.($plannedworkload?convertSecondToTime($plannedworkload):'').''.($plannedworkload?convertSecondToTime($plannedworkload):'').''; + print ''; //print $objp->planned_workload.'-'.$objp->declared_progess_workload."
"; print ($plannedworkload?round(100*$declaredprogressworkload/$plannedworkload, 0).'%':''); print '
'.$projectstatic->getLibStatut(3).''.$projectstatic->getLibStatut(3).'
'.$langs->trans("Total")."'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).''.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).''.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).''.$total_task.''.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').''.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload, 0).'%':'').''.$total_task.''.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').''.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload, 0).'%':'').'
'; print ''; print ''; - print '\n"; print '
'.$langs->trans("Year").''; + print ''; print "
'; } From 68c6c0513d42f1c4abf19bd4ae247f58d2c20009 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:20:32 +0100 Subject: [PATCH 18/46] update with html5 compliant code --- htdocs/core/lib/sendings.lib.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index cc7d2c95115..97d8a318e5c 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -220,9 +220,9 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') //print '
'.$langs->trans("QtyOrdered").''.$langs->trans("SendingSheet").''.$langs->trans("Description").''.$langs->trans("DateCreation").''.$langs->trans("DateDeliveryPlanned").''.$langs->trans("QtyPreparedOrShipped").''.$langs->trans("DateCreation").''.$langs->trans("DateDeliveryPlanned").''.$langs->trans("QtyPreparedOrShipped").''.$langs->trans("Warehouse").''.$langs->trans("DeliveryOrder").''.$langs->trans("QtyReceived").''.$langs->trans("DeliveryDate").''.$langs->trans("QtyReceived").''.$langs->trans("DeliveryDate").'
'; + print ''; print ''.img_object($langs->trans("ShowSending"), 'sending').' '.$objp->exp_ref.''; print ''.$objp->qty_asked.''.$objp->qty_asked.''.dol_print_date($db->jdate($objp->date_creation), 'day').''.dol_print_date($db->jdate($objp->date_creation), 'day').''.dol_print_date($db->jdate($objp->date_delivery), 'day').''.dol_print_date($db->jdate($objp->date_delivery), 'day').''.$objp->qty_shipped.''.$objp->qty_shipped.''; + //print ''; // TODO No solution for the moment to link a line det of receipt with a line det of shipping, // so no way to know the qty received for this line of shipping. //print $langs->trans("FeatureNotYetAvailable"); //print ''; + print ''; print dol_print_date($receiving->date_delivery, 'day'); print ''; + print ''; print $tab[$x]['buttons']; print '
'; } @@ -207,7 +207,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset print $tab[$x]['title']; print ''; print '  (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')'; - print '
'; + print ''; print $tab[$x]['buttons']; print '
'; } From 27b7ec82025c4335897530e23cdeb79f74a9f612 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:24:17 +0100 Subject: [PATCH 20/46] update with html5 compliant code --- htdocs/core/lib/usergroups.lib.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index de85a573cab..8e45308d3e8 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -343,14 +343,14 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("DefaultSkin").''.$conf->global->MAIN_THEME.' '.$langs->trans("UsePersonalValue").' '.$langs->trans("UsePersonalValue").' 
'.$langs->trans("DefaultSkin").''; + print ''; $url='https://www.dolistore.com/lang-en/4-skins'; if (preg_match('/fr/i', $langs->defaultlang)) $url='https://www.dolistore.com/fr/4-themes'; //if (preg_match('/es/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-es/4-themes'; @@ -372,7 +372,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'; - print ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From b4a9b3aa205bdd8443017b8485d5afa93a487e8a Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:30:08 +0100 Subject: [PATCH 28/46] update with html5 compliant code --- htdocs/core/modules/project/mod_project_universal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/mod_project_universal.php b/htdocs/core/modules/project/mod_project_universal.php index f987d4d3b32..be8a9c3f362 100644 --- a/htdocs/core/modules/project/mod_project_universal.php +++ b/htdocs/core/modules/project/mod_project_universal.php @@ -83,9 +83,9 @@ class mod_project_universal extends ModeleNumRefProjects // Parametrage du prefix $texte.= ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From f13d52083088429f42f98fe4a84de686860a62da Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:30:41 +0100 Subject: [PATCH 29/46] update with html5 compliant code --- htdocs/core/modules/propale/mod_propale_saphir.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/mod_propale_saphir.php b/htdocs/core/modules/propale/mod_propale_saphir.php index 972bb94cb64..ddf856d5003 100644 --- a/htdocs/core/modules/propale/mod_propale_saphir.php +++ b/htdocs/core/modules/propale/mod_propale_saphir.php @@ -85,9 +85,9 @@ class mod_propale_saphir extends ModeleNumRefPropales // Parametrage du prefix $texte.= ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From f71769e0e668a7b5c6750904ae377b192af88f57 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:31:08 +0100 Subject: [PATCH 30/46] update with html5 compliant code --- htdocs/core/modules/reception/mod_reception_moonstone.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/reception/mod_reception_moonstone.php b/htdocs/core/modules/reception/mod_reception_moonstone.php index 6f7d66f8ef3..84b35cb7771 100644 --- a/htdocs/core/modules/reception/mod_reception_moonstone.php +++ b/htdocs/core/modules/reception/mod_reception_moonstone.php @@ -60,8 +60,8 @@ class mod_reception_moonstone extends ModelNumRefReception $tooltip.=$langs->trans("GenericMaskCodes5"); $texte.= ''; - $texte.= ''; - $texte.= ''; + $texte.= ''; + $texte.= ''; $texte.= ''; $texte.= '
'; + print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; @@ -857,7 +857,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; print ''; - print ''; + print ''; print ''; From 6b878a2c64e3a9070958711337da69c8c9df7b59 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:25:21 +0100 Subject: [PATCH 21/46] update with html5 compliant code --- htdocs/core/modules/dons/html_cerfafr.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/dons/html_cerfafr.html b/htdocs/core/modules/dons/html_cerfafr.html index 614f22cf998..65408d80863 100644 --- a/htdocs/core/modules/dons/html_cerfafr.html +++ b/htdocs/core/modules/dons/html_cerfafr.html @@ -275,7 +275,7 @@
'; $i=0; foreach($dirthemes as $dir) @@ -432,7 +432,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuDisableImages").''.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).'conf->THEME_ELDY_TEXTLINK)?" checked":""); + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -477,7 +477,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -524,7 +524,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -573,7 +573,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_VERMENU_BACK1:$langs->trans("Default")).'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); + print 'conf->THEME_ELDY_TOPMENU_BACK1)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -763,7 +763,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("TopMenuBackgroundColor").''.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTLINK:$langs->trans("Default")).'conf->THEME_ELDY_TEXTLINK)?" checked":""); + print 'conf->THEME_ELDY_TEXTLINK)?" checked":""); print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo print '> '.$langs->trans("UsePersonalValue").''; @@ -814,7 +814,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false) print '
'.$langs->trans("HighlightLinesOnMouseHover").'global->THEME_ELDY_USE_HOVER?" checked":"").'> '.$langs->trans("UsePersonalValue").' '.$langs->trans("UsePersonalValue").''; print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '
'.$langs->trans("HighlightLinesOnMouseHover").'global->THEME_ELDY_USE_HOVER?" checked":"").'> '.$langs->trans("UsePersonalValue").' '.$langs->trans("UsePersonalValue").''; print '   ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '
- '; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From 310670b3f606fc1f17b9e4f04ffcce35a52f37ad Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:27:54 +0100 Subject: [PATCH 25/46] update with html5 compliant code --- htdocs/core/modules/payment/mod_payment_ant.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/payment/mod_payment_ant.php b/htdocs/core/modules/payment/mod_payment_ant.php index 19e74cf3c19..2f3114bfd09 100644 --- a/htdocs/core/modules/payment/mod_payment_ant.php +++ b/htdocs/core/modules/payment/mod_payment_ant.php @@ -82,9 +82,9 @@ class mod_payment_ant extends ModeleNumRefPayments // Parametrage du prefix $texte.= ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From 6c4070eb87bcda41f293a73cf715f8767574a874 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:28:36 +0100 Subject: [PATCH 26/46] update with html5 compliant code --- htdocs/core/modules/product/mod_codeproduct_elephant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/product/mod_codeproduct_elephant.php b/htdocs/core/modules/product/mod_codeproduct_elephant.php index 97a00a14575..e7e20db532f 100644 --- a/htdocs/core/modules/product/mod_codeproduct_elephant.php +++ b/htdocs/core/modules/product/mod_codeproduct_elephant.php @@ -113,15 +113,15 @@ class mod_codeproduct_elephant extends ModeleProductCode // Parametrage du prefix customers $texte.= ''; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; // Parametrage du prefix suppliers $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; $texte.= '
+ '; - $texte.= ''; + $texte.= ''; - $texte.= ''; + $texte.= ''; $texte.= ''; From af4edbba2b11a012cbbf0f81378d0f1c743f580f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:26:43 +0100 Subject: [PATCH 23/46] update with html5 compliant code --- htdocs/core/modules/holiday/mod_holiday_immaculate.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/holiday/mod_holiday_immaculate.php b/htdocs/core/modules/holiday/mod_holiday_immaculate.php index 8c6fd9ebe97..9d1fa644c0a 100644 --- a/htdocs/core/modules/holiday/mod_holiday_immaculate.php +++ b/htdocs/core/modules/holiday/mod_holiday_immaculate.php @@ -82,8 +82,8 @@ class mod_holiday_immaculate extends ModelNumRefHolidays $tooltip.=$langs->trans("GenericMaskCodes5"); $texte.= ''; - $texte.= ''; - $texte.= ''; + $texte.= ''; + $texte.= ''; $texte.= ''; $texte.= '
Date et signature

From d21dbe915b17cc7ed9cc477d07b1083d9ae44d3e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:26:08 +0100 Subject: [PATCH 22/46] update with html5 compliant code --- htdocs/core/modules/fichinter/mod_arctic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/fichinter/mod_arctic.php b/htdocs/core/modules/fichinter/mod_arctic.php index 25b98473238..db7b2febbb2 100644 --- a/htdocs/core/modules/fichinter/mod_arctic.php +++ b/htdocs/core/modules/fichinter/mod_arctic.php @@ -84,9 +84,9 @@ class mod_arctic extends ModeleNumRefFicheinter // Parametrage du prefix $texte.= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '.$form->textwithpicto('', $tooltip, 1, 1).' 
'; $texte.= ''; From f082bd3e964ea243422c8c867d2b703dacbb3b02 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:27:16 +0100 Subject: [PATCH 24/46] update with html5 compliant code --- htdocs/core/modules/livraison/mod_livraison_saphir.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/livraison/mod_livraison_saphir.php b/htdocs/core/modules/livraison/mod_livraison_saphir.php index 2fc2e16d7fd..b8f00725858 100644 --- a/htdocs/core/modules/livraison/mod_livraison_saphir.php +++ b/htdocs/core/modules/livraison/mod_livraison_saphir.php @@ -83,9 +83,9 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder // Parametrage du prefix $texte.= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").' ('.$langs->trans("ProductCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").' ('.$langs->trans("ServiceCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'
'; From 5977cdad2612c97261781e833607d94598f67b81 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:29:16 +0100 Subject: [PATCH 27/46] update with html5 compliant code --- htdocs/core/modules/project/task/mod_task_universal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index f1d295802a9..a9dc2846ad6 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -83,9 +83,9 @@ class mod_task_universal extends ModeleNumRefTask // Parametrage du prefix $texte.= '
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).'  '.$form->textwithpicto('', $tooltip, 1, 1).' 
'; $texte.= ''; From 80858b39d9e7b267ee37afd61cbc58e50b103ca4 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:31:40 +0100 Subject: [PATCH 31/46] update with html5 compliant code --- htdocs/core/modules/societe/mod_codeclient_elephant.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/societe/mod_codeclient_elephant.php b/htdocs/core/modules/societe/mod_codeclient_elephant.php index f8d4f137048..4be4ea5d50e 100644 --- a/htdocs/core/modules/societe/mod_codeclient_elephant.php +++ b/htdocs/core/modules/societe/mod_codeclient_elephant.php @@ -114,15 +114,15 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode // Parametrage du prefix customers $texte.= '
'.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'   
'.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):'.$form->textwithpicto('', $tooltip, 1, 1).''.$form->textwithpicto('', $tooltip, 1, 1).'
'; From ad9f75d3e9f6d8e090aa8a2af2dfef6c3216229f Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:32:26 +0100 Subject: [PATCH 32/46] update with html5 compliant code --- .../supplier_invoice/mod_facture_fournisseur_tulip.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 7f85cbe5bb6..8ab95ab3336 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -93,28 +93,28 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices // Parametrage du prefix $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')'; $texte.= ':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; // Parametrage du prefix des avoirs $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; if ($conf->global->MAIN_FEATURE_LEVEL >= 2) { // Parametrage du prefix des replacement $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; // Parametrage du prefix des acomptes $texte.= ''.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte.= ''; } From 9ee27936f728bf9374f90f3bd06fcbb72664fd90 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:33:00 +0100 Subject: [PATCH 33/46] update with html5 compliant code --- .../supplier_order/mod_commande_fournisseur_orchidee.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php index 320c33dce7d..1d1bc920237 100644 --- a/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php +++ b/htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php @@ -85,9 +85,9 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; From 756bdfc6a8a64c378b1aeac0107c32abb5fc61be Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:33:36 +0100 Subject: [PATCH 34/46] update with html5 compliant code --- .../supplier_payment/mod_supplier_payment_brodator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php index c1f6e003d6d..2b29a18e2f0 100644 --- a/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php +++ b/htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php @@ -82,9 +82,9 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; From 719ecde6e901c378539ad4204ebe52ad26d04e04 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:34:04 +0100 Subject: [PATCH 35/46] update with html5 compliant code --- .../supplier_proposal/mod_supplier_proposal_saphir.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php index f8cd365d5a7..d3a9de6c72b 100644 --- a/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php +++ b/htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php @@ -85,9 +85,9 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal // Parametrage du prefix $texte.= ''.$langs->trans("Mask").':'; - $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte.= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte.= '  '; + $texte.= '  '; $texte.= ''; From 3d65b887a7b192be4ab9e40dd7d14a88f21501cd Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 14 Mar 2019 14:34:33 +0100 Subject: [PATCH 36/46] update with html5 compliant code --- htdocs/core/modules/ticket/mod_ticket_universal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/ticket/mod_ticket_universal.php b/htdocs/core/modules/ticket/mod_ticket_universal.php index f33042aca67..deb7c4481cc 100644 --- a/htdocs/core/modules/ticket/mod_ticket_universal.php +++ b/htdocs/core/modules/ticket/mod_ticket_universal.php @@ -81,9 +81,9 @@ class mod_ticket_universal extends ModeleNumRefTicket // Parametrage du prefix $texte .= '' . $langs->trans("Mask") . ':'; - $texte .= '' . $form->textwithpicto('', $tooltip, 1, 1) . ''; + $texte .= '' . $form->textwithpicto('', $tooltip, 1, 1) . ''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; From c6b3d81d618dc617134c4069e64d3470db4f6125 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:35:44 +0100 Subject: [PATCH 37/46] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index a24cb0cab40..f049f7ba800 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2663,7 +2663,7 @@ class Form if (count($scrit) > 1) $sql.=")"; if (! empty($conf->barcode->enabled)){ $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + if (! empty($conf->global->BARCODE_USE_BARCODE_FOR_SUPPLIER_PRICES)) $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; } $sql.=')'; } From 69bfac7eef97abd49f8efcd805c1937d7828a8c7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:36:35 +0100 Subject: [PATCH 38/46] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index f049f7ba800..3ef8b1426f8 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2784,7 +2784,8 @@ class Form $opt .= " - ".dol_trunc($objp->name, 8); $outval.=" - ".dol_trunc($objp->name, 8); } - if (! empty($conf->barcode->enabled) && !empty($objp->barcode)){ + if (! empty($conf->barcode->enabled) && !empty($objp->barcode) && ! empty($conf->global->BARCODE_USE_BARCODE_FOR_SUPPLIER_PRICES)) + { $opt .= " - ".$objp->barcode; $outval.=" - ".$objp->barcode; } From dd962fa044e3d4f3bfde8981f71ed1a481477866 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:39:01 +0100 Subject: [PATCH 39/46] Update fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index cc31bbdb4d5..903f846d1f3 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -231,7 +231,7 @@ class ProductFournisseur extends Product * @param int $fk_barcode_type Barcode type * @return int <0 if KO, >=0 if OK */ - function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges=0, $remise_percent=0, $remise=0, $newnpr=0, $delivery_time_days=0, $supplier_reputation='', $localtaxes_array=array(), $newdefaultvatcode='', $multicurrency_buyprice=0, $multicurrency_price_base_type='HT',$multicurrency_tx=1,$multicurrency_code='', $desc_fourn='', $barcode='', $fk_barcode_type='') + function update_buyprice($qty, $buyprice, $user, $price_base_type, $fourn, $availability, $ref_fourn, $tva_tx, $charges = 0, $remise_percent = 0, $remise = 0, $newnpr = 0, $delivery_time_days = 0, $supplier_reputation = '', $localtaxes_array = array(), $newdefaultvatcode = '', $multicurrency_buyprice = 0, $multicurrency_price_base_type = 'HT', $multicurrency_tx = 1, $multicurrency_code = '', $desc_fourn = '', $barcode='', $fk_barcode_type='') { // phpcs:enable global $conf, $langs; From 250e0bbaac2d6857d49bb6c1b85f25f3134abca9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:40:39 +0100 Subject: [PATCH 40/46] Update fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 903f846d1f3..a4dbace29b4 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -592,10 +592,8 @@ class ProductFournisseur extends Product $sql = "SELECT s.nom as supplier_name, s.rowid as fourn_id,"; $sql.= " pfp.rowid as product_fourn_pri_id, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product as product_fourn_id, pfp.fk_supplier_price_expression,"; $sql.= " pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.fk_availability, pfp.charges, pfp.info_bits, pfp.delivery_time_days, pfp.supplier_reputation,"; - $sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms"; - if($conf->barcode->enabled){ - $sql.= " ,pfp.barcode, pfp.fk_barcode_type"; - } + $sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code, pfp.datec, pfp.tms,"; + $sql.= " pfp.barcode, pfp.fk_barcode_type"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp, ".MAIN_DB_PREFIX."societe as s"; $sql.= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")"; $sql.= " AND pfp.fk_soc = s.rowid"; From 60db66d2bff1984886a17f704232a8fb21f3e21e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:41:33 +0100 Subject: [PATCH 41/46] Update fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index a4dbace29b4..32776e5418f 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -494,9 +494,9 @@ class ProductFournisseur extends Product $sql = "SELECT pfp.rowid, pfp.price, pfp.quantity, pfp.unitprice, pfp.remise_percent, pfp.remise, pfp.tva_tx, pfp.default_vat_code, pfp.info_bits as fourn_tva_npr, pfp.fk_availability,"; $sql.= " pfp.fk_soc, pfp.ref_fourn, pfp.desc_fourn, pfp.fk_product, pfp.charges, pfp.fk_supplier_price_expression, pfp.delivery_time_days,"; - $sql.= " pfp.supplier_reputation, pfp.fk_user, pfp.datec"; - $sql.= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code"; - if($conf->barcode->enabled) $sql.=" ,pfp.barcode, pfp.fk_barcode_type"; + $sql.= " pfp.supplier_reputation, pfp.fk_user, pfp.datec,"; + $sql.= " pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code,"; + $sql.=" pfp.barcode, pfp.fk_barcode_type"; $sql.= " FROM ".MAIN_DB_PREFIX."product_fournisseur_price as pfp"; $sql.= " WHERE pfp.rowid = ".$rowid; From f50638b7d84b39e511a3162beaa5229fc8f15acf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 17:44:54 +0100 Subject: [PATCH 42/46] Update html.form.class.php --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 3ef8b1426f8..8cfce60797a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -2663,7 +2663,7 @@ class Form if (count($scrit) > 1) $sql.=")"; if (! empty($conf->barcode->enabled)){ $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; - if (! empty($conf->global->BARCODE_USE_BARCODE_FOR_SUPPLIER_PRICES)) $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; + $sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'"; } $sql.=')'; } @@ -2784,7 +2784,7 @@ class Form $opt .= " - ".dol_trunc($objp->name, 8); $outval.=" - ".dol_trunc($objp->name, 8); } - if (! empty($conf->barcode->enabled) && !empty($objp->barcode) && ! empty($conf->global->BARCODE_USE_BARCODE_FOR_SUPPLIER_PRICES)) + if (! empty($conf->barcode->enabled) && !empty($objp->barcode)) { $opt .= " - ".$objp->barcode; $outval.=" - ".$objp->barcode; From 5aee322b30f25b792e2102dc18a10fa4bb0faa34 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 18:36:05 +0100 Subject: [PATCH 43/46] Update fournisseurs.php --- htdocs/product/fournisseurs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index b63c22482b4..21163f0b54e 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -754,7 +754,7 @@ SCRIPT; print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, 'align="right"', $sortfield, $sortorder); } print_liste_field_titre("DiscountQtyMin",$_SERVER["PHP_SELF"],'','',$param,'align="right"',$sortfield,$sortorder); - print_liste_field_titre("PriceUpdate",$_SERVER["PHP_SELF"],"pfp.date_modification","",$param,'align="right"',$sortfield,$sortorder); + print_liste_field_titre("PriceUpdate",$_SERVER["PHP_SELF"],"pfp.tms","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre("NbDaysToDelivery",$_SERVER["PHP_SELF"],"pfp.delivery_time_days","",$param,'align="right"',$sortfield,$sortorder); print_liste_field_titre("ReputationForThisProduct",$_SERVER["PHP_SELF"],"pfp.supplier_reputation","",$param,'align="center"',$sortfield,$sortorder); print_liste_field_titre(''); From 463c83efec449dca40d654a9e7466cb27375527e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 18:37:03 +0100 Subject: [PATCH 44/46] Update fournisseur.product.class.php --- htdocs/fourn/class/fournisseur.product.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index dc04139232c..fc16a3e6922 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -568,7 +568,7 @@ class ProductFournisseur extends Product $prodfourn->fourn_tva_npr = $record["info_bits"]; $prodfourn->fk_supplier_price_expression = $record["fk_supplier_price_expression"]; $prodfourn->supplier_reputation = $record["supplier_reputation"]; - $prodfourn->date_modification = $this->db->jdate($record["date_modification"]); + $prodfourn->fourn_date_modification = $this->db->jdate($record["date_modification"]); $prodfourn->fourn_multicurrency_price = $record["multicurrency_price"]; $prodfourn->fourn_multicurrency_unitprice = $record["multicurrency_unitprice"]; $prodfourn->fourn_multicurrency_tx = $record["multicurrency_tx"]; From 911962ec120fef9d623cd31fbf8cf2abd3223b29 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 18:43:51 +0100 Subject: [PATCH 45/46] Update suppliers.lang --- htdocs/langs/en_US/suppliers.lang | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/langs/en_US/suppliers.lang b/htdocs/langs/en_US/suppliers.lang index e541971e160..b69b11272b4 100644 --- a/htdocs/langs/en_US/suppliers.lang +++ b/htdocs/langs/en_US/suppliers.lang @@ -45,4 +45,3 @@ BuyerName=Buyer name AllProductServicePrices=All product / service prices AllProductReferencesOfSupplier=All product / service references of vendor BuyingPriceNumShort=Vendor prices -PriceUpdate=Updated on \ No newline at end of file From 2e270d95e9d11cd3ac5adb18cb77c23e354a2d30 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 14 Mar 2019 18:44:03 +0100 Subject: [PATCH 46/46] Update suppliers.lang --- htdocs/langs/fr_FR/suppliers.lang | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 0aad31d294c..2f9b93ff323 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -45,4 +45,3 @@ BuyerName=Nom de l'acheteur AllProductServicePrices=Tous les prix du produits / service AllProductReferencesOfSupplier=Toutes les références des produits/services du fournisseur BuyingPriceNumShort=Prix fournisseurs -PriceUpdate=Mis à jour le \ No newline at end of file