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

Export Chart of Accounts #7853

Open
howardlowndes opened this issue Dec 18, 2023 · 5 comments
Open

Export Chart of Accounts #7853

howardlowndes opened this issue Dec 18, 2023 · 5 comments
Labels
type:enhancement Proposed improvement, new feature, or extension -- not a defect

Comments

@howardlowndes
Copy link

Version

1.11.6

What browsers are you seeing the problem on?

This problem isn't browser related

What happened?

Under General Ledger there is an option Import Chart. Selecting this presents:

The following fields are expected (in this order):
accno
description
charttype
category
contra
tax
link
heading
gifi_accno

The understanding here is that the format should be CSV with items in the "link" field being NewLine separated. This assumption is derived from studying the CSV output from General Ledger->Chart of Accounts (selection attached):

howard@raspi-office:~ $ head -n20 Downloads/Chart_of_Accounts.csv
"Account Number","Description","GIFI","Debits","Credits","Dropdowns","Delete"
1,"ASSETS",,0.00,0.00,,
1.10,"HUME BANK",,0.00,0.00,,
1.10.10,"Business Transaction",,0.00,0.00,"AR_paid
AP_paid","[Delete]"
1.10.20,"Community Link",,0.00,0.00,,"[Delete]"
1.10.30,"Term Deposit",,0.00,0.00,,"[Delete]"
1.20,"NON-BANK",,0.00,0.00,,
1.20.10,"Merchant Card",,0.00,0.00,"AR_paid","[Delete]"
1.20.20,"Petty Cash",,0.00,0.00,"AP_paid","[Delete]"
1.20.30,"Cash in Hand",,0.00,0.00,"AR_paid","[Delete]"
1.20.40,"GST Input (Collectable)",,0.00,0.00,"AP_tax
IC_taxpart
IC_taxservice","[Delete]"
1.30,"ACCOUNTS RECEIVABLE",,0.00,0.00,,
1.30.10,"Sundry Debtors",,0.00,0.00,"AR","[Delete]"
1.30.20,"Debtor Payments",,0.00,0.00,"AR_paid","[Delete]"
1.30.30,"Provision for Doubtful Debts",,0.00,0.00,"AR_overpayment","[Delete]"
1.40,"PLANT & EQUIPMENT",,0.00,0.00,,
1.40.10,"Plant & Equipment @ Valuation",,0.00,0.00,"Fixed_Asset","[Delete]"
howard@raspi-office:~ $

It makes sense to this user, who is trying to develop a CoA, that this output format could be developed into a Export Chart option with obvious benefits to the SMB user.

What should have happened?

Similar remarks might be made about the Import options under Goods & Services being developed from the Search function there, though this might be more complex.

@ehuelsmann ehuelsmann added the type:enhancement Proposed improvement, new feature, or extension -- not a defect label Dec 19, 2023
@ehuelsmann ehuelsmann changed the title Enhancement - Import Chart of Accounts Export Chart of Accounts Dec 19, 2023
@ehuelsmann
Copy link
Member

I think the query you're looking for is:

select accno, description, 'H' as charttype, null as category, null as contra, null as tax, null as link, (select accno from account_heading h2 where h2.id = h.parent_id) as heading, null as gifi_accno
from account_heading h
union all
select accno, description, 'A', category, contra, tax, (select string_agg(description, ':') from account_link where account_link.account_id = a.id) as link, (select accno from account_heading h where h.id = a.heading), gifi_accno
from account a

@ehuelsmann
Copy link
Member

My idea is not to allow exporting of the CoA the way you describe, but to export it in a format that can be imported during company creation/setup so they can be exported and donated to the project, similar to the ones you can find here: https://github.com/ledgersmb/LedgerSMB/tree/master/locale/coa

@ehuelsmann ehuelsmann added the waiting-for-user Issue can't progress unless feedback from reporter is received label Dec 23, 2023
@howardlowndes
Copy link
Author

I agree that the XML route is better for the project. I was wondering whether there was a "quick and dirty" method - probably not a good idea in light of the tight intergration of the database.

@github-actions github-actions bot removed the waiting-for-user Issue can't progress unless feedback from reporter is received label Dec 24, 2023
@howardlowndes
Copy link
Author

howardlowndes commented Dec 26, 2023 via email

@ehuelsmann
Copy link
Member

The "Negative balance heading" setting is described here: https://book.ledgersmb.org/dev/full-book/#Ch18.S3.SS3 ; so are Tax and Contra (scroll a bit down on that page in the same section).

Not sure what you'd like to know about depreciation, but there is some documentation in the subsection 'Fixed assets' in the section linked in the previous paragraph (just befor the section "Special accounts").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Proposed improvement, new feature, or extension -- not a defect
Projects
None yet
Development

No branches or pull requests

2 participants