Good day:
I'm using SAP B1 9.3 PL. 07, I want to create a Purchase Invoice through the DI API.
I have created it successfully without problem, but when I want to add a DownPayment, the following error appears:
10001271 - Amount to draw from down payment is not set in the document currency.
What could be the issue? Is it a configuration error in the documents? Or perhaps something in the way the methods are used?
Here is the piece of code I'm using to add the DownPayment:
SAPbobsCOM.DownPaymentsToDraw dpToDraw = factura.DownPaymentsToDraw;
dpToDraw.DocEntry = idAnticipo;
double valor = montoAnticipo(idAnticipo, "proveedor"); -- this method gets the amount
dpToDraw.AmountToDraw = valor;
I also attached anticipo.xml the xml generated.
Thanks in advance.