SQL for invoice subtype (#26198)
* Add more subtypes for Greece * Update llx_c_invoice_subtype.key.sql * Update llx_c_invoice_subtype.sql * Update llx_facture_fourn.sql * Update 18.0.0-19.0.0.sql
This commit is contained in:
parent
bec11a4407
commit
1e3e53ffb5
5 changed files with 15 additions and 2 deletions
|
|
@ -41,3 +41,6 @@ insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102,
|
|||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '11.2', 'ΑΠΥ', 1);
|
||||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '11.3', 'Απλοποιημένο Τιμολόγιο', 0);
|
||||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '11.5', 'Απόδειξη Λιανικής Πώλησης για Λογ/σμό Τρίτων', 0);
|
||||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '5.1', 'Πιστωτικό Τιμολόγιο / Συσχετιζόμενο', 0);
|
||||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '5.2', 'Πιστωτικό Τιμολόγιο / Μη Συσχετιζόμενο', 1);
|
||||
insert into llx_c_invoice_subtype (fk_country, code, label, active) VALUES (102, '11.4', 'Πιστωτικό Στοιχείο Λιανικής', 1);
|
||||
|
|
|
|||
|
|
@ -121,6 +121,15 @@ ALTER TABLE llx_accounting_account MODIFY COLUMN pcg_type varchar(32);
|
|||
-- VPGSQL8.2 DROP INDEX uk_links;
|
||||
ALTER TABLE llx_links ADD UNIQUE INDEX uk_links (objectid, objecttype,label);
|
||||
|
||||
ALTER TABLE llx_facture_fourn ADD COLUMN subtype smallint DEFAULT NULL;
|
||||
|
||||
ALTER TABLE llx_c_invoice_subtype DROP INDEX uk_c_invoice_subtype;
|
||||
ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity, code, fk_country);
|
||||
ALTER TABLE llx_c_invoice_subtype MODIFY COLUMN entity integer DEFAULT 1 NOT NULL;
|
||||
ALTER TABLE llx_c_invoice_subtype MODIFY COLUMN code varchar(5) NOT NULL;
|
||||
|
||||
insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.1', 'Πιστωτικό Τιμολόγιο / Συσχετιζόμενο', 0);
|
||||
insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '5.2', 'Πιστωτικό Τιμολόγιο / Μη Συσχετιζόμενο', 1);
|
||||
insert into llx_c_invoice_subtype (entity, fk_country, code, label, active) VALUES (1, 102, '11.4', 'Πιστωτικό Στοιχ. Λιανικής', 1);
|
||||
|
||||
ALTER TABLE llx_prelevement_lignes ADD COLUMN fk_user integer NULL;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,4 @@
|
|||
--
|
||||
-- ========================================================================
|
||||
|
||||
ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity, code);
|
||||
ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity, code, fk_country);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ CREATE TABLE llx_c_invoice_subtype
|
|||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
fk_country integer NOT NULL,
|
||||
code varchar(4) NOT NULL,
|
||||
code varchar(5) NOT NULL,
|
||||
label varchar(100),
|
||||
active tinyint DEFAULT 1 NOT NULL
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ create table llx_facture_fourn
|
|||
ref_ext varchar(255), -- reference into an external system (not used by dolibarr)
|
||||
|
||||
type smallint DEFAULT 0 NOT NULL,
|
||||
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 de la facture
|
||||
|
|
|
|||
Loading…
Reference in a new issue