cancel
Showing results for 
Search instead for 
Did you mean: 

DI API Shipping Expense

Former Member

We have a custom program that allows our website to transmit orders through the DI API along with a shipping expense to the RDR3 table.  We have noticed that these orders are not closing out when they are being taken to a delivery if there is a shipping expense created.  The line level on the RDR1 table is being closed but the sales order document remains open and so does the line on the RDR3 table.

Below is the code that is generating the freight add amount.  I am wondering if we are missing a column that should be updated or maybe the RDR3 line should be closed when it is added (we have no one reviewing these orders, so no changes would be made to the RDR3 table).


if(order.TotalShippingCharged != "")

  {

  oOrder.Expenses.ExpenseCode = 1;

  oOrder.Expenses.LineTotal = Convert.ToDouble(order.TotalShippingCharged);

  oOrder.Expenses.Add();

  }

View Entire Topic
patrice_vigier
Participant
0 Kudos

I was looking for a way to insert freight value into a sales order, your question helped me to find the solution.