Include Return Amounts in Pricing Totals
See how you can include amounts from a return line in the pricing totals for each sales order.
A sales order in Order Management includes one-time charges for various totals, such as Total List Price, Total Net Price, Total Tax, and Pay Now.
For example:
|
Attribute |
Value |
|---|---|
|
Total List Price |
237,000.00 |
|
Discount |
0.00 |
|
Total Net Price |
237,000.00 |
|
Shipping |
0.00 |
|
Total Tax |
0.00 |
|
Total Credit |
0.00 |
|
Pay Now |
237,000.00 |
A return order has the Total Credit and Pay Now for the return lines. It doesn't have Total List Price, Total Net Price, or Total Tax because a sales order can be mixed.
A mixed sales order has outbound lines and return lines. Including totals for a mixed order can be confusing, so the shipping document for a sales order that has only return lines doesn't have totals for taxes and other amounts.
For example, here are the totals for a sales order that only has outbound lines:
|
Attribute |
Value |
|---|---|
|
Total List Price |
1,850.00 |
|
Discount |
0.00 |
|
Total Net Price |
1,850.00 |
|
Shipping |
0.00 |
|
Total Tax |
222.00 |
|
Total Credit |
0.00 |
|
Pay Now |
2,072.00 |
here are the totals for a sales order that only has return lines:
|
Attribute |
Value |
|---|---|
|
Total List Price |
0.00 |
|
Discount |
0.00 |
|
Total Net Price |
0.00 |
|
Shipping |
0.00 |
|
Total Tax |
0.00 |
|
Total Credit |
2,072.00 |
|
Pay Now |
2,072.00 |
This example will show you how to set up pricing so your documents include totals for return lines, such as total tax.
-
Go to the Pricing Administration work area.
-
Click Tasks > Manage Algorithms under Pricing Configuration.
-
On the Manage Algorithms page, click Query by Example, then query for the value:
Attribute
Value
Name
Compute Simple Totals
Pricing uses this algorithm to determine what totals to calculate for the sales order.
-
Click Actions > Create Version.
Assume it creates version 2.
-
In the row that has version 2, click the link in the Name column.
-
On the Edit Algorithm page, set the value:
Attribute
Value
Description
Extend this algorithm so we can include tax totals for return orders.
-
In the Steps area, click the step that has the value:
Attribute
Value
Name
Compute Total
It is usually step 2.
-
In the Step Details area, scroll down, then, in the Group Each Row Action area, locate this chunk of code.
//TotalTax totalUsage = TotalUsage.locate([TotalCodeForUsage:TaxTotalCode]) if ('ORDER' == Line.LineCategoryCode && Charge.ChargeAppliesTo in ['PRICE', 'SHIPPING'] && ChargeComp.PriceElementUsageCode in ['EXCLUSIVE_TAX', 'INCLUSIVE_TAX'] && null != totalUsage ) { if (null == TaxTotal) { -
Modify that code.
//TotalTax totalUsage = TotalUsage.locate([TotalCodeForUsage:TaxTotalCode]) if (Charge.ChargeAppliesTo in ['PRICE', 'SHIPPING'] && ChargeComp.PriceElementUsageCode in ['EXCLUSIVE_TAX', 'INCLUSIVE_TAX'] && null != totalUsage ) { if (null == TaxTotal) {Note
-
You remove
'ORDER' == Line.LineCategoryCode &&. The LineCategoryCode attribute specifies whether the line is an outbound line or a return line. ORDER means it's outbound, and RETURN means it's a return. -
'ORDER' == Line.LineCategoryCodespecifies to process only outbound lines. So, removing this phrase from the condition means the algorithm will process outbound lines and return lines. -
This statement uses the PriceElementUsageCode charge component to get the exclusive tax and the inclusive tax. It specifies to add charges for the return lines to the total tax.
-
-
Click Save and Close.
-
Publish version 2 of the algorithm.
-
Open another browser, sign into Oracle Applications with the privileges that you need to manage sales orders, go to the Order Management work area, create a return order that only has return lines, then click Save.
-
Verify that the totals include amounts for the return charge.
For example, notice the value for the tax isn't zero:
Attribute
Value
Total List Price
0.00
Discount
0.00
Total Net Price
0.00
Shipping
0.00
Total Tax
222.00
Total Credit
2,072.00
Pay Now
2,072.00