cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Freight charges and tax to a Down Payment Invoice object

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member185682
Active Contributor
0 Kudos

Hi Saad,

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

Kind Regards,

Diego Lother