Skip to Content
0
Apr 28, 2014 at 02:38 PM

Problem adding Sales Invoices with batches

50 Views

Hi,

I am trying to create an invoice with a batch component which is returning "Cannot add row without complete selection of batch/serial numbers".

I can add these lines manually using teh UI but not via the DI Server. The relevant <BOM> section is shown below. The only mandatory element seems to be <BatchNumber> and I have tried it with just that element and with combintaions of them all. I have also tried adding a <LineNum> to the main <Document_Lines> section in case it needed this to tie up with teh <BaseLineNumber> (which I have als tried leaving out).

I have extarcted a GetByKey for a manually entered one and I cannot see the problem. Any help would be appreciated.

Nick

<BOM>

<BO>

<AdmInfo>

<Object>oInvoices</Object>

</AdmInfo>

<Documents>

<row>

<CardCode>C000002</CardCode>

<NumAtCard>Order #12979</NumAtCard>

<Confirmed>tYES</Confirmed>

<DiscountPercent>0.000000</DiscountPercent>

<PayToCode>Aidann Bowley</PayToCode>

<ShipToCode>Aidann Bowley</ShipToCode>

<ContactPersonCode>34</ContactPersonCode>

</row>

</Documents>

<Document_Lines>

<row>

<ItemCode>BM25-15</ItemCode>

<Quantity>1.000000</Quantity>

<PriceAfterVAT>6.000000</PriceAfterVAT>

</row>

</Document_Lines>

<BatchNumbers>

<row>

<BatchNumber>WEBTEST</BatchNumber>

<ManufacturerSerialNumber/>

<InternalSerialNumber/>

<ExpiryDate nil="true"/>

<ManufacturingDate nil="true"/>

<AddmisionDate>20140428</AddmisionDate>

<Location/>

<Notes/>

<Quantity>1.000000</Quantity>

<BaseLineNumber>0</BaseLineNumber>

</row>

</BatchNumbers>

</BO>

</BOM>