Update: The pre-write script added to the PO Receipt of Good was the answer.. Also the VI log is much more descriptive too. Says Invoice out of balance!!
Here is the Pre-write Script added to the PO Receipt
********************************************************************
'Pre-write added to PO_RECEIPTHEADER
'Pre-Write script exit if not from VI import
'Get values from PO and compare to imported total Set erroe to Fail is out of balance
' skip perform is imported total is 0
If Left(UCase(oSession.StartProgram),4) = "VIWI" Then
'Init VARs'
NTaxableAmt=0:NNontaxableAmt=0:NSalesTaxAmt=0:NFreightAmt=0:
NUDF_INVOICEAMT_DL=0:nnvoicetotal=0:outofbalance=""
'Get Values'
retVal = oBusObj.GetValue("TaxableAmt", NTaxableAmt)
retVal = oBusObj.GetValue("NonTaxableAmt", NNontaxableAmt)
retVal = oBusObj.GetValue("SalesTaxAmt", NSalesTaxAmt)
retVal = oBusObj.GetValue("FreightAmt", NFreightAmt)
retVal = oBusObj.GetValue("UDF_INVOICEAMT_DL", NUDF_INVOICEAMT_DL)
'Calculate totals and check balance
ninvoicetotal=NTaxableAmt+NNontaxableAmt+NSalesTaxAmt+NFreightAmt
if ninvoicetotal<>NUDF_INVOICEAMT_DL then
outofbalance= "Y"
Else
outofbalance= "N"
End IF
'Setr SMsg and to Fail Write
If NUDF_INVOICEAMT_DL>0 and outofbalance= "Y" Then
sMSG= "Invoice total doesn't match DocLink"
retVal = oScript.SetError(sMSG)
End If
End If
Exit
*************************************************************
------------------------------
Jim Woodhead
DSD Business Systems
619-990-3946
------------------------------