Here is the logic/sql to find out total of Oracle Sales Order, I have used this logic to derive total of oracle sales order for reporting purposes-
declare
x_subtotal number;
x_discount number;
x_charges number;
x_tax NUMBER;
x_total number:
begin
OE_OE_TOTALS_SUMMARY.Order_Totals
(
p_header_id=>6040357,
p_subtotal =>x_subtotal,
p_discount =>x_discount,
p_charges =>x_charges,
p_tax =>x_tax
);
dbms_output.put_line('sagar') ;
dbms_output.put_line('x_subtotal:'|| x_subtotal) ;
dbms_output.put_line('x_discount:'|| x_discount) ;
dbms_output.put_line('x_charges:'|| x_charges) ;
dbms_output.put_line('x_tax:'|| x_tax) ;
x_total:= x_subtotal+ x_charges+ x_tax;
dbms_output.put_line(‘x_total:'|| x_total) ;
end;
No comments:
Post a Comment