Add dictionary table for invoice subtypes (country specific)

This commit is contained in:
Laurent Destailleur 2023-04-26 11:48:43 +02:00
parent 2f3cefcc09
commit b31dbdc5ea
3 changed files with 58 additions and 0 deletions

View File

@ -399,3 +399,15 @@ ALTER TABLE llx_bom_bomline ADD COLUMN fk_default_workstation integer DEFAULT NU
ALTER TABLE llx_mrp_production ADD COLUMN fk_default_workstation integer DEFAULT NULL;
ALTER TABLE llx_facture ADD COLUMN subtype smallint DEFAULT NULL;
CREATE TABLE llx_c_invoice_subtype (
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1,
fk_country integer NOT NULL,
code varchar(3) NOT NULL,
label varchar(100),
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;
ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity, code);

View File

@ -0,0 +1,19 @@
-- ========================================================================
-- Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
--
-- ========================================================================
ALTER TABLE llx_c_invoice_subtype ADD UNIQUE INDEX uk_c_invoice_subtype (entity, code);

View File

@ -0,0 +1,27 @@
-- ========================================================================
-- Copyright (C) 2023 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <https://www.gnu.org/licenses/>.
--
-- ========================================================================
CREATE TABLE llx_c_invoice_subtype (
rowid integer AUTO_INCREMENT PRIMARY KEY,
entity integer DEFAULT 1,
fk_country integer NOT NULL,
code varchar(3) NOT NULL,
label varchar(100),
active tinyint DEFAULT 1 NOT NULL
) ENGINE=innodb;