Sage MAS 90 and 200 Sage MAS 500 blogs Product Feedback Support Training
Reply
Regular Contributor
JOE-B
Posts: 122
Registered: 03-12-2009
0

VI add a line to AP invoice after import

Hi all...  

I am importing into AP Invoice entry.  this is for commissions (to non-employees) of sales through a different system.  some of the payees receive a standard advance (set amount).  to minimize work (and prevent overpayment) my thought was to add a line to the payee's invoice created in MAS with a negative amount.  but how can I do that?  that data is not on the import file.  

 

any thoughts? 

Joe Bartoli
IT Manager
Granitize Products inc
Regular Contributor
JOE-B
Posts: 122
Registered: 03-12-2009
0

Re: VI add a line to AP invoice after import

oops... sorry sent this twice

Joe Bartoli
IT Manager
Granitize Products inc
Regular Contributor
timmjlane
Posts: 97
Registered: 02-11-2009
0

Re: VI add a line to AP invoice after import

Answered in previous thread...copied here too.

 

If you want to do this through the import it would have to be in the file.

 

The other option would be to go into AP Invoice Data Entry after the import and manually add the negative amount.

Jeremy Lane
MAS200 Ver. 4.4 PU6
Sage Employee
smalm
Posts: 50
Registered: 11-12-2008
0

Re: VI add a line to AP invoice after import

JOE-B,

 

If you are running v4.40 this is possible using User-defined scripts in Custom Office.  See the sticky post at the top of this board for some video demonstrations.  Not knowing exactly what you are trying to do, you have the ability to tie some VB script to an event called PreTotals() at the table level for the AP_InvoiceHeader table.  In here you could check for whatever condition triggers the need to add the line.  By condition, I mean it could be if the Vendor code (payee) is a certain type or code, or maybe if the MAS user logon is the one setup to run the VI job then invoke the logic to add a new line.  Also not sure where the amount comes from, but perhaps it could be stored in a User-Defined table, if it is always the same hard coded amount, then this could be put right into the script.

 

By putting this script against the PreTotals() event, it would fire in data entry as well since it happens against the business object.  This is the reason you would need to condition when the logic to add the new line fires, unless of course you wanted this logic to fire even during data entry.

 

Hope this helps.

 

Steve