Hi OFBiz Community,

I came across an issue with purchase invoice tax GL posting in OFBiz
18.12.19 and would like the community's thoughts on it.

ISSUE
Tax lines on PURCHASE_INVOICE post with a blank GL account. Sales invoices
are unaffected.

ROOT CAUSE (as I understand it)
In TaxAuthorityServices.java, getTaxAdjustments() resolves the tax GL
account solely via TaxAuthorityGlAccount using organizationPartyId =
payToPartyId. If this does not match exactly, the query returns null,
overrideGlAccountId is never set, and the transaction posts blank with no
error or warning.

Furthermore, there is only a TODO comment at line 480 for the null case —
meaning InvoiceItemTypeGlAccount is never consulted as a fallback even if
correctly configured for PITM_SALES_TAX.

QUESTIONS FOR THE COMMUNITY
  1. Is this a known issue or intended behavior?
  2. Is there a standard configuration step I may have missed that handles
this case?
  3. Would a fallback to InvoiceItemTypeGlAccount be an acceptable fix, or
is there a design reason it was excluded?


Best regards,
Ilma Masroor

Reply via email to