Fix default value for situation invoice

This commit is contained in:
Laurent Destailleur 2019-12-22 11:59:38 +01:00
parent c6d50ff786
commit 22f3b69666
3 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,9 @@ ALTER TABLE llx_emailcollector_emailcollectoraction ADD COLUMN position integer
-- For v11
ALTER TABLE llx_facturedet MODIFY COLUMN situation_percent real DEFAULT 100;
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 20, 'BAS-K1-MINI', 'The Swedish mini chart of accounts', 1);
ALTER TABLE llx_c_action_trigger MODIFY COLUMN elementtype varchar(64) NOT NULL;

View File

@ -470,6 +470,9 @@ UPDATE llx_accounting_bookkeeping set date_creation = tms where date_creation IS
-- UPDATE llx_facturedet_rec set label = NULL WHERE label IS NOT NULL;
UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NULL AND fk_prev_id IS NULL;
-- Note to make all deposit as payed when there is already a discount generated from it.
--drop table tmp_invoice_deposit_mark_as_available;
--create table tmp_invoice_deposit_mark_as_available as select * from llx_facture as f where f.type = 3 and f.paye = 0 and f.rowid in (select fk_facture_source from llx_societe_remise_except);

View File

@ -63,8 +63,9 @@ create table llx_facturedet
fk_code_ventilation integer DEFAULT 0 NOT NULL, -- Id in table llx_accounting_bookeeping to know accounting account for product line
situation_percent real, -- % progression of lines invoicing
situation_percent real DEFAULT 100, -- % progression of lines invoicing
fk_prev_id integer, -- id of the line in the previous situation
fk_user_author integer, -- user making creation
fk_user_modif integer, -- user making last change