Hello,
I am trying to create an a/p invoice for a PO using di api. I can create an a/p invoice without any PO as a reference successfully, but when i give the PO number as base ref and 22 as base type, it is throwing an error as 'No matching records'. here is my code for it.
doc.getLines().setItemCode("AUKI/0001C/7S1"); | |||
/* | doc.getLines().setLineTotal(new Double(50.00)); | ||
doc.getLines().setQuantity(new Double(5.0)); | |||
doc.getLines().setUnitPrice(new Double(10.0)); | |||
//doc.getLines().setAccountCode("_SYS00000000038"); | |||
doc.getLines().setTaxCode("Exempt");*/ | |||
doc.getLines().setBaseEntry(new Integer('5')); | |||
doc.getLines().setBaseLine(new Integer('2')); | |||
doc.getLines().setBaseType(SBOCOMConstants.BoAPARDocumentTypes_bodt_PurchaseOrder); | |||
//doc.getLines().setBaseType(new Integer(22)); | |||
doc.getLines().setCurrentLine(new Integer(0)); | |||
doc.getLines().add(); |
int add_res = doc.add(); |
I tried giving PO docnum and docentry, but nothing working. any help would be greatly appreciated.
Thanks
Ramakanth