Skip to Content
0
Dec 21, 2022 at 05:05 PM

add DownPayment in Supplier Invoice

82 Views Last edit Dec 22, 2022 at 01:08 AM 2 rev

Hi All,

my goal is to add a down payment to a supplier invoice via Webservice or via ABSL.

Different SOAP Request weren't successful:
  1. add SupplierInvoiceReference on "Invoiced Item":
    <Item actionCode="01"><br>   <BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode><br>   ...
       <SupplierInvoiceReference actionCode="01"><br>       <BusinessTransactionDocumentReference><br>           <ID>00000000000000000000000000000000258</ID><br>           <TypeCode>817</TypeCode>
               <ItemID>0000000001</ItemID><br>           <ItemTypeCode>79</ItemTypeCode><br>       </BusinessTransactionDocumentReference><br>   </SupplierInvoiceReference>
    </Item>              <br>
    Errors:
    Fields for business transaction document reference missing
    Action ADD_ASSIGNMENT not possible; action is disabled
    Enter at least the down payment item ID or remove the row.
  2. add a second item with BusinessTransactionDocumentItemTypeCode 79:
    adds a new line in UI - Down Payments, but without information to a down payment
    <Item actionCode="01"><br>   <BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode><br>   ...
    </Item>   
    <Item actionCode="01"><br>   <BusinessTransactionDocumentItemTypeCode>79</BusinessTransactionDocumentItemTypeCode><br>   ...
    </Item>    
  3. add a second item with BusinessTransactionDocumentItemTypeCode 79
    and add SupplierInvoiceReference
    <Item actionCode="01"><br>   <BusinessTransactionDocumentItemTypeCode>002</BusinessTransactionDocumentItemTypeCode><br>   ...
    </Item>   
    <Item actionCode="01"><br>   <BusinessTransactionDocumentItemTypeCode>79</BusinessTransactionDocumentItemTypeCode><br>   ...
       <SupplierInvoiceReference actionCode="01"><br>       <BusinessTransactionDocumentReference><br>           <ID>00000000000000000000000000000000258</ID><br>           <TypeCode>817</TypeCode>
               <ItemID>0000000001</ItemID><br>           <ItemTypeCode>79</ItemTypeCode><br>       </BusinessTransactionDocumentReference><br>   </SupplierInvoiceReference>
    </Item>    
    Error message:
    Fields for business transaction document reference missing

With ABSL I'm able to delete the assigned down payments:

var collDownPaymentItem = oneRoot.DownPaymentCreditItem;<br>if( collDownPaymentItem.Count() > 0){<br>   collDownPaymentItem.Delete(); <br>}

I'm able to add a new line for the down payment, but I can't reference it with a Document for the down payment.
ItemOriginSupplierInvoiceItemReference throws a dump:

var oneANZ = oneRoot.DownPaymentCreditItem.Create();<br>if( oneANZ.IsSet() ){
   var oneOrigin = oneANZ.ItemOriginSupplierInvoiceItemReference;
}

I also tried to create a new ItemBusinessTransactionDocumentReference with the information of the Down Payment but without success.

Does anyone have an idea how to solve it?