[
https://issues.apache.org/jira/browse/OFBIZ-13343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054617#comment-18054617
]
Jacques Le Roux commented on OFBIZ-13343:
-----------------------------------------
bq. f I got correctly what you are writing, the total of the order becomes
equal to the amount invoiced as soon as you click on "Force Complete Purchase
Order", which sets the units not received to 'Cancelled'.
I did not push the "Force Complete Purchase Order". Just followed your steps.
So I received 4 items which was OK in invoice, but not order where the 11 items
are added up. But indeed if you push the "Force Complete Purchase Order" all
is OK (7 are cancelled), invoice included, apart if I'm missing something
there. I mean in this case the issue reported in the wiki
bq. the "Receive Against PO" screen has a bug that prevents the correct
receiving of shipments with more than one item; in fact, when the items are
received and added to the shipment, the shipment is marked as "Received" too
early (i.e. when the first item is added to the shipment), triggering the
invoice creation before the other items are added (and thus they are never
invoiced)
Is not concerned because of the "Force Complete Purchase Order" action which
clarifies the situation by cancelling the other (7) items.
So I'll push the PR, which clearly fixes the wiki issue:
bq. the "Receive Against PO" is available even after the shipment has been
marked as "Received", allowing to modify the shipment in the "Received" state,
i.e. after that an invoice for it has already been created; this prevents the
invoicing of the items after the first batch is received
And close here and let you handle the rest.
> When a shipment has already been marked as 'Received', the screen 'Receive
> Inventory Against Purchase Order' should not allow further items to be
> received
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-13343
> URL: https://issues.apache.org/jira/browse/OFBIZ-13343
> Project: OFBiz
> Issue Type: Bug
> Affects Versions: Upcoming Branch
> Reporter: Anahita Goljahani
> Assignee: Anahita Goljahani
> Priority: Minor
> Attachments: image-2026-01-19-17-24-04-960.png,
> image-2026-01-19-17-31-09-187.png, image-2026-01-19-17-32-57-030.png,
> image-2026-01-19-17-35-03-420.png, image-2026-01-19-17-36-38-951.png,
> image-2026-01-19-17-37-42-580.png, image-2026-01-19-17-40-43-808.png,
> image-2026-01-19-17-41-59-700.png, image-2026-01-19-17-54-09-062.png,
> image-2026-01-19-18-00-53-929.png, image-2026-01-19-18-17-46-191.png,
> image-2026-01-19-18-20-08-264.png, invoice_creation-1.png,
> invoice_creation.png
>
>
> Even when a shipment has already been marked as 'Received', by clicking on
> 'Receive Against PO', further items can be received and added to the shipment
> because the 'Receive Item(s)' button is not disabled. Considering that the
> event that marks the shipment as received triggers the creation of the
> corresponding Purchase Invoice, this behavior is problematic.
> To reproduce the issue:
> * Create a purchase order with, e.g., 11 units of GZ-1000 and approve it
> * In the order details page, click on 'New Shipment For Ship Group [00001]'
> and, then, on 'Receive Against PO'
> * Receive 7 units of the product by clicking on 'Receive Item(s)'
> * Click on 'View' to verify that, upon receipt, a shipment item for the
> seven units is associated with the shipment and that the shipment is marked
> as 'Received'.
> !image-2026-01-19-18-17-46-191.png|width=791,height=633!
>
> * Click on the 'Primary order ID' link and verify the an invoice has been
> created for the shipment
> !image-2026-01-19-17-54-09-062.png|width=288,height=110!
> !image-2026-01-19-17-32-57-030.png|width=727,height=133!
> * In the 'Shipment Information' section of the order details screen click on
> the 'Shipments Nbr' link to reopen the shipment and, then, click on 'Receive
> Against PO'
> !image-2026-01-19-17-35-03-420.png|width=447,height=393!
> * Notice that the 'Receive Item(s)' button is still enabled and, hence,
> further units can be received, e.g., 4 units
> !image-2026-01-19-17-37-42-580.png|width=531,height=311!
> * Click on 'View' and verify that the shipment item has been modified, even
> if the shipment had already been marked as 'Received'
> !image-2026-01-19-17-41-59-700.png|width=558,height=470!
> * Click on the 'Primary order ID' link and verify that the invoice has not
> been modified and still refers only to the first seven units received, since
> invoice creation is triggered when the shipment is marked as 'Received'
> !image-2026-01-19-18-00-53-929.png|width=387,height=148!
> !image-2026-01-19-18-20-08-264.png!
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)