SQL Datenbank anpassung geklärt
This commit is contained in:
parent
6b19944504
commit
9e8165f1ab
3 changed files with 13 additions and 9 deletions
|
|
@ -215,11 +215,8 @@ class ImportLine
|
|||
*/
|
||||
public function fetch($id)
|
||||
{
|
||||
$sql = "SELECT rowid, fk_import, line_id, supplier_ref, product_name, description,";
|
||||
$sql .= " quantity, unit_code, unit_price, unit_price_raw, basis_quantity, basis_quantity_unit,";
|
||||
$sql .= " line_total, tax_percent, ean, copper_surcharge, copper_surcharge_basis_qty,";
|
||||
$sql .= " fk_product, fk_datanorm, match_method, date_creation";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||
// Use SELECT * to be compatible with older database versions without fk_datanorm column
|
||||
$sql = "SELECT * FROM " . MAIN_DB_PREFIX . $this->table_element;
|
||||
$sql .= " WHERE rowid = " . ((int) $id);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -242,10 +239,10 @@ class ImportLine
|
|||
$this->line_total = $obj->line_total;
|
||||
$this->tax_percent = $obj->tax_percent;
|
||||
$this->ean = $obj->ean;
|
||||
$this->copper_surcharge = $obj->copper_surcharge;
|
||||
$this->copper_surcharge_basis_qty = $obj->copper_surcharge_basis_qty;
|
||||
$this->copper_surcharge = isset($obj->copper_surcharge) ? $obj->copper_surcharge : null;
|
||||
$this->copper_surcharge_basis_qty = isset($obj->copper_surcharge_basis_qty) ? $obj->copper_surcharge_basis_qty : null;
|
||||
$this->fk_product = $obj->fk_product;
|
||||
$this->fk_datanorm = $obj->fk_datanorm;
|
||||
$this->fk_datanorm = isset($obj->fk_datanorm) ? $obj->fk_datanorm : null;
|
||||
$this->match_method = $obj->match_method;
|
||||
$this->date_creation = $this->db->jdate($obj->date_creation);
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class modImportZugferd extends DolibarrModules
|
|||
$this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@importzugferd'
|
||||
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
|
||||
$this->version = '2.7';
|
||||
$this->version = '3.0';
|
||||
// Url to the file with your last numberversion of this module
|
||||
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,3 +8,10 @@ ALTER TABLE llx_importzugferd_import_line ADD COLUMN copper_surcharge_basis_qty
|
|||
|
||||
-- Add fk_datanorm field to import_line table (v2.9)
|
||||
ALTER TABLE llx_importzugferd_import_line ADD COLUMN fk_datanorm integer DEFAULT NULL AFTER fk_product;
|
||||
|
||||
-- Add missing datanorm fields (v3.0)
|
||||
ALTER TABLE llx_importzugferd_datanorm ADD COLUMN price_unit_code tinyint DEFAULT 0 AFTER price_unit;
|
||||
ALTER TABLE llx_importzugferd_datanorm ADD COLUMN price_type tinyint DEFAULT 1 AFTER price_unit_code;
|
||||
ALTER TABLE llx_importzugferd_datanorm ADD COLUMN metal_surcharge double(24,8) DEFAULT 0 AFTER price_type;
|
||||
ALTER TABLE llx_importzugferd_datanorm ADD COLUMN vpe integer DEFAULT NULL AFTER metal_surcharge;
|
||||
ALTER TABLE llx_importzugferd_datanorm ADD COLUMN action_code char(1) DEFAULT 'N' AFTER datanorm_version;
|
||||
|
|
|
|||
Loading…
Reference in a new issue