is there a link between a transaction line and the...
# suiteql
d
is there a link between a transaction line and the posting, line-level discount affecting it? I know how to identify a header level discount, it's
id = 0
and
transactionDiscount='T'
It's easy enough if we have:
Copy code
line 1, item
line 2, posting discount-item
But I have examples of:
Copy code
line 1, item
line 2, item
line 3, subtotal
line 4, posting discount-item
The logic is relatively straight forward, if the following line is a posting discount, that's it. If you run into a subtotal followed by a discount, then that's it.
Potentially this from Nick confirms my suspicion:
In contrast if you use a posting discount you have to explictly supply the dept, class, etc. segment. And then you have to use fancy SQL row windowing command to look back or look ahead 1 row in your reporting.