[ 
https://issues.apache.org/jira/browse/OFBIZ-6038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14301306#comment-14301306
 ] 

Sharan Foga commented on OFBIZ-6038:
------------------------------------

Hi Storm

I've taken a look at this and have done some testing to replicate your issue 
and I don't think there is a bug. I've managed to get the invoice generated 
even if some of the products have been rejected. I've checked that this works 
in both 12.04 and 13.07.  Please see below for the details of my test.

1. Create a PO from Company to Demo Supplier.
2. Use Product : GZ-1000 with Quantity = 1000
3. Finalise and Create the Purchase Order.
4. Approve the Purchase Order
5. Quick Receive Purchase Order 
6. Select Shipment to Receive then click  "Receive Selected Shipment"
7. Receive Selected Product(s)
8.On the next screen underneath the Shipment ID Number at the top of the screen 
on the left hand side - click the 'Set Shipment Status to Received' check box 
9. Enter Quantity Received = 950 and Quantity Rejected = 50
10. Click 'Receive Selected Products'

The Invoice should be created and it will be adjusted to include the actual 
amount of products received.

The key is using the 'Set Shipment Status to Received' check box on the 
shipment. It allows for any tolerance on the ordered amount which is very 
flexible. If you leave the check box blank  (which is the current default) then 
it will only generate the invoice if the quantities match.

The trigger for the invoice generation looks to be linked to the shipment 
status. If the shipment status is 'Received' then the invoice is generated and 
it is automatically set to 'Received' if the received quantity exactly matches 
the order quantity.

If the received quantity doesn't match the order quantity (so if you receive 
950 instead of 1000), the shipment status stays at 'Shipped' which means no 
invoice gets generated.

So I dont think that it is a bug – you just need to set the flag to set your 
shipments to the received status and the invoice will be generated on any 
amount tolerance.

I did notice something to beware of on the shipment side – if your Purchase 
Order is only expecting one shipment, this will set the PO status to 'Complete' 
once you have received some products (even if you didnt receive all your 
products e.g 950 instead of 1000.)  However if you indicate on the PO to expect 
multiple shipments then the PO will remain at the approved status until the 
full quantity has been received – then it will be set to complete and the 
invoice generated. 

Anyway please take a look at my test and try using this parameter to see if it 
fixes your problem.

Thanks
Sharan

> Problem with Purchase Order and Create invoice from Purchase Order!
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-6038
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6038
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting, framework, order
>            Reporter: Storm Trinh
>            Assignee: Sharan Foga
>
> Following steps i have done:
> 1. Create Purchase Order.
> 2. Approve Purchase Order.
> 3. Quick Receive Purchase Order
> 4. Select Shipment to Receive and Click Receive Selected Shipment
> 5. Receive Selected Products  ( Choose Inventory Item Type,  Quantity 
> Received (as Quantity Accepted), Quantity Rejected  - Reason)
>  - If  ((Quantity Accepted +  Quantity Rejected) >= Quantity Ordered), Ofbiz  
> call service to create accounting transaction for  Quantity Accepted  (not 
> for Quantity Rejected), then create invoice from Order.
>   However, when Quantity Accepted is not  equals Quantity from Order, Invoice 
> from order can't create and can't do it ==> I think it is a bug.
> In the fact that,  Quantity Rejected < Maximum quantity Rejected ( rule of 
> Supplier and Customer) meaning Quantity Accepted is not  equals Quantity from 
> Order,  Invoice from order will be created and create accounting transaction 
> for Quantity Rejected.
> Thanks!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to