NEW: Add invoice subtype in template invoice (SQL part) (#26535)

* Add column subtype

* Add column subtype

* Add column subtype in llx_facture_rec and llx_facture_fourn_rec
This commit is contained in:
sonikf 2023-11-10 19:52:17 +02:00 committed by GitHub
parent c4b2555667
commit c18588550b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -179,3 +179,6 @@ ALTER TABLE llx_mrp_production ADD COLUMN fk_unit integer DEFAULT NULL;
-- VMYSQL4.1 UPDATE llx_mrp_production as mp INNER JOIN llx_bom_bomline as bbl ON mp.origin_id = bbl.rowid SET mp.fk_unit = bbl.fk_unit WHERE mp.origin_type = 'bomline' AND mk.fk_unit IS NULL;
-- VMYSQL4.1 UPDATE llx_bom_bomline as bbl INNER JOIN llx_product as p ON p.rowid = bbl.fk_product SET bbl.fk_unit = p.fk_unit WHERE bbl.fk_unit IS NULL;
ALTER TABLE llx_facture_rec ADD COLUMN subtype smallint DEFAULT NULL AFTER entity;
ALTER TABLE llx_facture_fourn_rec ADD COLUMN subtype smallint DEFAULT NULL AFTER entity;

View File

@ -21,6 +21,7 @@ create table llx_facture_fourn_rec
titre varchar(200) NOT NULL,
ref_supplier varchar(180) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
subtype smallint DEFAULT NULL, -- subtype of invoice (some countries need a subtype to classify invoices)
fk_soc integer NOT NULL,
datec datetime, -- date de creation

View File

@ -24,6 +24,7 @@ create table llx_facture_rec
rowid integer AUTO_INCREMENT PRIMARY KEY,
titre varchar(200) NOT NULL,
entity integer DEFAULT 1 NOT NULL, -- multi company id
subtype smallint DEFAULT NULL, -- subtype of invoice (some countries need a subtype to classify invoices)
fk_soc integer NOT NULL,
datec datetime, -- date de creation
tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date