Merge of #1899 causes problems loading existing invoices #1954
Labels
type:blocking
Deemed "needs to be fixed before the assigned release"; unacceptable regressions or critical bugs
type:bug-accounting
Causes immediate accounting damage / warrants a release by itself
Milestone
@einhverfr As of the merge of #1899, I can't load existing invoices anymore. I'm getting:
Note that this is with the simple case of loading a single-line invoice (where the customer doesn't have customer-specific prices, but I think that doesn't matter).
The cause as I have been able to identify it, is that
$form->{rowcount}
is still''
orundef
during the loading of the invoice, which means that theqtycache
in the form doesn't get initialized for the specific part -- not even set to0
.Now, my first reaction was to use
// 0
; however, when I do that, I ignore the fact that (as per my comment on the code in #1899) that will lead to incorrect calculation of the qty discount (calculation based on zero items) for invoices that should have qty discounts applied.Is this a relatively easy fix? Or should we back out for the sake of stabilizing 1.5.0?
The text was updated successfully, but these errors were encountered: