Historical Aged Trial Balance script

I've struggled mightily with the Historical Aged Trial Balance report for years.

<begin diatribe>

The technique is to take all the invoices from the beginning of time, subtract all the payments from the beginning of time, and then display the data.

But, I've yet to find a GP install where all the documents where there. There's always a missing payment, or invoice, or apply record. Always. Then I have to explain to the client why my report doesn't match GPs.

I give up.

</end diatribe>

<smiles>

Here's the script that GP uses to run this report. That's what I'm using from now on.

 

exec seermHATBSRSWrapper
@I_dAgingDate='2014-07-16 00:00:00',
@I_cStartCustomerNumber=N'a',@I_cEndCustomerNumber=N'b',
@I_cStartCustomerName=N'',@I_cEndCustomerName=N'',
@I_cStartClassID=N'',@I_cEndClassID=N'',
@I_cStartSalesPersonID=N'',@I_cEndSalesPersonID=N'',
@I_cStartSalesTerritory=N'',@I_cEndSalesTerritory=N'',
@I_cStartShortName=N'',@I_cEndShortName=N'',
@I_cStartState=N'',@I_cEndState=N'',
@I_cStartZipCode=N'',@I_cEndZipCode=N'',
@I_cStartPhoneNumber=N'',@I_cEndPhoneNumber=N'',
@I_cStartUserDefined=N'',@I_cEndUserDefined=N'',
@I_tUsingDocumentDate=0,
@I_dStartDate='1900-01-01 00:00:00',@I_dEndDate='2014-07-16 00:00:00',
@I_sIncludeBalanceTypes=0,        -- 0 = yes
@I_tExcludeNoActivity=1,          -- 0 = yes
@I_tExcludeMultiCurrency=1,       -- ?
@I_tExcludeZeroBalanceCustomer=1, -- 1 = yes
@I_tExcludeFullyPaidTrxs=1,       -- 1=yes
@I_tExcludeCreditBalance=0,       -- 0 = no
@I_tExcludeUnpostedAppldCrDocs=1, -- 1 = yes
@I_tConsolidateNAActivity = 0     -- ?
 

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences