Impossible generate invoice when order line tax has a child tax

Description

This error happens due to commit 505dd0553344 on class InvoiceGenerate.java (copy payment schedule from order) and happens when:
1) Tax is summary leval and has child tax (not included on price)
2) Payment term has schedules (lines)

The problem is that pay schedule is copied from order to invoice, and the grand total is not including yet the child tax amount. After that, the grandtotal is adjusted and when preparing the invoice, the error is raisen because invoice grandtotal is not equal schedule total.

Steps to reproduce:

  • Change 'Standard' tax to summary level in Tax Rate window

  • Create new tax and select 'Standard' as parent tax

  • Change Standard Price List, deselecting Price Includes Tax field.

  • Create new payment term, ex: 60 days net. IMPORTANT: in the Net Days field, keep 0, and create only one line(schedule): Percentage:100% and Net Days: 60

  • Create new standard sales order, and select the above new payment term.

  • Create a line (ex: elm product) and select the "Standard' tax

  • Complete order

  • Try to generate invoice using process or form, and it raises an error related to Payment Schedule: "Error in payment schedule Check the payment schedule"

Environment

None

Activity

Show:

Alan Lescano March 21, 2017 at 1:44 PM

Hi
For those who use Tax Provider, this can be an issue. In this case, the percentage is not set in the Tax Rate window, but usually set by calculation in the custom provider.

Carlos Ruiz March 16, 2016 at 9:42 PM

For documentation purposes - testing issues with child taxes - just found this issue can be caused if the summary tax percent is different than the sum of the children taxes.
In my test case set GST/PST percentage to zero and the issue described here happened.

Alan Lescano April 25, 2015 at 5:54 PM

Hi Carlos, I couldn't reproduce in 3.0. Probably was solved after 2.1 release. Thank you very much.

Carlos Ruiz April 22, 2015 at 7:16 PM

Hi , I was not able to reproduce the issue, maybe you can create the test case in one of the test servers?

Cannot Reproduce

Details

Assignee

Reporter

Affects versions

Priority

Created July 25, 2014 at 4:03 PM
Updated March 21, 2017 at 1:44 PM
Resolved April 25, 2015 at 10:03 PM