Back to connectors… Back to Sage 200...

Batch Totals for Purchase Invoices (7 replies)

David F
6 years ago
David F 6 years ago

One of my customers is going live today and decided at the 11th hour that they want a batch total adding to the audit summary in the Sage 200 Connector. What is the easiest way to do this?

Support
6 years ago
Support 6 years ago

David, you can map an empty field to the Posted Document Total and that will allow you to display the total for the invoice/credit note. I would let your customer go down this route as it's easier.

What may be difficult would be to get a batch total (since Sage200 doesn't really have a concept of a batch):

  1. Place a filter after the Sage200 to filter unsuccessful documents.
  2. Hierarchise the data so you have a Batch level, then the documents, then the details.
  3. Add a map transform which sums the total of the documents and use this field on the Audit summary (of the Map transform).

Thanks

David F
6 years ago
David F 6 years ago

Thank you for advising me. I implemented the three steps and get the following error:

Error occurred whilst processing transform [BatchTotal].

Invalid procedure call or argument

 

Where BatchTotal is the name of the map transform in step 3 above

David F
6 years ago
David F 6 years ago

Here is the full stack trace less any customer-specific info:

Invalid procedure call or argument
Time='03/05/19 16:52:22' App='IManEngine:3.2.100' ADO-version='6.3' Computer=''
Method: TransformTaskListGenerator.PerformSubstitution
Number: 5 = &H5 = vbObjectError + 2147221509 = ERRMAP_APP_FIRST + 2147216311
Source: IManEngine
Description: Invalid procedure call or argument
Call Stack: TransformTaskListGenerator.PerformSubstitution(sStatement={Text}) --------------------
Value Of sStatement:
'Filename: %[PLInvoice.SYS.INPUTFILE], Total Amount: %[PLInvoice.TotalAmount]'
Env: m=1, lOffset=21, sResult={Text}
Value Of sResult:
'Filename: sageinvs00000001.csv, Total Amount: %[PLInvoice.TotalAmount]'
Call Stack: TransformTaskListGenerator.GenerateMatchingFiles(sStatement={Text}) ------------------
Value Of sStatement:
'Filename: %[PLInvoice.SYS.INPUTFILE], Total Amount: %[PLInvoice.TotalAmount]'
Env: l=1, sTransactionId='PLInvoice'
Call Stack: AuditLogger.ReplaceSummaryTokens(sTfmId='BATCHTOTAL', sSummaryString={Text}) --------
Value Of sSummaryString:
'Filename: %[PLInvoice.SYS.INPUTFILE], Total Amount: %[PLInvoice.TotalAmount]'
Env: l=0, sResult =''
Call Stack: AuditLogger.GenerateEmailHeader() ----------------------------------------------------
Env: l=1, sResult={Text}
Value Of sResult:
'

Batch Total for Purchase Transactions File

'
Call Stack: AuditLogger.AddTransformSummaries(sTransformId='BATCHTOTAL') -------------------------
Call Stack: TransformCoordinator.RunTransform(sTransformId='BATCHTOTAL') -------------------------
Env: eTransformType=5, bWriteSummaries=True, bSummariesHandled=False
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='GROUPBYFILENAME') ----------
Env: sTransformId='BATCHTOTAL', l=0, m=0
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='REMOVEDUPLICATES') ---------
Env: sTransformId='GROUPBYFILENAME', l=2, m=2
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='SUPPLIEREXISTS') -----------
Env: sTransformId='REMOVEDUPLICATES', l=0, m=0
Call Stack: TransformCoordinator.RunTransformStream(sParentTransform='') -------------------------
Env: sTransformId='SUPPLIEREXISTS', l=0, m=0
Call Stack: TransformCoordinator.Process() -------------------------------------------------------
Call Stack: IntManEng.Main() ---------------------------------------------------------------------
Env: sCmd='"OPALS200PURCH"'

Support
6 years ago
Support 6 years ago

It would appear from the error there's an issue with the InvoiceTotal field.

Is this a field? Can you send a screenshot of the field in the Preview?

 

https://www.realisable.co.uk/wp-content/uploads/2019/03/AuditSummary.png
Support
6 years ago
Support 6 years ago

David, try removing the square brackets.

Filename: %PLInvoice.SYS.INPUTFILE, Total Amount: %PLInvoice.TotalAmount

David F
6 years ago
David F 6 years ago

I removed the brackets. This enabled the TotalAmount to appear in the audit report. However, SYS.INPUTFILE which is part of the hierarchy appeared as 0. Does this still need to be in square brackets?

Support
6 years ago
Support 6 years ago

Try that; this is a bug in our old code (which the Map transform still is).

Contact

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Request Demo

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close

Access Downloads

Realisable Software Ltd provides code-free, cost-effective applications integration solutions for SMEs. Our core IMan product is designed to integrate almost any application with a number of Sage solutions and online payment processors.

Looking to purchase IMan, please see our resellers here.

Realisable Software
Ph: +44 (0) 208 123 1017

Copyright © Realisable. All rights reserved.
Realisable is a registered trademark

Close