[jira] [Commented] (OFBIZ-6038) Problem with Purchase Order and Create invoice from Purchase Order!

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Commented] (OFBIZ-6038) Problem with Purchase Order and Create invoice from Purchase Order!

Nicolas Malin (Jira)

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

Storm Trinh commented on OFBIZ-6038:
------------------------------------

Dear Sharan,

I'm using OFBiz 12.04, however i also test it at OFBiz 13.07 (stable), the same result too.

Example :
1. I create PO from Company to Demo Supplier.
2. Choosing Product : GZ-1000 with Quantity = 1000
3. Finishing some step to create Order.
4. Approve PO
5. In Action tab, choose  "Destination Facility" then click "Quick Receive Purchase Order"
6. Select Shipment to Receive then click  "Receive Selected Shipment"
7. Receive Selected Product(s)
IF i choose Qty Received = 1000 and Qty Rejected = 0 then click "Receive Selected Product(s)", OFBiz create accounting transaction with Qty Received = 1000( C : creditAccountTypeId=UNINVOICED_SHIP_RCPT, D : Debit glAccountTypeId = INVENTORY_ACCOUNT) then create invoice.

IF i choose Qty Received = 950, choosen Rejection Reason : Damaged and Qty Rejected = 50 then click "Receive Selected Product(s)", OFBiz create accounting transaction with Qty Received = 950 ( C : creditAccountTypeId=UNINVOICED_SHIP_RCPT, D : Debit glAccountTypeId = INVENTORY_ACCOUNT) then not create invoice.

The problem occur when OFBiz call service "updatePurchaseShipmentFromReceipt"  ( method "updatePurchaseShipmentFromReceipt" in ShimentServices.java) :            
            if (!shippedCountMap.equals(receivedCountMap)) {
                return ServiceUtil.returnSuccess();
               // ShippedCountMap : 1000, receivedCountMap = 950 ==> not call "updateShipment" ==> not create invoce.
            }
            // now update the shipment
            dispatcher.runSync("updateShipment", UtilMisc.<String, Object>toMap("shipmentId", shipmentId, "statusId", "PURCH_SHIP_RECEIVED", "userLogin", userLogin));

I propose : we need using "tolerance" (example +/- 5% on value and quantity is allowed) to resolve it and create accouting transaction for it.

Moreover, i think in simple-method "createAcctgTransForShipmentReceipt", we need  process for all product type:
 - Raw Material with  Debit glAccountTypeId = RAWMAT_INVENTORY
 - WIP with  Debit glAccountTypeId = WIP_INVENTORY
 - Finished Good  with  Debit glAccountTypeId = INVENTORY_ACCOUNT

Thank 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)