Tondats Posted July 12, 2018 Posted July 12, 2018 (edited) 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, 2018 by Tondats
Recommended Posts
This topic is 2598 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now