OE_OE_TOTALS_SUMMARY.ORDER_TOTALS can be used to derive a sales order’s subtotal, discount, tax and charges. Below is the code snippet on how to use the API
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
DECLARE v_HEADER_ID NUMBER; v_SUBTOTAL NUMBER; v_DISCOUNT NUMBER; v_CHARGES NUMBER; v_TAX NUMBER; BEGIN v_HEADER_ID := 5908; OE_OE_TOTALS_SUMMARY.ORDER_TOTALS( P_HEADER_ID => v_HEADER_ID, P_SUBTOTAL => v_SUBTOTAL, P_DISCOUNT => v_DISCOUNT, P_CHARGES => v_CHARGES, P_TAX => V_TAX ); DBMS_OUTPUT.PUT_LINE(‘SUBTOTAL = ‘ || v_SUBTOTAL); DBMS_OUTPUT.PUT_LINE(‘DISCOUNT = ‘ || v_DISCOUNT); DBMS_OUTPUT.PUT_LINE(‘CHARGES = ‘ || v_CHARGES); DBMS_OUTPUT.PUT_LINE(‘TAX = ‘ || v_TAX); END; |