configurator_standard: use specific sale and purchase business processes
Using different business process is more flexible, it allows to configure different to build at different time, to generate different accounting etc. This introduce two different business processes and also modernize the configuration to: - generate accounting only for the supplier in sales - generate accounting only for the client in purchases - generate accounting using income/expense accounts defined on supplies - generate accounting without analytics (project, function) only for income/expense accounts and to fix an "infinite loop" with tax business link, it had the same predecessor and successor
-
Developer
@jerome when @Daetalus do osoe tutorial in a instance configurated by this configurator
he found that after add a invoice line in purchase invoice transaction:
only one payable accounting transaction line is generated.
according to @Yanni , it should have one payable and one receivable accounting transaction line
The problem seems because account_module/receivable is not set to Accounting Debit at
standard_purchase_business_process.ods
can you pls check it ?
-
Owner
Oh thanks, it really looks like this case is missing. I'll check this during this week and let you know.
The expense account for purchase invoices is supposed to be taken from the supply lines first (for example, on product or service "A", we choose the account from the "Purchase" tab), but if it's not defined on supply lines, there's supposed to have a default account configured on the trade model path, but as we can see on this spreadsheet it's not.
Sales seems to have the same problem.
-
Owner
according to @Yanni , it should have one payable and one receivable accounting transaction line
You should double check this, that's not correct. I saw this new published screenshot, that should not be like this: https://www.erp5.com/image_module/13249
I don't know a good introduction in english, maybe https://www.double-entry-bookkeeping.com/accounts-payable/what-is-accounts-payable/ is not bad, but it's a bit simplified because there is no tax.
This OSOE tutorial was correct, the accounts from this screenshot are correct and they include tax. The accounts are correct, but the amounts are strange, I this 750 should be the price before tax, so with a 20% tax, it should be:
Account Debit Credit Purchase 750 Refundable VAT 150 Supplier 900 That tutorial also does not explain how to configure trade model lines for tax.
Also, this new feature is interesting, if you want to document it in OSOE it would be good. The idea is that instead of generating on the default Purchase account, we can configure on the product or service which account should be used, by selecting the account on the "Purchase" tab of the product or service. This is useful, because it can generate different accounting depending on the product. For example if we are a company which purchases books and computers, we can create two purchase accounts, one for Books Purchase one for Computer Purchase and on each books product set the account to be books purchase and on computer products set the account to be computer purchase, then accounting is automatically generated on the corresponding accounts.
I'll keep looking at this to fix the issue so that it works even when no account is set on "Purchase" tab, but I wanted to point out that "one payable and one receivable" is not really correct and that this is now a more powerful feature.
-
Developer
@jerome @xiaowu.zhang I think xiaowu misunderstood me. If it is a sales, then the accounting lines should generate at least two lines: "Account receivable" and "Sales". If it is a purchase, then the accounting lines should generate at least two lines: "Account payable" and "Purchase". (This is the case without considering tax, if there's tax applicated, then there should be three lines generated for each case.)
This OSOE tutorial was correct, the accounts from this screenshot are correct and they include tax.
Yes, the original OSOE is correct. But I don't understand why the "General purchase condition" generated by default from the configurator does not define tax in the trade model lines, so I guess if the purchase that applicated this trade condition generates only two lines is understandable, but surely should not be one line. so my original questions were:
- why it generates only one accounting line?
- why the "general purchase trade condition" generated by default from the erp5 standard configurator does not define tax in the trade model line as it is supposed to be?
-
Owner
Thanks @Yanni , here's my answers:
- It generates only one line because of a bug. The "recommended" way would be when creating the product to choose on the purchase tab of the product the account to use as "Purchase" (this works, but OSOE tutorial does not do this). If we don't define the account on purchase tab of the product, then default "Purchase" account should be selected - but this is broken. I'm fixing right now, I think it will be OK at the end of this week.
- As far as I know configurator never generated configuration for tax, because the tax ratio and the taxes are different in every country and this does not really target a specific country. So configuring the tax is "user configuration" that can be done by adding trade model line in trade condition.
If you are updating OSOE tutorial and want to include more, we can discuss, but first I'm repairing this bug.
-
Developer
Thanks Jerome. The reason we are discovering this is that we are updating the OSOE tutorial to the new interface, JP would like we keep minimum change on the steps of the OSOE tutorial, so we try to keep everything same.
1.It generates only one line because of a bug. The "recommended" way would be when creating the product to choose on the purchase tab of the product the account to use as "Purchase" (this works, but OSOE tutorial does not do this). If we don't define the account on purchase tab of the product, then default "Purchase" account should be selected - but this is broken. I'm fixing right now, I think it will be OK at the end of this week.
So yes, we would like this to be fixed, so we don't have to add extra steps to the tutorial.
2.As far as I know configurator never generated configuration for tax, because the tax ratio and the taxes are different in every country and this does not really target a specific country. So configuring the tax is "user configuration" that can be done by adding trade model line in trade condition.
In original OSOE, there are no steps telling the reader to edit trade model lines in trade condition to add tax calculation, but the screenshot gives a tax line, I guess maybe this step has to be added to the tutorial, otherwise, we only show a screenshot with two accounting lines.
-
Owner
My theory is that the accounting lines might have been created by hand, the amount are 603 and 147, this does not seem an actual VAT rate.
-
Developer
it's very possible, when jingling made this, probably she made it by hand just to make a screenshot.
-
mentioned in merge request !1364 (merged)
-
Owner
I'm suggesting a fix in !1364 (merged)