Progress Payment Voucher Threshold by Cost Code
I'm looking to configure our progress payment applications to produce an error if an attempt to create a voucher with an amount that exceeds the amount open per cost code. I understand P4322 can be used in conjunction with processing options on P4314 to set thresholds per line item and I have that working, but its not solving my problem given the below scenario.
Let's say I have an order with 2 line items for account number 123456.1234.1234567:
Order Line 1 Amount Open: 6000
Order Line 2 Amount Open: -1000
My total open amount per cost code 123456.1234.1234567 is 5000 and I want to generate an error if there's an attempt to create a voucher with this account with amount over 5000.