Skip to Content
0

Adding Freight charges and tax to a Down Payment Invoice object

Jul 17, 2017 at 09:57 PM

89

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

DIEGO LOTHER Jul 18, 2017 at 02:00 PM
0

Hi Saad,

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

Kind Regards,

Diego Lother

Share
10 |10000 characters needed characters left characters exceeded