Solved

Customer Order Total Amount

  • 31 March 2021
  • 4 replies
  • 281 views

Userlevel 4
Badge +9

Is there an API call to get the Customer Order Total amount ?

Looks like the total amount is calculated dynamically from the sum of customer order line totals. I would like to get the total amount of the customer order into an custom field.

icon

Best answer by Janandi Vishaka 31 March 2021, 09:11

View original

This topic has been closed for comments

4 replies

Userlevel 5
Badge +10

Hi Gemini,

What IFS version you are in? In IFS Enterprise explorer total sum happens in the client so there is no direct API call, but you can write a SQL query perhaps and make the custom field a read-only field.

SELECT SUM(part_price) FROM customer_order_line WHERE order_no=v.order_no;

Userlevel 4
Badge +9

Hi Infaz,

 

I’m on APPS9

 

Regards,

Rajesh

Userlevel 5
Badge +8

Hi,

 

You can use  Customer_Order_API.Get_Ord_Line_Totals__ method by passing the order no as IN and get the amount as below. This is used when populating customer order to fetch the totals.

Get_Ord_Line_Totals__ (
   total_base_price_    OUT NUMBER,
   total_sale_price_    OUT NUMBER,
   total_weight_        OUT NUMBER,
   total_quantity_      OUT NUMBER,
   total_cost_          OUT NUMBER,
   total_contribution_  OUT NUMBER,
   total_tax_amount_    OUT NUMBER,
   total_gross_amount_  OUT NUMBER,
   total_add_disc_amt_  OUT NUMBER,
   order_no_            IN  VARCHAR2 )

 

Best Regards,

Vishaka

Userlevel 5
Badge +8

Hi,

 

Another thing If you want just the  gross amount of the lines then you can try Customer_Order_API.Get_Ord_Gross_Amount  function as well. This will fetch the sum gross amount from the lines and return the value. I think this might be helpful if you are creating a custom field  Above method  is a procedure.

 

Best Regards,

VIshaka