Bug while posting Invoice for multiple organizations
Description
Discovered bug when multiple Accounting Schemas are used for Invoice posting. Let's imagine next example:
Org1: Account schema - Only Organization = NULL Org2: Account schema - Only Organization = Org2
When trying to post Vendor Invoice for Org1, Org2 is skipped but status is not set to "Posted" and error is returned (attached screenshot). Correct behaviour should be post Invoice for Org1 and skip Org2 without error.
I'm attaching patch to fix this use case.
Thanks for @Michal Zilincar and @Norbert Bede for support while debugging this use case. @Michal Zilincar please write down detailed explanation if it's needed.
Environment
None
Attachments
2
22 Oct 2015, 08:29 AM
29 Apr 2015, 02:27 PM
Activity
Show:
Heng Sin Low September 13, 2017 at 7:47 AM
Not reproduceable with current 4.1 code. Please reopen with test case if you can reproduce it.
Norbert Bede October 23, 2015 at 5:36 AM
tested working !
Tomáš Švikruha October 22, 2015 at 8:31 AM
Newly created class DocManager is missing validation for accounting schema organizations. Validation only on Doc.java was not enough in case of mentioned use case.
Discovered bug when multiple Accounting Schemas are used for Invoice posting. Let's imagine next example:
Org1: Account schema - Only Organization = NULL
Org2: Account schema - Only Organization = Org2
When trying to post Vendor Invoice for Org1, Org2 is skipped but status is not set to "Posted" and error is returned (attached screenshot). Correct behaviour should be post Invoice for Org1 and skip Org2 without error.
I'm attaching patch to fix this use case.
Thanks for @Michal Zilincar and @Norbert Bede for support while debugging this use case. @Michal Zilincar please write down detailed explanation if it's needed.