You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Anil K Patel (Jira)" <ji...@apache.org> on 2026/06/19 08:39:00 UTC
[jira] [Commented] (OFBIZ-481) Over issuance on PO fails
[ https://issues.apache.org/jira/browse/OFBIZ-481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18090120#comment-18090120 ]
Anil K Patel commented on OFBIZ-481:
------------------------------------
This issue is no longer reproducible in current trunk.
The root cause was that createInvoicesFromShipments could throw an arithmetic exception when a PO was over-received, because the issue quantity was not capped to the available billable quantity.
Two fixes are in place:
1. The billAvail != null && billAvail.signum() == 1 guard (present since the initial SVN import) prevents processing issues when nothing remains billable.
2. Commit 62faabeba1 (2009-06-17, Ashish Vijaywargiya, OFBIZ-2620): "Applied patch from jira issue OFBIZ-2620 (Bug in InvoiceServices.createInvoicesFromShipments service)" caps ShipmentReceipt.quantityAccepted (not just quantity) to billAvail when the issued quantity exceeds what is available to bill. See InvoiceServices.java lines 1607-1626.
Suggesting this issue be marked Resolved / Fixed.
> Over issuance on PO fails
> -------------------------
>
> Key: OFBIZ-481
> URL: https://issues.apache.org/jira/browse/OFBIZ-481
> Project: OFBiz
> Issue Type: Bug
> Components: accounting
> Reporter: Iain Fogg
> Priority: Major
> Attachments: InvoiceServices.patch
>
>
> If you issue more items on a Purchase Order than was ordered (or remains to be billed), an execption is generated when trying to generate the invoice.
> The patch attached does 2 things (a) it tests for over-issuance on a purchase order, and (b) it asserts that if we issued more items than we ordered, then it means we are in a over-supply situation with our supplier. It seems that the correct course should be to invoice for the actual amount of items received, and offline address the over-supply with the supplier. There are many possibilities at this point, but if OFBiz has recorded that we have the items in inventory and that we've been invoiced for them, then that seems like a good place to start from.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)