Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPEC : FEC import/export table #7017

Closed
ffries opened this issue Jun 15, 2017 · 1 comment
Closed

SPEC : FEC import/export table #7017

ffries opened this issue Jun 15, 2017 · 1 comment

Comments

@ffries
Copy link

ffries commented Jun 15, 2017

Title

FEC is an import/export format for French accounting, requested by French administration in year end. This SPEC discusses the place of FEC data. Should it be stored within Dolibarr table of acccounting entries or should it be a separate table.

Present behavior

FEC data is stored with the main Dilibarr accounting entry table:

CREATE TABLE llx_accounting_bookkeeping ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- | multi company id doc_date date NOT NULL, -- FEC:PieceDate doc_type varchar(30) NOT NULL, -- FEC:PieceRef | facture_client/reglement_client/facture_fournisseur/reglement_fournisseur doc_ref varchar(300) NOT NULL, -- | facture_client/reglement_client/... reference number fk_doc integer NOT NULL, -- | facture_client/reglement_client/... rowid fk_docdet integer NOT NULL, -- | facture_client/reglement_client/... line rowid code_tiers varchar(32), -- FEC:CompAuxNum | account number of auxiliary account thirdparty_label varchar(255), -- FEC:CompAuxLib | label of auxiliary account numero_compte varchar(32) NOT NULL, -- FEC:CompteNum | account number label_compte varchar(255) NOT NULL, -- FEC:CompteLib | label of account label_operation varchar(255), -- FEC:EcritureLib | label of the operation debit double NOT NULL, -- FEC:Debit credit double NOT NULL, -- FEC:Credit montant double NOT NULL, -- FEC:Montant (Not necessary) sens varchar(1) DEFAULT NULL, -- FEC:Sens (Not necessary) multicurrency_amount double, -- FEC:Montantdevise multicurrency_code varchar(255), -- FEC:Idevise lettering_code varchar(255), -- FEC:EcritureLet date_lettering datetime, -- FEC:DateLet fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date tms timestamp, -- | date last modification import_key varchar(14), code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib piece_num integer NOT NULL, -- FEC:EcritureNum validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification) date_validated datetime -- FEC:ValidDate ) ENGINE=innodb;

Proposed behavior

Inclusion of FEC data makes Dolibarr self-centered on French accounting rules.

Those rules might be common on the European continent, but it may slow adoption of Dolibarr in other countries. Remember that FEC is only an import/export mechanism. When the French administation request to use "one or a few" sub-accounts, it is only for ease and verification purpose.

Also, third-party accounting sofware might be dependent on certain values. The example is the handling of 410 client and 401 receivable in French accounting. An import/export file might carry dedicated children 410/401 accounts or only 410/401.

Therefore, it may be interesting to create a dedicated llx_accounting_fec table. This table can carry fec data in a 1:1 relationship on llx_accounting_bookkeeping.

An interesting scenario is end-year export. If your database contains dedicated 401/410 accounts (ex: one dedicated account for each account), llx_accounting_fec will allow very easily to export data using single 401/410 accounts. Still, it will not request to modify the chart of accounts.

Also, it might offer fine-grainded imports. You can import the file to llx_accounting_fec and then process it to store accounting values within dedicated accounts.

Discussion

Please discuss this spec and I will modify it accordingly.

@eldy
Copy link
Member

eldy commented Jun 20, 2017

@aspangaro is working on FEC export. Some enhancement will be provided with future versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants