Having difficulty figuring out the XSL to send a proper email confirmation to a patron that orders an unseated Fixed Seat package, pays with a payment plan, and has an alternate seating choice. The challenge is this:
Typically, the order confirmations figure up the total of a package by summing the sub-lineitems with an SLI_status of Seated, Unpaid (2); Seated, Paid (3); Unseated Paid (6); or Ticketed, Paid (12).
When a payment plan is used, some sub-lineitems have have an SLI_status of (1) Unpaid.
All sub line items for the alternate seating choice also have an SLI_status of (1) Unpaid. This prevents me from using it to come up with an accurate total for the package, because it will include all sub-lineitems with SLI_status (1) in the sum, which nets no only unpaid subline-items, but also the alt seating sub-lineitems. I can't see another way to differentiate the secondary choice sub-lineitems from the primary choice subline items.
Does anyone out there have some XSL that accurately sums the package total without looking at the SLI_status alone to determine if it shold be included? It needs to take more into account to accurately do the math and account for different situations.
I'm currently trying to work with something like the following:
sum(//GetOrderDetailsInfoResults/SubLineItem[pkg_no!=0 and (sli_status= 1 or sli_status=2 or sli_status=3 or sli_status=12 or sli_status=6) and li_seq_no = preceding-sibling::LineItem[primary_ind=y]/li_seq_no]/due_amt)
That's not working, but the logic seems sound - Syntax probably isn't right. Thoughts?
Got it. It looks like this for us:
sum(//GetOrderDetailsInfoResults/SubLineItem[pkg_no!=0 and (sli_status=1 or sli_status=2 or sli_status=3 or sli_status=12 or sli_status=6) and li_seq_no = //LineItem[primary_ind='Y']/li_seq_no]/due_amt)
If fees need to be added those can be added to this and summed separately.