Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-4630

Wrong invoice for drop shipment orders when you cancel order item(s)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Release Branch 11.04, Trunk, Upcoming Branch
    • None
    • accounting, order
    • None
    • Bug Crush Event - 21/2/2015

    Description

      To produce the problem, please, use the demo data (from OFBiz release), do not use any promotions. The sales tax in my case is set in VAT style, i.e. 19% for all products and shipping charge, and I retired all demo sales taxes for USA.

      Please, create an order with drop shipment products.
      In my test case, I added 2 "dropShip1" and 1 "dropShip2" products, so we have 2 shipping groups, I set the 10 USD cost for both shipping charges.

      The payment way : is offline payment

      As result, I have one Sales order and 2 Purchase orders.
      Please, see the "1-just_created_order.PNG" screenshot.
      Now, I am going to cancel one of item, so the system makes tax correction, you can see the result on the next screenshot : "2-item_is_cancelled.PNG".
      On this step all look correct, the total due has the right value.

      Now, I have completed the order, by completing the purchase order.
      What we have you can see on the next screenshot: "3-order-completed.PNG"

      Also, the system generated the invoice.
      But the invoice looks strange, you can see it in the attachment:
      "CI5-invoice.PNG".

      Total sum is $41.60 instead of $45.19, Total excl. tax is also wrong.

      dropShip1 DropShip from DemoSupplier 2 $13.99 $27.98
      Invoice Item Sales Tax $5.32
      Invoice Item Shipping and Handling $10.00
      Invoice Item Shipping and Handling $10.00
      Invoice Item Shipping and Handling ($10.00)
      Invoice Item Sales Tax $1.90
      Invoice Item Sales Tax $2.03
      Tax adjustment due to order change ($5.63)
      TOTAL $41.60
      Total excl. tax $37.98

      It is obvious that there is a mistake, I think on the invoice creating phase.
      From my side, I can say that is not convenient to have cancelled shipping charges in the invoice.
      Also, I prefer a little bit another way for tax correction (recalcOrderTax service).
      Why we add a header compensation adjustment to the order in case if an item was cancelled and the tax must not used. Why not to create the compensation adjustment and associate it with the according ship group and item?
      Example, if an item is cancelled its sales tax will be reduced to zero by the same sales tax amount(s) but with negative sign.

      Attachments

        1. CI5-invoice.pdf
          10 kB
          Sergei Biletnikov
        2. 3-order-completed.PNG
          42 kB
          Sergei Biletnikov
        3. 1-just_created_order.PNG
          46 kB
          Sergei Biletnikov
        4. 2-item_is_cancelled.PNG
          44 kB
          Sergei Biletnikov

        Activity

          People

            Unassigned Unassigned
            sbiletnikov Sergei Biletnikov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: