Skip to Content
0
Former Member
Feb 29, 2008 at 01:13 PM

Invoices Correction proble Di API

12 Views

Hi all.

Can anyone tell me what fields are necessary to add o oCorrectionDocument .

i recive this messages

Invalid document structure ()

Quantity falls below minimum inventory [CSI1.ItemCode][line: 3] ()

Invalid document structure ()

Documents doc ;

int a;

doc = (Documents)pcomp.GetBusinessObject(BoObjectTypes.oCorrectionInvoice);

doc.CardCode = "_PARAGON";

doc.HandWritten = BoYesNoEnum.tNO;

doc.DocTotal = 0d;

doc.DocType = BoDocumentTypes.dDocument_Items;

doc.DocDate = DateTime.Parse("2008-02-28 00:00:00.000") ;

doc.Lines.ItemCode = "1MKDB88C0G176E99999k";

doc.Lines.ItemDescription = "KOSZULA DŁUGI RĘKAW BERTO";

doc.Lines.Price = 81.15d;

doc.Lines.TaxCode = "F22";

doc.Lines.Quantity=1;

doc.Lines.CorrectionInvoiceItem = BoCorInvItemStatus.ciis_Was;

doc.Lines.WarehouseCode = "KRK-M1"; //"CENTR";// "KRK-GKRZ";

doc.Lines.BaseEntry = 39;

doc.Lines.BaseType = 13;

doc.Lines.Add();

doc.Lines.SetCurrentLine(1);

doc.Lines.BaseType = 13;

doc.Lines.BaseEntry = 39;

doc.Lines.ItemCode = "1MKDB88C0G176E99999k";

doc.Lines.ItemDescription = "KOSZULA DŁUGI RĘKAW BERTO";

doc.Lines.TaxCode = "F22";

doc.Lines.Quantity=-1;

doc.Lines.Price = -81.15d;

doc.Lines.CorrectionInvoiceItem = BoCorInvItemStatus.ciis_ShouldBe;

doc.Lines.WarehouseCode = "KRK-M1";

a=doc.Add();

Error -5002 :Quantity falls below minimum inventory [CSI1.ItemCode][line: 2]

thanks for your time

Edited by: michal Wieczorek on Feb 29, 2008 2:15 PM

Edited by: michal Wieczorek on Feb 29, 2008 2:48 PM