mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
NEW Add import / export of MO and BOMLines - Close #18499
This commit is contained in:
@@ -285,10 +285,10 @@ class modCommande extends DolibarrModules
|
||||
$this->import_code[$r] = 'commande_'.$r;
|
||||
$this->import_label[$r] = 'CustomersOrders';
|
||||
$this->import_icon[$r] = $this->picto;
|
||||
$this->import_entities_array[$r] = [];
|
||||
$this->import_tables_array[$r] = ['c' => MAIN_DB_PREFIX.'commande', 'extra' => MAIN_DB_PREFIX.'commande_extrafields'];
|
||||
$this->import_tables_creator_array[$r] = ['c' => 'fk_user_author']; // Fields to store import user id
|
||||
$this->import_fields_array[$r] = [
|
||||
$this->import_entities_array[$r] = array();
|
||||
$this->import_tables_array[$r] = array('c' => MAIN_DB_PREFIX.'commande', 'extra' => MAIN_DB_PREFIX.'commande_extrafields');
|
||||
$this->import_tables_creator_array[$r] = array('c' => 'fk_user_author'); // Fields to store import user id
|
||||
$this->import_fields_array[$r] = array(
|
||||
'c.ref' => 'Document Ref*',
|
||||
'c.ref_client' => 'RefCustomer',
|
||||
'c.fk_soc' => 'ThirdPartyName*',
|
||||
@@ -310,7 +310,7 @@ class modCommande extends DolibarrModules
|
||||
'c.fk_cond_reglement' => 'Payment Condition',
|
||||
'c.fk_mode_reglement' => 'Payment Mode',
|
||||
'c.model_pdf' => 'Model'
|
||||
];
|
||||
);
|
||||
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
$this->import_fields_array[$r]['c.multicurrency_code'] = 'Currency';
|
||||
@@ -321,7 +321,7 @@ class modCommande extends DolibarrModules
|
||||
}
|
||||
|
||||
// Add extra fields
|
||||
$import_extrafield_sample = [];
|
||||
$import_extrafield_sample = array();
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'commande' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
@@ -337,7 +337,6 @@ class modCommande extends DolibarrModules
|
||||
|
||||
$this->import_fieldshidden_array[$r] = ['extra.fk_object' => 'lastrowid-'.MAIN_DB_PREFIX.'commande'];
|
||||
$this->import_regex_array[$r] = [
|
||||
'c.ref' => '(CPV\d{4}-\d{4}|CO\d{4}-\d{4}|PROV.{1,32}$)',
|
||||
'c.multicurrency_code' => 'code@'.MAIN_DB_PREFIX.'multicurrency'
|
||||
];
|
||||
|
||||
@@ -371,9 +370,9 @@ class modCommande extends DolibarrModules
|
||||
$this->import_code[$r] = 'commande_lines_'.$r;
|
||||
$this->import_label[$r] = 'SaleOrderLines';
|
||||
$this->import_icon[$r] = $this->picto;
|
||||
$this->import_entities_array[$r] = [];
|
||||
$this->import_tables_array[$r] = ['cd' => MAIN_DB_PREFIX.'commandedet', 'extra' => MAIN_DB_PREFIX.'commandedet_extrafields'];
|
||||
$this->import_fields_array[$r] = [
|
||||
$this->import_entities_array[$r] = array();
|
||||
$this->import_tables_array[$r] = array('cd' => MAIN_DB_PREFIX.'commandedet', 'extra' => MAIN_DB_PREFIX.'commandedet_extrafields');
|
||||
$this->import_fields_array[$r] = array(
|
||||
'cd.fk_commande' => 'Document Ref*',
|
||||
'cd.fk_parent_line' => 'PrParentLine',
|
||||
'cd.fk_product' => 'IdProduct',
|
||||
@@ -393,7 +392,7 @@ class modCommande extends DolibarrModules
|
||||
'cd.date_end' => 'End Date',
|
||||
'cd.buy_price_ht' => 'LineBuyPriceHT',
|
||||
'cd.rang' => 'LinePosition'
|
||||
];
|
||||
);
|
||||
|
||||
if (!empty($conf->multicurrency->enabled)) {
|
||||
$this->import_fields_array[$r]['cd.multicurrency_code'] = 'Currency';
|
||||
|
||||
Reference in New Issue
Block a user