From bcf4f65cc979fe29f6d27c6a2dfe5c8a0797e601 Mon Sep 17 00:00:00 2001 From: Stephane Lesage Date: Thu, 3 Dec 2020 19:45:36 +0100 Subject: [PATCH 1/5] Fix & sync import/export entity icons/labels translation --- htdocs/core/modules/modSociete.class.php | 4 +- htdocs/core/modules/modStock.class.php | 123 ++++++++++++-------- htdocs/exports/export.php | 46 ++++---- htdocs/imports/import.php | 139 +++++++++++++++++------ htdocs/langs/en_US/exports.lang | 1 + htdocs/langs/fr_FR/exports.lang | 1 + 6 files changed, 203 insertions(+), 111 deletions(-) diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php index a88ddc355a4..b0346054323 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -478,7 +478,7 @@ class modSociete extends DolibarrModules 'classfile' => '/core/class/cstate.class.php', 'class' => 'Cstate', 'method' => 'fetch', - 'dict' => 'DictionaryState' + 'dict' => 'DictionaryStateCode' ), 's.fk_pays' => array( 'rule' => 'fetchidfromcodeid', @@ -630,7 +630,7 @@ class modSociete extends DolibarrModules 'classfile' => '/core/class/cstate.class.php', 'class' => 'Cstate', 'method' => 'fetch', - 'dict' => 'DictionaryState' + 'dict' => 'DictionaryStateCode' ), 's.fk_pays' => array( 'rule' => 'fetchidfromcodeid', diff --git a/htdocs/core/modules/modStock.class.php b/htdocs/core/modules/modStock.class.php index 4dd1a740278..81cebc83ff5 100644 --- a/htdocs/core/modules/modStock.class.php +++ b/htdocs/core/modules/modStock.class.php @@ -188,28 +188,31 @@ class modStock extends DolibarrModules //-------- $r = 0; + // Export stock (without batch number) $r++; $this->export_code[$r] = $this->rights_class; - $this->export_label[$r] = "WarehousesAndProducts"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_label[$r] = "Stocks"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r] = "warehouse"; $this->export_permission[$r] = array(array("stock", "lire")); $this->export_fields_array[$r] = array( - 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', - 'e.zip'=>'Zip', 'e.town'=>'Town', 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", - 'p.note'=>"Note", 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', - 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice' + 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', 'e.zip'=>'Zip', 'e.town'=>'Town', + 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note", + 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", + 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice', ); $this->export_TypeFields_array[$r] = array( - 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"List:product:label::product", - 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', - 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric', + 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', + 'p.rowid'=>"List:product:label::product", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", + 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", + 'p.datec'=>'Date', 'p.tms'=>'Date', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric', 'ps.reel'=>'Numeric' ); $this->export_entities_array[$r] = array( - 'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', - 'e.town'=>'warehouse', 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", - 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", - 'p.datec'=>'product', 'p.tms'=>'product', 'p.pmp'=>'product', 'p.cost_price'=>'product', 'ps.reel'=>'stock' - ); + 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", + 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", + 'p.datec'=>'product', 'p.tms'=>'product', 'p.pmp'=>'product', 'p.cost_price'=>'product', + 'ps.reel'=>'stock' + ); // We define here only fields that use another icon that the one defined into export_icon $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stock'=>array('p.rowid', 'e.rowid')); // We must keep this until the aggregate_array is used. To have a unique key, if we ask a field of a child, to avoid the DISTINCT to discard them. $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; @@ -220,73 +223,78 @@ class modStock extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra ON extra.fk_object = p.rowid, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'entrepot as e'; $this->export_sql_end[$r] .= ' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid'; $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; + + // Export stock including batch number if ($conf->productbatch->enabled) { - // Export of stock including lot number $langs->load("productbatch"); // This request is same than previous but without field ps.stock (real stock in warehouse) and with link to subtable productbatch $r++; $this->export_code[$r] = $this->rights_class.'_lot'; - $this->export_label[$r] = "WarehousesAndProductsBatchDetail"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_label[$r] = "StocksWithBatch"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r] = "warehouse"; $this->export_permission[$r] = array(array("stock", "lire")); $this->export_fields_array[$r] = array( - 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', - 'e.zip'=>'Zip', 'e.town'=>'Town', 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", - 'p.note'=>"Note", 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', - 'p.tms'=>'DateModification', 'pb.rowid'=>'Id', 'pb.batch'=>'Batch', 'pb.qty'=>'Qty', 'pl.eatby'=>'EatByDate', 'pl.sellby'=>'SellByDate' + 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', 'e.zip'=>'Zip', 'e.town'=>'Town', + 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note", + 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", + 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice', + 'pb.rowid'=>'Id', 'pb.batch'=>'Batch', 'pb.qty'=>'Qty', + 'pl.eatby'=>'EatByDate', 'pl.sellby'=>'SellByDate' ); $this->export_TypeFields_array[$r] = array( 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.lieu'=>'Text', 'e.description'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"List:product:label::product", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", - 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date', - 'pb.batch'=>'Text', 'pb.qty'=>'Numeric', 'pl.eatby'=>'Date', 'pl.sellby'=>'Date' + 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", + 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification', 'p.pmp'=>'PMPValue', 'p.cost_price'=>'CostPrice', + 'pb.batch'=>'Text', 'pb.qty'=>'Numeric', + 'pl.eatby'=>'Date', 'pl.sellby'=>'Date' ); $this->export_entities_array[$r] = array( - 'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', - 'e.town'=>'warehouse', 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", - 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", - 'p.datec'=>'product', 'p.tms'=>'product', 'pb.rowid'=>'stockbatch', 'pb.batch'=>'stockbatch', 'pb.qty'=>'stockbatch', 'pl.eatby'=>'batch', - 'pl.sellby'=>'batch' - ); + 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", + 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", + 'p.datec'=>'product', 'p.tms'=>'product', 'p.pmp'=>'product', 'p.cost_price'=>'product', + 'pb.rowid'=>'batch', 'pb.batch'=>'batch', 'pb.qty'=>'batch', + 'pl.eatby'=>'batch', 'pl.sellby'=>'batch' + ); // We define here only fields that use another icon that the one defined into export_icon $this->export_aggregate_array[$r] = array('ps.reel'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('stockbatch'=>array('pb.rowid'), 'batch'=>array('pb.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. $keyforselect = 'product_lot'; $keyforelement = 'batch'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM ('.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'product_stock as ps, '.MAIN_DB_PREFIX.'product_batch as pb)'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot as pl ON pl.fk_product = p.rowid AND pl.batch = pb.batch'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_lot_extrafields as extra ON extra.fk_object = pl.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'entrepot as e'; $this->export_sql_end[$r] .= ' WHERE p.rowid = ps.fk_product AND ps.fk_entrepot = e.rowid AND ps.rowid = pb.fk_product_stock'; - $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; - } + $this->export_sql_end[$r] .= ' AND e.entity IN ('.getEntity('stock').')'; } - // Export of stock movement + // Export of stock movements $r++; $this->export_code[$r] = $this->rights_class.'_movement'; $this->export_label[$r] = "StockMovements"; // Translation key (used only if key ExportDataset_xxx_z not found) + $this->export_icon[$r] = "movement"; $this->export_permission[$r] = array(array("stock", "lire")); $this->export_fields_array[$r] = array( - 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', 'e.zip'=>'Zip', - 'e.town'=>'Town', 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note", - 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', - 'p.tms'=>'DateModification', 'sm.rowid'=>'MovementId', 'sm.value'=>'Qty', 'sm.datem'=>'DateMovement', 'sm.label'=>'MovementLabel', - 'sm.inventorycode'=>'InventoryCode' + 'sm.rowid'=>'MovementId', 'sm.value'=>'Qty', 'sm.datem'=>'DateMovement', 'sm.label'=>'MovementLabel', 'sm.inventorycode'=>'InventoryCode', + 'e.rowid'=>'IdWarehouse', 'e.ref'=>'LocationSummary', 'e.description'=>'DescWareHouse', 'e.lieu'=>'LieuWareHouse', 'e.address'=>'Address', 'e.zip'=>'Zip', 'e.town'=>'Town', + 'p.rowid'=>"ProductId", 'p.ref'=>"Ref", 'p.fk_product_type'=>"Type", 'p.label'=>"Label", 'p.description'=>"Description", 'p.note'=>"Note", + 'p.price'=>"Price", 'p.tva_tx'=>'VAT', 'p.tosell'=>"OnSell", 'p.tobuy'=>'OnBuy', 'p.duration'=>"Duration", 'p.datec'=>'DateCreation', 'p.tms'=>'DateModification' ); $this->export_TypeFields_array[$r] = array( + 'sm.rowid'=>'Numeric', 'sm.value'=>'Numeric', 'sm.datem'=>'Date', 'sm.batch'=>'Text', 'sm.label'=>'Text', 'sm.inventorycode'=>'Text', 'e.rowid'=>'List:entrepot:ref::stock', 'e.ref'=>'Text', 'e.description'=>'Text', 'e.lieu'=>'Text', 'e.address'=>'Text', 'e.zip'=>'Text', 'e.town'=>'Text', 'p.rowid'=>"List:product:label::product", 'p.ref'=>"Text", 'p.fk_product_type'=>"Text", 'p.label'=>"Text", 'p.description'=>"Text", 'p.note'=>"Text", - 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date', - 'sm.rowid'=>'Numeric', 'sm.value'=>'Numeric', 'sm.datem'=>'Date', 'sm.batch'=>'Text', 'sm.label'=>'Text', 'sm.inventorycode'=>'Text' + 'p.price'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.tosell'=>"Boolean", 'p.tobuy'=>"Boolean", 'p.duration'=>"Duree", 'p.datec'=>'Date', 'p.tms'=>'Date' ); $this->export_entities_array[$r] = array( - 'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', - 'e.town'=>'warehouse', 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", - 'p.note'=>"product", 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", 'p.datec'=>'product', - 'p.tms'=>'product', 'sm.rowid'=>'movement', 'sm.value'=>'movement', 'sm.datem'=>'movement', 'sm.label'=>'movement', 'sm.inventorycode'=>'movement' - ); + 'e.rowid'=>'warehouse', 'e.ref'=>'warehouse', 'e.description'=>'warehouse', 'e.lieu'=>'warehouse', 'e.address'=>'warehouse', 'e.zip'=>'warehouse', 'e.town'=>'warehouse', + 'p.rowid'=>"product", 'p.ref'=>"product", 'p.fk_product_type'=>"product", 'p.label'=>"product", 'p.description'=>"product", 'p.note'=>"product", + 'p.price'=>"product", 'p.tva_tx'=>'product', 'p.tosell'=>"product", 'p.tobuy'=>"product", 'p.duration'=>"product", 'p.datec'=>'product', 'p.tms'=>'product' + ); // We define here only fields that use another icon that the one defined into export_icon if ($conf->productbatch->enabled) { $this->export_fields_array[$r]['sm.batch'] = 'Batch'; @@ -295,6 +303,7 @@ class modStock extends DolibarrModules } $this->export_aggregate_array[$r] = array('sm.value'=>'SUM'); // TODO Not used yet $this->export_dependencies_array[$r] = array('movement'=>array('sm.rowid')); // We must keep this until the aggregate_array is used. To add unique key if we ask a field of a child to avoid the DISTINCT to discard them. + $this->export_sql_start[$r] = 'SELECT DISTINCT '; $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'product as p, '.MAIN_DB_PREFIX.'stock_mouvement as sm, '.MAIN_DB_PREFIX.'entrepot as e'; $this->export_sql_end[$r] .= ' WHERE p.rowid = sm.fk_product AND sm.fk_entrepot = e.rowid'; @@ -309,34 +318,48 @@ class modStock extends DolibarrModules $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; $this->import_label[$r] = "Warehouses"; // Translation key - $this->import_icon[$r] = $this->picto; + $this->import_icon[$r] = "warehouse"; $this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r] = array('e'=>MAIN_DB_PREFIX.'entrepot'); $this->import_tables_creator_array[$r] = array('e'=>'fk_user_author'); $this->import_fields_array[$r] = array('e.ref'=>"LocationSummary*", - 'e.description'=>"DescWareHouse", 'e.lieu'=>"LieuWareHouse", - 'e.address'=>"Address", 'e.zip'=>'Zip', 'e.fk_pays'=>'CountryCode', + 'e.description'=>"DescWareHouse", + 'e.lieu'=>"LieuWareHouse", + 'e.address'=>"Address", + 'e.zip'=>'Zip', + 'e.fk_departement'=>'StateCode', + 'e.fk_pays'=>'CountryCode', + 'e.phone'=>'Phone', + 'e.fax'=>'Fax', 'e.statut'=>'Status', 'e.fk_parent'=>'ParentWarehouse' ); $this->import_convertvalue_array[$r] = array( + 'e.fk_departement'=>array('rule'=>'fetchidfromcodeid', 'classfile'=>'/core/class/cstate.class.php', 'class'=>'Cstate', 'method'=>'fetch', 'dict'=>'DictionaryStateCode'), 'e.fk_pays'=>array('rule'=>'fetchidfromcodeid', 'classfile'=>'/core/class/ccountry.class.php', 'class'=>'Ccountry', 'method'=>'fetch', 'dict'=>'DictionaryCountry'), 'e.fk_parent'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/stock/class/entrepot.class.php', 'class'=>'Entrepot', 'method'=>'fetch', 'element'=>'ref') ); $this->import_regex_array[$r] = array('e.statut'=>'^[0|1]'); $this->import_examplevalues_array[$r] = array('e.ref'=>"ALM001", - 'e.description'=>"Central Warehouse", 'e.lieu'=>"Central", - 'e.address'=>"Route 66", 'e.zip'=>'28080', 'e.fk_pays'=>'US', + 'e.description'=>"Central Warehouse", + 'e.lieu'=>"Central", + 'e.address'=>"Route 66", + 'e.zip'=>'28080', + 'e.fk_departement'=>'matches field "code_departement" in table "'.MAIN_DB_PREFIX.'c_departements"', + 'e.fk_pays'=>'US/FR/DE etc. matches field "code" in table "'.MAIN_DB_PREFIX.'c_country"', + 'e.phone'=>'(+33)(0)123456789', + 'e.fax'=>'(+33)(0)123456790', 'e.statut'=>'1', - 'e.fk_parent'=>'' + 'e.fk_parent'=>'id or ref in this table' ); + $this->import_updatekeys_array[$r] = array('p.ref'=>'Ref'); // Import stocks $r++; $this->import_code[$r] = $this->rights_class.'_'.$r; $this->import_label[$r] = "Stocks"; // Translation key - $this->import_icon[$r] = $this->picto; + $this->import_icon[$r] = "stock"; $this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r] = array('ps'=>MAIN_DB_PREFIX.'product_stock'); $this->import_fields_array[$r] = array('ps.fk_product'=>"Product*", 'ps.fk_entrepot'=>"Warehouse*", 'ps.reel'=>"Stock*"); @@ -346,7 +369,7 @@ class modStock extends DolibarrModules 'ps.fk_entrepot'=>array('rule'=>'fetchidfromref', 'classfile'=>'/product/stock/class/entrepot.class.php', 'class'=>'Entrepot', 'method'=>'fetch', 'element'=>'ref') ); $this->import_examplevalues_array[$r] = array( - 'ps.fk_product'=>"PREF123456", 'ps.fk_entrepot'=>"ALM001", 'ps.reel'=>"10" + 'ps.fk_product'=>"id or ref", 'ps.fk_entrepot'=>"id or ref", 'ps.reel'=>"10" ); $this->import_updatekeys_array[$r] = array('ps.fk_product'=>'Product', 'ps.fk_entrepot'=>"Warehouse"); $this->import_run_sql_after_array[$r] = array( // Because we may change data that are denormalized, we must update dernormalized data after. diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 6543747d1f7..541c43f1149 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -39,6 +39,7 @@ $langs->loadlangs(array('admin', 'exports', 'other', 'users', 'companies', 'proj //if (! $user->admin) // accessforbidden(); +// Map icons, array duplicated in import.php, was not synchronized, TODO put it somewhere only once $entitytoicon = array( 'invoice' => 'bill', 'invoice_line' => 'bill', @@ -54,13 +55,13 @@ $entitytoicon = array( 'payment' => 'payment', 'tax' => 'generic', 'tax_type' => 'generic', - 'stock' => 'generic', 'other' => 'generic', 'account' => 'account', 'product' => 'product', 'virtualproduct'=>'product', 'subproduct' => 'product', 'product_supplier_ref' => 'product', + 'stock' => 'stock', 'warehouse' => 'stock', 'batch' => 'stock', 'stockbatch' => 'stock', @@ -78,7 +79,7 @@ $entitytoicon = array( 'bomline' => 'bom' ); -// Translation code +// Translation code, array duplicated in import.php, was not synchronized, TODO put it somewhere only once $entitytolang = array( 'user' => 'User', 'company' => 'Company', @@ -459,15 +460,14 @@ if ($step == 1 || !$datatoexport) $sortedarrayofmodules = dol_sort_array($objexport->array_export_module, 'module_position', 'asc', 0, 0, 1); foreach ($sortedarrayofmodules as $key => $value) { + //var_dump($objexport->array_import_code[$key]); print ''; - //print img_object($objexport->array_export_module[$key]->getName(),$export->array_export_module[$key]->picto).' '; - print $objexport->array_export_module[$key]->getName(); + print $objexport->array_export_module[$key]->getName(); print ''; - $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[$key]); - $label = $objexport->array_export_label[$key]; - //print $value.'-'.$icon.'-'.$label."
"; - print img_object($objexport->array_export_module[$key]->getName(), $icon).' '; - print $label; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[$key]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[$key]->getName(), $entityicon).' '; + print $objexport->array_export_label[$key]; print ''; if ($objexport->array_export_perms[$key]) { @@ -522,11 +522,10 @@ if ($step == 2 && $datatoexport) // Lot de donnees a exporter print ''.$langs->trans("DatasetToExport").''; print ''; - $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - $label = $objexport->array_export_label[0]; - //print $value.'-'.$icon.'-'.$label."
"; - print img_object($objexport->array_export_module[0]->getName(), $icon).' '; - print $label; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; + print $objexport->array_export_label[0]; print ''; print ''; @@ -728,11 +727,10 @@ if ($step == 3 && $datatoexport) // Lot de donnees a exporter print ''.$langs->trans("DatasetToExport").''; print ''; - $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - $label = $objexport->array_export_label[0]; - //print $value.'-'.$icon.'-'.$label."
"; - print img_object($objexport->array_export_module[0]->getName(), $icon).' '; - print $label; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; + print $objexport->array_export_label[0]; print ''; // Nbre champs exportes @@ -920,8 +918,9 @@ if ($step == 4 && $datatoexport) // Lot de donnees a exporter print ''.$langs->trans("DatasetToExport").''; print ''; - $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - print img_object($objexport->array_export_module[0]->getName(), $icon).' '; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; print $objexport->array_export_label[0]; print ''; @@ -1190,8 +1189,9 @@ if ($step == 5 && $datatoexport) // Dataset to export print ''.$langs->trans("DatasetToExport").''; print ''; - $icon = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); - print img_object($objexport->array_export_module[0]->getName(), $icon).' '; + $entity = preg_replace('/:.*$/', '', $objexport->array_export_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objexport->array_export_module[0]->getName(), $entityicon).' '; print $objexport->array_export_label[0]; print ''; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 0819ce0ac30..c6e2e282778 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -38,31 +38,93 @@ $langs->loadLangs(array('exports', 'compta', 'errors')); // Security check $result = restrictedArea($user, 'import'); +// Map icons, array duplicated in export.php, was not synchronized, TODO put it somewhere only once $entitytoicon = array( - 'invoice'=>'bill', 'invoice_line'=>'bill', - 'order'=>'order', 'order_line'=>'order', - 'intervention'=>'intervention', 'inter_line'=>'intervention', - 'member'=>'user', 'member_type'=>'group', 'subscription'=>'payment', - 'tax'=>'bill', 'tax_type'=>'generic', - 'account'=>'account', - 'payment'=>'payment', - 'product'=>'product', 'stock'=>'generic', 'warehouse'=>'stock', - 'category'=>'generic', - 'other'=>'generic' + 'invoice' => 'bill', + 'invoice_line' => 'bill', + 'order' => 'order', + 'order_line' => 'order', + 'propal' => 'propal', + 'propal_line' => 'propal', + 'intervention' => 'intervention', + 'inter_line' => 'intervention', + 'member' => 'user', + 'member_type' => 'group', + 'subscription' => 'payment', + 'payment' => 'payment', + 'tax' => 'bill', + 'tax_type' => 'generic', + 'other' => 'generic', + 'account' => 'account', + 'product' => 'product', + 'virtualproduct'=>'product', + 'subproduct' => 'product', + 'product_supplier_ref' => 'product', + 'stock' => 'stock', + 'warehouse' => 'stock', + 'batch' => 'stock', + 'stockbatch' => 'stock', + 'category' => 'category', + 'shipment' => 'sending', + 'shipment_line'=> 'sending', + 'reception'=> 'sending', + 'reception_line'=> 'sending', + 'expensereport'=> 'trip', + 'expensereport_line'=> 'trip', + 'holiday' => 'holiday', + 'contract_line' => 'contract', + 'translation' => 'generic', + 'bomm' => 'bom', + 'bomline' => 'bom' ); -$entitytolang = array( // Translation code - 'user'=>'User', - 'company'=>'Company', 'contact'=>'Contact', - 'invoice'=>'Bill', 'invoice_line'=>'InvoiceLine', - 'order'=>'Order', 'order_line'=>'OrderLine', - 'intervention'=>'Intervention', 'inter_line'=>'InterLine', - 'member'=>'Member', 'member_type'=>'MemberType', 'subscription'=>'Subscription', - 'tax'=>'SocialContribution', 'tax_type'=>'DictionarySocialContributions', - 'account'=>'BankTransactions', - 'payment'=>'Payment', - 'product'=>'Product', 'stock'=>'Stock', 'warehouse'=>'Warehouse', - 'category'=>'Category', - 'other'=>'Other' + +// Translation code, array duplicated in export.php, was not synchronized, TODO put it somewhere only once +$entitytolang = array( + 'user' => 'User', + 'company' => 'Company', + 'contact' => 'Contact', + 'invoice' => 'Bill', + 'invoice_line' => 'InvoiceLine', + 'order' => 'Order', + 'order_line' => 'OrderLine', + 'propal' => 'Proposal', + 'propal_line' => 'ProposalLine', + 'intervention' => 'Intervention', + 'inter_line' => 'InterLine', + 'member' => 'Member', + 'member_type' => 'MemberType', + 'subscription' => 'Subscription', + 'tax' => 'SocialContribution', + 'tax_type' => 'DictionarySocialContributions', + 'account' => 'BankTransactions', + 'payment' => 'Payment', + 'product' => 'Product', + 'virtualproduct' => 'AssociatedProducts', + 'subproduct' => 'SubProduct', + 'product_supplier_ref' => 'SupplierPrices', + 'service' => 'Service', + 'stock' => 'Stock', + 'movement' => 'StockMovement', + 'batch' => 'Batch', + 'stockbatch' => 'StockDetailPerBatch', + 'warehouse' => 'Warehouse', + 'category' => 'Category', + 'other' => 'Other', + 'trip' => 'TripsAndExpenses', + 'shipment' => 'Shipments', + 'shipment_line'=> 'ShipmentLine', + 'project' => 'Projects', + 'projecttask' => 'Tasks', + 'task_time' => 'TaskTimeSpent', + 'action' => 'Event', + 'expensereport'=> 'ExpenseReport', + 'expensereport_line'=> 'ExpenseReportLine', + 'holiday' => 'TitreRequestCP', + 'contract' => 'Contract', + 'contract_line'=> 'ContractLine', + 'translation' => 'Translation', + 'bom' => 'BOM', + 'bomline' => 'BOMLine' ); $datatoimport = GETPOST('datatoimport'); @@ -365,7 +427,9 @@ if ($step == 1 || !$datatoimport) if (in_array($objimport->array_import_code[$key], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; print ''; - print img_object($objimport->array_import_module[$key]->getName(), $objimport->array_import_icon[$key]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[$key]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[$key]->getName(), $entityicon).' '; print $objimport->array_import_label[$key]; print ''; if ($objimport->array_import_perms[$key]) @@ -422,17 +486,17 @@ if ($step == 2 && $datatoimport) // Lot de donnees a importer print ''.$langs->trans("DatasetToImport").''; print ''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[0]->getName(), $entityicon).' '; print $objimport->array_import_label[0]; print ''; print ''; - print ''; dol_fiche_end(); - print '
'; print ''; print ''; @@ -512,17 +576,17 @@ if ($step == 3 && $datatoimport) // Lot de donnees a importer print ''.$langs->trans("DatasetToImport").''; print ''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[0]->getName(), $entityicon).' '; print $objimport->array_import_label[0]; print ''; print ''; print ''; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); - print '
'; print '
'; print ''; @@ -797,14 +861,15 @@ if ($step == 4 && $datatoimport) // Lot de donnees a importer print ''; print ''; print '
'.$langs->trans("DatasetToImport").''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[0]->getName(), $entityicon).' '; print $objimport->array_import_label[0]; print '
'; print '
'; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); print '
'; @@ -1273,14 +1338,15 @@ if ($step == 5 && $datatoimport) // Lot de donnees a importer print ''.$langs->trans("DatasetToImport").''; print ''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[0]->getName(), $entityicon).' '; print $objimport->array_import_label[0]; print ''; print ''; print ''; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); print '
'; @@ -1716,14 +1782,15 @@ if ($step == 6 && $datatoimport) // Lot de donnees a importer print ''.$langs->trans("DatasetToImport").''; print ''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + $entity = preg_replace('/:.*$/', '', $objimport->array_import_icon[0]); + $entityicon = strtolower(!empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity); + print img_object($objimport->array_import_module[0]->getName(), $entityicon).' '; print $objimport->array_import_label[0]; print ''; print ''; print ''; - print load_fiche_titre($langs->trans("InformationOnSourceFile"), '', ''); print '
'; diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index 3549e3f8b23..a0eb7161ef2 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Key (column) to use for updating existing data NbInsert=Number of inserted lines: %s NbUpdate=Number of updated lines: %s MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s +StocksWithBatch=Stocks and location (warehouse) of products with batch/serial number diff --git a/htdocs/langs/fr_FR/exports.lang b/htdocs/langs/fr_FR/exports.lang index 3055d51e2ad..3de20e83d20 100644 --- a/htdocs/langs/fr_FR/exports.lang +++ b/htdocs/langs/fr_FR/exports.lang @@ -133,3 +133,4 @@ KeysToUseForUpdates=Clé à utiliser pour mettre à jour les données NbInsert=Nombre de lignes insérées: %s NbUpdate=Nombre de lignes mises à jour: %s MultipleRecordFoundWithTheseFilters=Plusieurs enregistrements ont été trouvés avec ces filtres: %s +StocksWithBatch=Stocks et emplacements (entrepôts) des produits avec numéros de lots/séries \ No newline at end of file From 25923446018657c05a2f027987463550bbc603bf Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Dec 2020 17:27:27 +0100 Subject: [PATCH 2/5] Fix missing price2num --- htdocs/commande/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index f59038aceae..36f9705aabc 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -670,8 +670,8 @@ if (empty($reshook)) $tva_tx = ''; } - $qty = GETPOST('qty'.$predef); - $remise_percent = (GETPOST('remise_percent'.$predef) != '' ? GETPOST('remise_percent'.$predef) : 0); + $qty = price2num(GETPOST('qty'.$predef, 'alpha')); + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha')) : 0); // Extrafields $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); From 57b3b3db3a9f03885d55658be64ef6f19b451077 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 12 Dec 2020 19:18:45 +0100 Subject: [PATCH 3/5] Prepare 12.0.4 --- ChangeLog | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/ChangeLog b/ChangeLog index e7abb3f7cd6..83db59d2e64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,102 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 12.0.4 compared to 12.0.3 ***** +FIX: make formConfirm an addreplace-type hook +FIX: regex to remove 'action' parameter: taking feedback from PR#15213 into account +FIX: remove 'action' parameter from redirect URL when reordering lines on a document +FIX: error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated +FIX: on survey creation, entity is always set to 1 ⇒ set it to $conf->entity +FIX: set entity to $conf->entity (instead of 1 by default) when creating a survey; otherwise the survey cannot be listed from the entity it was created on unless it is the main entity +FIX: the stringent XSS protection provided by 'alphanohtml' causes problems with some clients who used basic tags (bold, italic, underline) in product labels. Using 'restricthtml' instead could be a good compromise. +FIX: third party of object is not always fetched when initiating the e-mail presend action (e.g. from an order) +FIX: when the cronjob 'params' field is empty, the cron method is called with one empty string param instead of no params at all +FIX: XSS protection too stringent -> replace 'alphanohtml' with 'restricthtml' +FIX: #13067 including opening balance in calculation of displayed balance +FIX: #14326 +FIX: #14649 +FIX: #14901 +FIX: #14927 Change ContratLigne property type to product_type +FIX: #14979 +FIX: #15074 +FIX: #15111 Fix special characters output in PDF +FIX: #15161 MO translation conflict +FIX: #15163 +FIX: #15199 +FIX: #15208 +FIX: #15303 +FIX: #15365 export of extrafields for user and resources +FIX: #15374 : "New" doesn't clear total amounts +FIX: #15501 +FIX: #15572 +FIX: #15590 +FIX: #15618 +FIX: supplier proposals as linked objects of events are not correctly fetched +FIX: when users create an event from a supplier proposal, the "linked objects" section says "Deleted" +FIX: Accountancy - Some ajustments on length of the account (general & auxiliary) +FIX: admin conf selected +FIX: also check if there is a method $object->fetch_thirdparty() before calling it +FIX: autofocus on first setup +FIX: Bad rigths to send contract +FIX: Better error message with IMAP when connection fails +FIX: Can create user but not update user with activedirectory +FIX: Can receipt of a product that required lot after disabling stock and +FIX: Can't create shipment for virtual product. Add +FIX: cant empty action comm desc +FIX: CA report by product/service : subcategory filter +FIX: Clean orphan records in llx_ecm_files into repair script. +FIX: default accountancy values and posted values +FIX: Deletion of expensereport + other generated object not complete. +FIX: disabled users must not be available in sales representative list on societe edit mode +FIX: Dol print error : conf usage thirdparty propagate extrafields to +FIX: Don't display inactive users in birthday box and company card +FIX: empty value is needed on filter list +FIX: enable HTML in product labels depending on conf MAIN_SECURITY_ALLOW_UNSECURED_LABELS_WITH_HTML +FIX: error 500 on cash closure +FIX: excess comma +FIX: Export FEC - Remove line at zero +FIX: extrafield required error after submit +FIX: filter on project list +FIX: force payment mode to withdraw +FIX: formating of prices with foreign languages +FIX: handling $heightforinfotot when he's superior to a page height +FIX: if no PDF default model in admin for expense report, do not create a PDF +FIX: invoice payment terms edition: error management +FIX: list of fields in list of recurring invoices was empty +FIX: load default linked options for linked sellist extra fields +FIX: Loan - Return on list when you cancel create form or delete a loan +FIX: Missing lang trans +FIX: no empty value in required extrafield +FIX: Param joinfiles not sanitized +FIX: Payment by BankTransfer +FIX: pdf_getlinetotalwithtax must show total incl tax +FIX: Problem on supplier payment card +FIX: product auto volume calculation +FIX: product customer prices: missing triggers in CRUD class +FIX: Request on purchase orders in timeout even on very small databases +FIX: set paid on total discount of a product in cash desk +FIX: several warning with the barcode use in ODT templates +FIX: SHIP MODE install v12 bug insert +FIX: stripe for connect mode +FIX: subcat filter +FIX: supplier invoice: automatically calculate payment term when modifying payment condition +FIX: SUPPLIER PROPOSAL v12 bug add +FIX: table making extrafield input too small on advance target mailing +FIX: table making extrafield too small advtagertmailing +FIX: Unable to edit extrafields in expense report +FIX: update margins rates on object line edit +FIX: uses price2numjs +FIX: various payments: bad data handling for subledger account + useless db commit/rollback +FIX: virtual products: displayed value is by unit +FIX: virtual products: supplier discount was not applied in component list +FIX: warning for purchase order delivery late. +FIX: Warning on late purchase order delivery +FIX: WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING must not consider services while STOCK_SUPPORTS_SERVICES is empty +FIX: wrong tab +FIX: Yogosha report 4425 (backport) +FIX: Yogosha report 4434 (backport) + ***** ChangeLog for 12.0.3 compared to 12.0.2 ***** FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename FIX: 11.0 - expenses lines overlapping the total amounts frame From 4fc57d096ee589084eaff950f94872aa666d05c1 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Sat, 12 Dec 2020 20:37:00 +0100 Subject: [PATCH 4/5] Fix #15556 --- htdocs/projet/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index 2f58c782c24..5c36044dcd1 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -788,8 +788,8 @@ while ($i < min($num, $limit)) $userstatic->statut = $val['statut']; $userstatic->entity = $val['entity']; $userstatic->photo = $val['photo']; - //print $userstatic->getNomUrl(1, '', 0, 0, 12); - print $userstatic->getNomUrl(-2); + print $userstatic->getNomUrl(1, '', 0, 0, 12); + //print $userstatic->getNomUrl(-2); $j++; if ($j < $nbofsalesrepresentative) print ' '; } From 35b3d4f40a8c6b59d30274cb81b0662f68b56666 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sun, 13 Dec 2020 14:11:04 +0100 Subject: [PATCH 5/5] FIX: Export FEC - Force Carriage Return Line Feed --- htdocs/accountancy/class/accountancyexport.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index a7183c70114..f0e428ea00e 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -665,7 +665,7 @@ class AccountancyExport public function exportFEC($objectLines) { $separator = "\t"; - $end_line = "\n"; + $end_line = "\r\n"; print "JournalCode" . $separator; print "JournalLib" . $separator;