Buenas,
Cree un pago en borrador con el DI API y se guardo correctamente pero al abrir desde SAP B1 y darle confirmar me da el error “No se ha indicado importe ME”. Que propiedad del objeto me faltaria para completar el pago por transferencia bancaria correctamente?
Este seria el codigo:
SAPbobsCOM.Payments doc = sap.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPaymentsDrafts); doc.DocObjectCode = BoPaymentsObjectType.bopot_IncomingPayments; doc.CardCode = cardCode; doc.CardName = cardName; doc.DocDate = date; doc.DueDate = date; // Cuenta // BpAct -> 2.01.01.02.001 -> Anticipo de Clientes if(!string.IsNullOrEmpty(pay.Cuenta)) doc.ControlAccount = pay.Cuenta; // ------------------------ // Trans. Bancaria // ------------------------ // Cuenta de mayor -> [ 1.01.01.03.004 ] BANCO R CTA CTE NRO. 798765 // Fecha de transferencia [ 01/06/2020 ] // Numero de transferencia [ 01062020 ] // doc.TransferAccount = “1.01.01.03.001”; if (!string.IsNullOrEmpty(config.CtaTransferenciaBancaria)) doc.TransferAccount = config.CtaTransferenciaBancaria; doc.TransferDate = date; doc.TransferSum = pay.Importe; doc.TransferReference = date.ToString(“ddMMyyyy”); // Moneda doc.LocalCurrency = BoYesNoEnum.tYES; doc.DocCurrency = “GS”; // Facturas doc.Invoices.DocEntry = docEntry; doc.Invoices.DocLine = 0; doc.Invoices.SumApplied = pay.Importe; // Guardar int code = doc.Add();