Skip to content
Snippets Groups Projects
Commit 71c0be20 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Change data structure for bookkeeping v6

parent 73977639
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,7 @@ Contact/address Contact person Partner/Contact (individual) ...@@ -8,7 +8,7 @@ Contact/address Contact person Partner/Contact (individual)
Financial ?? Invoicing Financial ?? Invoicing
Income / Expense ?? Profit / Loss Income / Expense ?? Profit / Loss
Balance Net profit Balance ?? Net profit
Subledger account Subledger account ??
...@@ -188,9 +188,18 @@ ALTER TABLE llx_bank_account ADD CONSTRAINT fk_bank_account_accountancy_journal ...@@ -188,9 +188,18 @@ ALTER TABLE llx_bank_account ADD CONSTRAINT fk_bank_account_accountancy_journal
--Update general ledger for FEC format & harmonization --Update general ledger for FEC format & harmonization
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_tiers varchar(32); ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_tiers varchar(32);
ALTER TABLE llx_accounting_bookkeeping CHANGE COLUMN code_tiers thirdparty_code varchar(32);
--Subledger account
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN subledger_account varchar(32);
ALTER TABLE llx_accounting_bookkeeping CHANGE COLUMN thirdparty_label subledger_label varchar(255); -- If field was already created, rename it
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN subledger_label varchar(255) AFTER subledger_account; -- If field dod not exists yet
update llx_accounting_bookkeeping set subledger_account = numero_compte where subledger_account IS NULL;
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN label_compte varchar(255); ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN label_compte varchar(255);
ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32); ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32);
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN thirdparty_label varchar(255) AFTER code_tiers;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN label_operation varchar(255) AFTER label_compte; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN label_operation varchar(255) AFTER label_compte;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_amount double AFTER sens; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_amount double AFTER sens;
ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_code varchar(255) AFTER multicurrency_amount; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN multicurrency_code varchar(255) AFTER multicurrency_amount;
......
...@@ -26,8 +26,9 @@ CREATE TABLE llx_accounting_bookkeeping ...@@ -26,8 +26,9 @@ CREATE TABLE llx_accounting_bookkeeping
doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number
fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid
fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid
code_tiers varchar(32), -- FEC:CompAuxNum | account number of auxiliary account thirdparty_code varchar(32), -- Third party code (customer or supplier) when record is saved (may help debug)
thirdparty_label varchar(255), -- FEC:CompAuxLib | label of auxiliary account subledger_account varchar(32), -- FEC:CompAuxNum | account number of subledger account
subledger_label varchar(255), -- FEC:CompAuxLib | label of subledger account
numero_compte varchar(32) NOT NULL, -- FEC:CompteNum | account number numero_compte varchar(32) NOT NULL, -- FEC:CompteNum | account number
label_compte varchar(255) NOT NULL, -- FEC:CompteLib | label of account label_compte varchar(255) NOT NULL, -- FEC:CompteLib | label of account
label_operation varchar(255), -- FEC:EcritureLib | label of the operation label_operation varchar(255), -- FEC:EcritureLib | label of the operation
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment