[jira] [Closed] (OFBIZ-6269) Pro-rate shipping calculation is generating incorrect invoice in case of order with subtotal $0.00

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

[jira] [Closed] (OFBIZ-6269) Pro-rate shipping calculation is generating incorrect invoice in case of order with subtotal $0.00

Nicolas Malin (Jira)

     [ https://issues.apache.org/jira/browse/OFBIZ-6269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacopo Cappellato closed OFBIZ-6269.
------------------------------------
       Resolution: Fixed
    Fix Version/s: Upcoming Branch
                   13.07.02
                   12.04.06
                   14.12.01

> Pro-rate shipping calculation is generating incorrect invoice in case of order with subtotal $0.00
> --------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-6269
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6269
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: Release Branch 14.12, Trunk
>            Reporter: Mohammad Kathawala
>            Assignee: Jacopo Cappellato
>             Fix For: 14.12.01, 12.04.06, 13.07.02, Upcoming Branch
>
>
> Scenario:
> I have finished products with price $0.00 in my system. There is a requirement to place an order with $0.00 price product. As I also need to fulfill this order, I need to have Shipping method applied here (Other than No Shipping method). So what I am doing is place the order with $0.00 subtotal and Shipping lets say of $20.00 so that order total is $20.00. The order gets placed successfully in Ofbiz OOTB.
> Now in order to make the order total $0.00 (requirement of not charging any amount for the order) I apply manual discount of $20.00 from order view page to cancel the shipping charges of $20.00.
> Issue:
> The issue comes when fulfilling the order. The invoice created on quick shipping the order is not correct. Shipping amount and discount are not included in invoice.
> Reason:
> The issue is coming in 'createInvoiceForOrder' service. Here in this service, invoice items corresponding to all the order items and adjustments are created. At time of invoicing adjustment of type 'SHIPPING_CHARGES' (approx. line no. 712 of InvoiceServices.java), calculation of pro-rate shipping is done. This is where we are having issue in our scenario. The shippable total in our case is 0. This in turn make the 'divisor' and 'multiplier' used for pro-rate shipping 0. That is why the Shipping Adjustment is not getting invoiced in our case.



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