Skip to Content
avatar image
Former Member

Adding Freight charges and tax to a Down Payment Invoice object

Hi,

Is it possible to add freight charges as an expense line item in a down payment invoice object through SAP Business One SDK DI.

I have the following code:

SAPbobsCOM.Documents oOrder = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);

SAPbobsCOM.Documents oPayment = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments);

oOrder.Expenses.ExpenseCode = 1;

oOrder.Expenses.LineTotal = Convert.ToDouble(shippinglineitem["net-price"].InnerText); oOrder.Expenses.TaxCode = "MAN - NY";

oOrder.Expenses.Add(); ;

oPayment.Expenses.ExpenseCode = 1;

oPayment.Expenses.LineTotal = oOrder.Expenses.LineTotal; oPayment.Expenses.TaxCode = "MAN - NY";

oPayment.Expenses.Add(); * */

oPayment.Expenses.ExpenseCode = 1;

oPayment.Expenses.LineTotal = oOrder.Expenses.LineTotal; oPayment.Expenses.TaxCode = "MAN - NY";

oPayment.Expenses.Add();

}

I am getting the following error on the line:

oPayment.Expenses.ExpenseCode = 1 ;

"data documentadditionalexpenses not found"

Can't find any information about this error on the Internet.

Saad

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jul 18, 2017 at 02:00 PM

    Hi Saad,

    Additional Expenses(Expenses) is not a part of DownPayment documents. Neither by sdk nor Sap business One client.

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded