July 12, 20187 yr Hello guys, good afternoon. I need help regarding how to add two payments. As you can see in the image below, there are payments below the BILLING record. What I want to happen is, I want to ADD those two payments. After the two payments were added, the payment will be put into the Pay Bill of the BILLING record. (See the picture below) Here's my script but it won't work: Quote Show All Records Sort Records [ Keep records in sorted order; Specified Sort Order: AGEING::BILLDATE; ascending ][ Restore; No dialog ] Go to Record/Request/Page[ First ] Loop If [ AGEING::TRCODE = 1 ] Go to Record/Request/Page[ Next; Exit after last ] Else If [ AGEING::TRCODE = 2 ] Set Variable [ $pay1; Value:AGEING::PAYBILL] Set Variable [ $pay2; Value:$pay2 + $pay1 ] Set Variable [ $pay3; Value:$pay2 ] Set Variable [ $pay2; Value:$pay3 ] Omit Record If [ AGEING::TRCODE = 1 ] Go to Record/Request/Page[ Previous; Exit after last ] Set Field [ AGEING::PAYBILL; $pay3 ] Set Variable [ $pay3; Value:0 ] Omit Record End If End If End Loop Show All Records Sort Records [ Keep records in sorted order; Specified Sort Order: AGEING::BILLDATE; ascending ][ Restore; No dialog ] Go to Record/Request/Page[ First ] Edited July 12, 20187 yr by Tondats
Create an account or sign in to comment