Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
unidentified user
Kathryn
Posts: 2
Registered: 11-03-2011
0

VI data validation to prevent duplicate invoices?

When posting AP invoices manually, MAS 90 has validation logic that prevents a duplicate invoice number from being posted to the same vendor. Is there a way to create this same check mechanism when importing with VI? It works as long as the first version of the invoice is still unposted when the duplicate attempts to import. However, if an invoice has already been posted the second copy will import and can also be posted without any warnings.

Switcher
BigLouie
Posts: 2,689
Registered: 10-28-2008
0

Re: VI data validation to prevent duplicate invoices?

[ Edited ]

Welcome to the Sage Community Kathryn!

 

In the past I have used perform logic but it depends on what level of MAS you are on. In version where the module is on the business framework there is a check box to skip over existing records. In your case you have not stated which version you are on so I cannot give you a definate answer.

Big Louie No MBA but BMOC
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.
unidentified user
Kathryn
Posts: 2
Registered: 11-03-2011
0

Re: VI data validation to prevent duplicate invoices?

I am working with version 4.3. The skip records check box does not resolve the problem because it only works for records in the same table. Once the invoices are posted, they are moved out of AP_InvoiceHeader and into the invoice history tables.

 

I saw the Perform logic and though this might be a possibility, but I have not used this functionality before. Do you have to be a Master Developer to right the program that would run under the Perform?

Switcher
BigLouie
Posts: 2,689
Registered: 10-28-2008
0

Re: VI data validation to prevent duplicate invoices?

Nope. It is just a text file that you run on job completion.

Big Louie No MBA but BMOC
--------------------------------------------------------------------------
You have enemies? Good. That means you've stood up for something in your life.
Sage MAS Partner
amazingsol
Posts: 4
Registered: 11-14-2008
0

Re: VI data validation to prevent duplicate invoices?

[ Edited ]

I've written the following Perform Logic to assign invalid values to the vendor number and invoice number if a duplicate invoice is found in the AP_OpenInvoice file.  It is set to run Prior to Write.  The program runs without error but still imports invoices that are already on file.  We're using V4.4 of MAS90.  Here's my code:

 

0010 IF AP_OpenInvoice_CHN<>0 THEN GOTO 0030

0020 OPEN(HFN)"../MAS_"+CCOMP$+"/AP"+CCOMP$+"/AP_OpenInvoice.M4T";AP_OpenInvoice_CHN=LFO

0030 READ(AP_OpenInvoice_CHN,KEY=PRE_APDivisionNo$:smileytongue:RE_VendorNo$:smileytongue:RE_InvoiceNo$,DOM=0050)

0040 PRE_APDivisionNo$="XX",PRE_VendorNo$="XXXXXXX";PRE_InvoiceNo$="XXXXXXXXXX"

0050 EXIT

 

Any thoughts would be appreciated!

Mark

Sage MAS Partner
amazingsol
Posts: 4
Registered: 11-14-2008
0

Re: VI data validation to prevent duplicate invoices?

I don't know where the smily faces came from when I posted the last message but they are colons in my code.

Sorry!
Mark