forked from Wavyzz/dolibarr
add last_main_doc field to product (#28045)
* add las_main_doc field to product * add field fetch
This commit is contained in:
@@ -219,3 +219,4 @@ ALTER TABLE llx_mailing ADD COLUMN messtype varchar(16) DEFAULT 'email' after ro
|
||||
ALTER TABLE llx_ticket ADD COLUMN model_pdf varchar(255);
|
||||
ALTER TABLE llx_ticket ADD COLUMN last_main_doc varchar(255);
|
||||
ALTER TABLE llx_ticket ADD COLUMN extraparams varchar(255);
|
||||
ALTER TABLE llx_product ADD COLUMN last_main_doc varchar(255);
|
||||
|
||||
@@ -108,7 +108,7 @@ create table llx_product
|
||||
price_autogen tinyint DEFAULT 0,
|
||||
fk_project integer DEFAULT NULL, -- Used when product was generated by a project or is specific to a project
|
||||
mandatory_period tinyint DEFAULT 0, -- is used to signal to the user that the start and end dates are mandatory for this type of product the fk_product_type == 1 (service) (non-blocking action)
|
||||
|
||||
last_main_doc varchar(255),
|
||||
fk_default_bom integer DEFAULT NULL,
|
||||
fk_default_workstation integer DEFAULT NULL
|
||||
)ENGINE=innodb;
|
||||
|
||||
@@ -594,6 +594,7 @@ class Product extends CommonObject
|
||||
'localtax1_type' => array('type'=>'varchar(10)', 'label'=>'Localtax1type', 'enabled'=>'1', 'position'=>155, 'notnull'=>1, 'visible'=>-1,),
|
||||
'localtax2_tx' => array('type'=>'double(6,3)', 'label'=>'Localtax2tx', 'enabled'=>'1', 'position'=>160, 'notnull'=>0, 'visible'=>-1,),
|
||||
'localtax2_type' => array('type'=>'varchar(10)', 'label'=>'Localtax2type', 'enabled'=>'1', 'position'=>165, 'notnull'=>1, 'visible'=>-1,),
|
||||
'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>170),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000),
|
||||
//'tosell' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
|
||||
//'tobuy' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Active', -1=>'Cancel')),
|
||||
@@ -2538,7 +2539,7 @@ class Product extends CommonObject
|
||||
$sql = "SELECT p.rowid, p.ref, p.ref_ext, p.label, p.description, p.url, p.note_public, p.note as note_private, p.customcode, p.fk_country, p.fk_state, p.lifetime, p.qc_frequency, p.price, p.price_ttc,";
|
||||
$sql .= " p.price_min, p.price_min_ttc, p.price_base_type, p.cost_price, p.default_vat_code, p.tva_tx, p.recuperableonly as tva_npr, p.localtax1_tx, p.localtax2_tx, p.localtax1_type, p.localtax2_type, p.tosell,";
|
||||
$sql .= " p.tobuy, p.fk_product_type, p.duration, p.fk_default_warehouse, p.fk_default_workstation, p.seuil_stock_alerte, p.canvas, p.net_measure, p.net_measure_units, p.weight, p.weight_units,";
|
||||
$sql .= " p.length, p.length_units, p.width, p.width_units, p.height, p.height_units,";
|
||||
$sql .= " p.length, p.length_units, p.width, p.width_units, p.height, p.height_units, p.last_main_doc,";
|
||||
$sql .= " p.surface, p.surface_units, p.volume, p.volume_units, p.barcode, p.fk_barcode_type, p.finished, p.fk_default_bom, p.mandatory_period,";
|
||||
if (!getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
|
||||
$sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,";
|
||||
@@ -2714,6 +2715,7 @@ class Product extends CommonObject
|
||||
$this->fk_unit = $obj->fk_unit;
|
||||
$this->price_autogen = $obj->price_autogen;
|
||||
$this->model_pdf = $obj->model_pdf;
|
||||
$this->last_main_doc = $obj->last_main_doc;
|
||||
|
||||
$this->mandatory_period = $obj->mandatory_period;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user