hi guys
trying to create a Draft Entry goods from a Purchase Order I get this message:
10000180 - Specify valid VAT code
every times I try
but if I open Administration-->Setup-->Financial-->Tax-->Tax Codes and I make an update I can get the error until I stop and start again my addon
SAP is 9.1 PL 07
someone has some hints?
Here the Code:
lole_doc = Create OleObject
lole_doc = gole_DI_company.GetBusinessObject(112)
/*
* -- inizio script --
*/
lole_doc.DocObjectCode = ads_documento.object.objectcode[1]
lole_doc.CardCode = ads_documento.object.business_partner[1]
lole_doc.HandWritten = 0
lole_doc.DocDate = g_data_adesso
// Verifica che il fornitore sia sempre lo stesso
for li_index = 1 to ads_documento.RowCount()
// popolo le linee
lole_doc.Lines.BaseEntry = ads_documento.object.docentry[li_index]
lole_doc.Lines.BaseLine = ads_documento.object.docline[li_index]
lole_doc.Lines.Basetype = ads_documento.object.basetype[li_index]
// Aggiungo il codice IVA
lole_doc.Lines.VatGroup = ads_documento.object.vatgroup[li_index]
lole_doc.Lines.Add
lb_next_selected = TRUE
next
//Add the Invoice
if lb_next_selected then
ll_return = lole_doc.Add
end if
// Clean
Destroy lole_doc
Return ll_return