DBA Data[Home] [Help]

APPS.JAI_OM_TAX_PROCESSING_PKG dependencies on JAI_OM_OE_SO_LINES

Line 109: -- The following cursor gets the tax amount for the line_id from JAI_OM_OE_SO_LINES table

105: AND msi.inventory_item_id = jmsi.inventory_item_id
106: AND jmsi.inventory_item_id = v_Inventory_Item_Id
107: AND jmsi.organization_id = v_organization_id;
108:
109: -- The following cursor gets the tax amount for the line_id from JAI_OM_OE_SO_LINES table
110: CURSOR c_ja_in_so_lines_tax_amt
111: IS
112: SELECT
113: tax_amount

Line 115: JAI_OM_OE_SO_LINES

111: IS
112: SELECT
113: tax_amount
114: FROM
115: JAI_OM_OE_SO_LINES
116: WHERE
117: line_id = p_rec_new.line_id AND
118: header_id = p_rec_new.header_id;
119:

Line 145: JAI_OM_OE_SO_LINES a

141: a.line_number ,
142: a.shipment_line_number ,
143: quantity
144: FROM
145: JAI_OM_OE_SO_LINES a
146: WHERE
147: a.line_id = p_rec_new.line_id AND
148: a.header_id = p_rec_new.header_id ;
149:

Line 150: lv_excise_exempt_type JAI_OM_OE_SO_LINES.EXCISE_EXEMPT_TYPE%TYPE ;

146: WHERE
147: a.line_id = p_rec_new.line_id AND
148: a.header_id = p_rec_new.header_id ;
149:
150: lv_excise_exempt_type JAI_OM_OE_SO_LINES.EXCISE_EXEMPT_TYPE%TYPE ;
151: ln_line_number JAI_OM_OE_SO_LINES.LINE_NUMBER%TYPE ;
152: ln_shipment_line_number JAI_OM_OE_SO_LINES.SHIPMENT_LINE_NUMBER%TYPE ;
153: lv_ret_flag VARCHAR2(10) ;
154: lv_error_msg VARCHAR2(1996) ;

Line 151: ln_line_number JAI_OM_OE_SO_LINES.LINE_NUMBER%TYPE ;

147: a.line_id = p_rec_new.line_id AND
148: a.header_id = p_rec_new.header_id ;
149:
150: lv_excise_exempt_type JAI_OM_OE_SO_LINES.EXCISE_EXEMPT_TYPE%TYPE ;
151: ln_line_number JAI_OM_OE_SO_LINES.LINE_NUMBER%TYPE ;
152: ln_shipment_line_number JAI_OM_OE_SO_LINES.SHIPMENT_LINE_NUMBER%TYPE ;
153: lv_ret_flag VARCHAR2(10) ;
154: lv_error_msg VARCHAR2(1996) ;
155: v_quantity number;

Line 152: ln_shipment_line_number JAI_OM_OE_SO_LINES.SHIPMENT_LINE_NUMBER%TYPE ;

148: a.header_id = p_rec_new.header_id ;
149:
150: lv_excise_exempt_type JAI_OM_OE_SO_LINES.EXCISE_EXEMPT_TYPE%TYPE ;
151: ln_line_number JAI_OM_OE_SO_LINES.LINE_NUMBER%TYPE ;
152: ln_shipment_line_number JAI_OM_OE_SO_LINES.SHIPMENT_LINE_NUMBER%TYPE ;
153: lv_ret_flag VARCHAR2(10) ;
154: lv_error_msg VARCHAR2(1996) ;
155: v_quantity number;
156: ln_vat_cnt NUMBER DEFAULT 0 ;

Line 279: ' Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id);

275: IF NVL(v_line_tax_amount,0) <> NVL(v_sum_tax_amount,0) THEN
276: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
277: FND_LOG.STRING(G_LEVEL_STATEMENT,
278: G_MODULE_NAME || v_api_name,
279: ' Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id);
280: END IF;
281: px_return_code := jai_constants.expected_error ;
282: px_return_message := 'Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id ;
283: return ;

Line 282: px_return_message := 'Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id ;

278: G_MODULE_NAME || v_api_name,
279: ' Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id);
280: END IF;
281: px_return_code := jai_constants.expected_error ;
282: px_return_message := 'Taxes are not matching in JAI_OM_OE_SO_LINES and JA_IN_SO_TAX_LINE FOR LINE_ID ' || p_rec_new.line_id ;
283: return ;
284: END IF;
285:
286: OPEN c_chk_exc_exmpt_rule;

Line 591: FROM JAI_OM_OE_SO_LINES

587: BEGIN
588:
589: SELECT COUNT(*)
590: INTO c_source_line_id
591: FROM JAI_OM_OE_SO_LINES
592: WHERE LINE_ID = pr_order_line.line_id;
593: IF c_source_line_id = 0 THEN
594:
595: INSERT INTO JAI_OM_OE_SO_LINES

Line 595: INSERT INTO JAI_OM_OE_SO_LINES

591: FROM JAI_OM_OE_SO_LINES
592: WHERE LINE_ID = pr_order_line.line_id;
593: IF c_source_line_id = 0 THEN
594:
595: INSERT INTO JAI_OM_OE_SO_LINES
596: (line_number,
597: line_id,
598: header_id,
599: inventory_item_id,

Line 746: || The variable r_get_copy_order_line has the details of the current line from JAI_OM_OE_SO_LINES table

742: INTO r_get_copy_order_line;
743: CLOSE get_copy_order_line;
744:
745: /*
746: || The variable r_get_copy_order_line has the details of the current line from JAI_OM_OE_SO_LINES table
747: */
748: l_func_curr_det := jai_plsql_cache_pkg.return_sob_curr(p_org_id => pr_order_line.ORG_ID);
749: v_set_of_books_id := l_func_curr_det.ledger_id;
750: v_converted_rate := jai_cmn_utils_pkg.currency_conversion(v_set_of_books_id,

Line 784: update JAI_OM_OE_SO_LINES

780: pr_order_line.last_updated_by,
781: pr_order_line.last_update_login,
782: r_get_copy_order_line.vat_assessable_value);
783:
784: update JAI_OM_OE_SO_LINES
785: set tax_amount = NVL(r_get_copy_order_line.line_amount,
786: 0),
787: line_tot_amount = line_amount + NVL(r_get_copy_order_line.line_amount,
788: 0),

Line 825: FROM JAI_OM_OE_SO_LINES

821:
822: CURSOR cur_source_line_id_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,
823: p_header_id OE_ORDER_LINES_ALL.HEADER_ID%TYPE) IS
824: SELECT 'X'
825: FROM JAI_OM_OE_SO_LINES
826: WHERE line_id = p_line_id
827: AND header_id = p_header_id;
828:
829: /*

Line 876: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;

872: v_assessable_value NUMBER;
873: v_assessable_amount NUMBER;
874: v_line_amount NUMBER;
875: v_line_tax_amount NUMBER;
876: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;
877:
878: BEGIN
879: v_line_amount := (NVL(pr_order_line.ordered_quantity, 0) * NVL(pr_order_line.UNIT_SELLING_PRICE, 0));
880: /*

Line 884: record with the same line_id exists in the JAI_OM_OE_SO_LINES table.

880: /*
881: IF the source_order categoy code is Return and line category code is ORDER then
882: 1. Check whether a corresponding record exists in the rma_entry_lines table.
883: IF Yes then get the details of this record into the record group variable rec_cur_get_rma_entry_lines and check whether a
884: record with the same line_id exists in the JAI_OM_OE_SO_LINES table.
885: IF such a record is not found then then insert a record into the JAI_OM_OE_SO_LINES table.
886: */
887:
888: OPEN cur_get_rma_entry_lines(pr_order_line.SOURCE_DOCUMENT_ID,

Line 885: IF such a record is not found then then insert a record into the JAI_OM_OE_SO_LINES table.

881: IF the source_order categoy code is Return and line category code is ORDER then
882: 1. Check whether a corresponding record exists in the rma_entry_lines table.
883: IF Yes then get the details of this record into the record group variable rec_cur_get_rma_entry_lines and check whether a
884: record with the same line_id exists in the JAI_OM_OE_SO_LINES table.
885: IF such a record is not found then then insert a record into the JAI_OM_OE_SO_LINES table.
886: */
887:
888: OPEN cur_get_rma_entry_lines(pr_order_line.SOURCE_DOCUMENT_ID,
889: pr_order_line.SOURCE_DOCUMENT_LINE_ID);

Line 901: INSERT INTO JAI_OM_OE_SO_LINES

897: FETCH cur_source_line_id_exists
898: INTO l_exists;
899: IF cur_source_line_id_exists%NOTFOUND THEN
900:
901: INSERT INTO JAI_OM_OE_SO_LINES
902: (line_number,
903: line_id,
904: header_id,
905: inventory_item_id,

Line 1067: UPDATE JAI_OM_OE_SO_LINES

1063: pr_order_line.last_update_date,
1064: pr_order_line.last_updated_by,
1065: pr_order_line.last_update_login);
1066:
1067: UPDATE JAI_OM_OE_SO_LINES
1068: SET assessable_value = v_assessable_value,
1069: tax_amount = NVL(v_line_tax_amount, 0),
1070: line_tot_amount = v_line_amount +
1071: NVL(v_line_tax_amount, 0),

Line 1122: from JAI_OM_OE_SO_LINES

1118: pl.tax_category_id;
1119:
1120: cursor c_sales_order_cur is
1121: select quantity, service_type_code
1122: from JAI_OM_OE_SO_LINES
1123: where line_id = pr_order_line.reference_line_id;
1124:
1125: CURSOR cur_rma_entry_line_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,
1126: p_header_id OE_ORDER_LINES_ALL.HEADER_ID%TYPE) IS

Line 1871: from JAI_OM_OE_SO_LINES

1867: pl.tax_category_id;
1868:
1869: cursor c_sales_order_cur is
1870: select quantity, service_type_code
1871: from JAI_OM_OE_SO_LINES
1872: where line_id = pr_order_line.reference_line_id;
1873:
1874: CURSOR cur_rma_entry_line_exists(p_line_id OE_ORDER_LINES_ALL.LINE_ID%TYPE,
1875: p_header_id OE_ORDER_LINES_ALL.HEADER_ID%TYPE) IS

Line 2623: -- source order line does not exist in JAI_OM_OE_SO_LINES , should not process

2619: FETCH Get_Copy_Order_Line
2620: INTO copy_rec;
2621:
2622: IF Get_Copy_Order_Line%NOTFOUND THEN
2623: -- source order line does not exist in JAI_OM_OE_SO_LINES , should not process
2624: -- this could be because of quantity being 0 / cancelled line.
2625:
2626: IF v_line_category_code = 'ORDER' THEN
2627: CLOSE get_copy_order_line;

Line 2736: FROM JAI_OM_OE_SO_LINES

2732: WHERE rma_line_id = pr_order_line.line_id;
2733:
2734: CURSOR get_so_lines_count_cur(p_line_id NUMBER) IS
2735: SELECT COUNT(1)
2736: FROM JAI_OM_OE_SO_LINES
2737: WHERE line_id = p_line_id;
2738:
2739: CURSOR return_tax_amount_Cur(p_header_id NUMBER, p_line_id NUMBER) IS
2740: SELECT SUM(A.tax_amount)

Line 2767: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;

2763: v_tax_category_id NUMBER;
2764: v_line_tax_amount NUMBER;
2765: v_line_amount NUMBER;
2766: v_assessable_amount NUMBER;
2767: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;
2768: v_so_tax_lines_count NUMBER;
2769: v_shipment_schedule_line_id NUMBER;
2770: v_so_lines_count NUMBER;
2771: c_source_line_id NUMBER;

Line 2787: inserted into the JAI_OM_OE_SO_LINES table.

2783:
2784: /*
2785: Issue:-
2786: If an RMA order is created having a return_context as null then the record gets
2787: inserted into the JAI_OM_OE_SO_LINES table.
2788: Even though a rma line is not having the return_context field still the line should be treated as
2789: RMA and not as a sales order line.
2790:
2791: Solution:-

Line 2796: JAI_OM_OE_SO_LINES table.

2792: Added an NVL clause to the below IF statement .
2793: Now even if the Return_context is null it would be treated as = LEGACY
2794: and the v_transaction_name flag would be set to LEGACY.
2795: Due to this the record would be inserted into the JAI_OM_OE_RMA_LINES table instead of the
2796: JAI_OM_OE_SO_LINES table.
2797: */
2798: IF pr_order_line.LINE_CATEGORY_CODE = 'RETURN' THEN
2799: IF pr_order_line.return_context IS NULL THEN
2800: v_transaction_name := 'RMA_LEGACY_INSERT';

Line 2880: DELETE JAI_OM_OE_SO_LINES WHERE LINE_ID = pr_order_line.line_id;

2876:
2877: DELETE JAI_OM_OE_RMA_LINES WHERE RMA_LINE_ID = pr_order_line.line_id;
2878: DELETE JAI_OM_OE_RMA_TAXES WHERE RMA_LINE_ID = pr_order_line.line_id;
2879: ELSE
2880: DELETE JAI_OM_OE_SO_LINES WHERE LINE_ID = pr_order_line.line_id;
2881: DELETE JAI_OM_OE_SO_TAXES WHERE Line_ID = pr_order_line.line_id;
2882: END IF;
2883: END IF;
2884:

Line 3112: ' BEFORE INSERTING RECORD INTO JAI_OM_OE_SO_LINES ');

3108: /* else if of v_transaction_name = 'RMA_LEGACY_INSERT' */
3109: IF (G_LEVEL_STATEMENT >= G_CURRENT_RUNTIME_LEVEL) THEN
3110: FND_LOG.STRING(G_LEVEL_STATEMENT,
3111: G_MODULE_NAME || v_api_name,
3112: ' BEFORE INSERTING RECORD INTO JAI_OM_OE_SO_LINES ');
3113: END IF;
3114:
3115: c_source_line_id := 0;
3116: SELECT COUNT(*)

Line 3118: FROM JAI_OM_OE_SO_LINES

3114:
3115: c_source_line_id := 0;
3116: SELECT COUNT(*)
3117: INTO c_source_line_id
3118: FROM JAI_OM_OE_SO_LINES
3119: WHERE LINE_ID = pr_order_line.line_id;
3120: IF c_source_line_id = 0 THEN
3121: INSERT INTO JAI_OM_OE_SO_LINES
3122: (line_number,

Line 3121: INSERT INTO JAI_OM_OE_SO_LINES

3117: INTO c_source_line_id
3118: FROM JAI_OM_OE_SO_LINES
3119: WHERE LINE_ID = pr_order_line.line_id;
3120: IF c_source_line_id = 0 THEN
3121: INSERT INTO JAI_OM_OE_SO_LINES
3122: (line_number,
3123: line_id,
3124: header_id,
3125: SHIPMENT_LINE_NUMBER,

Line 3202: from JAI_OM_OE_SO_LINES

3198: and line_id = pr_order_line.ato_line_id;
3199:
3200: cursor c_model_tax_Categ is
3201: select tax_category_id, inventory_item_id, line_amount
3202: from JAI_OM_OE_SO_LINES
3203: where header_id = pr_order_line.header_id
3204: and line_id = pr_order_line.ato_line_id;
3205:
3206: v_output_tax_amount Number;

Line 3225: from JAI_OM_OE_SO_LINES

3221: selling_price,
3222: assessable_value,
3223: quantity,
3224: vat_assessable_value
3225: from JAI_OM_OE_SO_LINES
3226: where header_id = pr_order_line.header_id
3227: and shipment_schedule_line_id = pr_order_line.ato_line_id;
3228:
3229: -- the last where clause handles the case where there are multiple config items in the single order

Line 3260: update JAI_OM_OE_SO_LINES

3256:
3257: BEGIN
3258: calc_price_tax_for_config_item;
3259:
3260: update JAI_OM_OE_SO_LINES
3261: set line_amount = v_ato_line_amount,
3262: assessable_value = v_ato_assessable_value,
3263: vat_assessable_value = v_ato_vat_assessable_value,
3264: selling_price = v_ato_selling_price

Line 3368: update JAI_OM_OE_SO_LINES

3364: pr_order_line.last_update_login,
3365: v_ato_vat_assessable_value);
3366:
3367: -- update the tax amounts after doing tax recalculation .
3368: update JAI_OM_OE_SO_LINES
3369: set tax_amount = NVL(v_ato_line_amount, 0),
3370: line_tot_amount = line_amount + NVL(v_ato_line_amount, 0)
3371: where header_id = pr_order_line.header_id
3372: and line_id = pr_order_line.line_id;

Line 3396: FROM JAI_OM_OE_SO_LINES

3392: v_api_name CONSTANT VARCHAR2(30) := 'COPY_SPLIT_LINE';
3393:
3394: CURSOR rec_get_lc_flag IS
3395: SELECT lc_flag
3396: FROM JAI_OM_OE_SO_LINES
3397: WHERE line_id = pr_order_line.split_from_line_id;
3398:
3399: CURSOR get_so_tax_lines_count_cur(p_header_id NUMBER, p_line_id NUMBER) IS
3400: SELECT COUNT(1)

Line 3447: l_lc_flag JAI_OM_OE_SO_LINES.LC_FLAG%TYPE;

3443: copy_rec get_copy_order_line%ROWTYPE;
3444: c_source_line_id NUMBER;
3445: v_line_new_amount NUMBER;
3446: v_new_vat_assessable_value NUMBER;
3447: l_lc_flag JAI_OM_OE_SO_LINES.LC_FLAG%TYPE;
3448: v_old_quantity NUMBER;
3449: v_so_tax_lines_count NUMBER;
3450: v_tax_line_count NUMBER;
3451: v_rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type;

Line 3467: FROM JAI_OM_OE_SO_LINES

3463: v_line_quantity := NVL(pr_order_line.ordered_quantity, 0);
3464:
3465: SELECT COUNT(*)
3466: INTO c_source_line_id
3467: FROM JAI_OM_OE_SO_LINES
3468: WHERE LINE_ID = pr_order_line.line_id;
3469: IF c_source_line_id = 0 THEN
3470: /*
3471: If the original line from which the new line has been split is lc enabled i.e lc _flag has been checked

Line 3493: INSERT INTO JAI_OM_OE_SO_LINES

3489: OPEN rec_get_lc_flag;
3490: FETCH rec_get_lc_flag
3491: INTO l_lc_flag;
3492: CLOSE rec_get_lc_flag;
3493: INSERT INTO JAI_OM_OE_SO_LINES
3494: (line_number,
3495: line_id,
3496: header_id,
3497: SPLIT_FROM_LINE_ID,

Line 3699: update JAI_OM_OE_SO_LINES

3695: FND_LOG.STRING(G_LEVEL_STATEMENT,
3696: G_MODULE_NAME || v_api_name,
3697: '** v_header_tax_amount ' || v_header_tax_amount);
3698: END IF;
3699: update JAI_OM_OE_SO_LINES
3700: set tax_amount = nvl(v_header_tax_amount, 0),
3701: line_tot_amount = nvl(v_header_tax_amount, 0) +
3702: nvl(line_amount, 0)
3703: where header_id = pr_order_line.header_id

Line 3803: update JAI_OM_OE_SO_LINES

3799: ((nvl(pr_old.shipment_number, -9999) <>
3800: nvl(pr_new.shipment_number, -9998)) and
3801: pr_new.shipment_number is not null)) then
3802:
3803: update JAI_OM_OE_SO_LINES
3804: set line_number = pr_new.line_number,
3805: shipment_line_number = pr_new.shipment_number
3806: where line_id = pr_new.line_id;
3807:

Line 3848: DELETE JAI_OM_OE_SO_LINES WHERE line_id = pr_new.line_id;

3844: END IF;
3845:
3846: IF pv_action = jai_constants.updating AND
3847: pr_new.inventory_item_id <> pr_old.inventory_item_id THEN
3848: DELETE JAI_OM_OE_SO_LINES WHERE line_id = pr_new.line_id;
3849:
3850: DELETE JAI_OM_OE_SO_TAXES WHERE line_id = pr_new.line_id;
3851:
3852: END IF;

Line 4035: CURSOR JAI_OM_OE_SO_LINES_cur(p_line_id NUMBER) IS

4031: ln_line_id NUMBER;
4032:
4033: l_func_curr_det jai_plsql_cache_pkg.func_curr_details;
4034:
4035: CURSOR JAI_OM_OE_SO_LINES_cur(p_line_id NUMBER) IS
4036: SELECT quantity,
4037: assessable_value,
4038: excise_exempt_type,
4039: excise_exempt_refno,

Line 4041: FROM JAI_OM_OE_SO_LINES

4037: assessable_value,
4038: excise_exempt_type,
4039: excise_exempt_refno,
4040: vat_reversal_price
4041: FROM JAI_OM_OE_SO_LINES
4042: WHERE line_id = p_line_id;
4043:
4044: CURSOR c_ja_in_rma_lines(p_line_id NUMBER) IS
4045: SELECT quantity, assessable_value

Line 4074: from JAI_OM_OE_SO_LINES

4070: v_excise_exempt_refno varchar2(30);
4071:
4072: Cursor c_get_loc_record is
4073: select selling_price, assessable_value
4074: from JAI_OM_OE_SO_LINES
4075: where header_id = pr_new.header_id
4076: and line_id = pr_new.line_id;
4077:
4078: v_loc_selling_price Number;

Line 4081: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;

4077:
4078: v_loc_selling_price Number;
4079: v_loc_assessable_value Number;
4080:
4081: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;
4082:
4083: ln_vat_reversal_price JAI_OM_OE_SO_LINES.vat_reversal_price%TYPE;
4084: ln_ordered_qty NUMBER;
4085:

Line 4083: ln_vat_reversal_price JAI_OM_OE_SO_LINES.vat_reversal_price%TYPE;

4079: v_loc_assessable_value Number;
4080:
4081: ln_vat_assessable_value JAI_OM_OE_SO_LINES.VAT_ASSESSABLE_VALUE%TYPE;
4082:
4083: ln_vat_reversal_price JAI_OM_OE_SO_LINES.vat_reversal_price%TYPE;
4084: ln_ordered_qty NUMBER;
4085:
4086: PROCEDURE calc_price_tax_for_config_item(p_header_id number,
4087: p_line_id number) is

Line 4095: FROM JAI_OM_OE_SO_LINES

4091: selling_price,
4092: assessable_value,
4093: decode(quantity, 0, 1, quantity) quantity,
4094: vat_assessable_value
4095: FROM JAI_OM_OE_SO_LINES
4096: WHERE header_id = p_header_id
4097: AND shipment_schedule_line_id = pr_new.ato_line_id
4098: AND line_id <> p_line_id;
4099: BEGIN

Line 4180: -- assessable value fetched the values from the JAI_OM_OE_SO_LINES table. For a return order , this is not relevant

4176:
4177: -- the following if condition " if pr_new.LINE_CATEGORY_CODE = 'RETURN' then " added by sriram
4178: -- When a Legacy return order is created and line saved and if quantity is changed , this trigger was throwing up
4179: -- an exception - DIVIDE BY ZERO .The reason for this is that the cursor which fetches the old quantity and old
4180: -- assessable value fetched the values from the JAI_OM_OE_SO_LINES table. For a return order , this is not relevant
4181: -- as the JAI_OM_OE_SO_LINES has no records for a return order and instead records are present in the JAI_OM_OE_RMA_LINES
4182: -- table.
4183: -- code added by sriram includes adding the if statement below , adding the elsif condition and opening the cursor
4184: -- c_ja_in_rma_lines . This cursor definition also has been added by sriram.

Line 4181: -- as the JAI_OM_OE_SO_LINES has no records for a return order and instead records are present in the JAI_OM_OE_RMA_LINES

4177: -- the following if condition " if pr_new.LINE_CATEGORY_CODE = 'RETURN' then " added by sriram
4178: -- When a Legacy return order is created and line saved and if quantity is changed , this trigger was throwing up
4179: -- an exception - DIVIDE BY ZERO .The reason for this is that the cursor which fetches the old quantity and old
4180: -- assessable value fetched the values from the JAI_OM_OE_SO_LINES table. For a return order , this is not relevant
4181: -- as the JAI_OM_OE_SO_LINES has no records for a return order and instead records are present in the JAI_OM_OE_RMA_LINES
4182: -- table.
4183: -- code added by sriram includes adding the if statement below , adding the elsif condition and opening the cursor
4184: -- c_ja_in_rma_lines . This cursor definition also has been added by sriram.
4185:

Line 4192: OPEN JAI_OM_OE_SO_LINES_cur(v_line_id);

4188: FETCH c_ja_in_rma_lines
4189: INTO v_old_quantity, v_old_assessable_value;
4190: CLOSE c_ja_in_rma_lines;
4191: else
4192: OPEN JAI_OM_OE_SO_LINES_cur(v_line_id);
4193: FETCH JAI_OM_OE_SO_LINES_cur
4194: INTO v_old_quantity,
4195: v_old_assessable_value,
4196: v_excise_exempt_type,

Line 4193: FETCH JAI_OM_OE_SO_LINES_cur

4189: INTO v_old_quantity, v_old_assessable_value;
4190: CLOSE c_ja_in_rma_lines;
4191: else
4192: OPEN JAI_OM_OE_SO_LINES_cur(v_line_id);
4193: FETCH JAI_OM_OE_SO_LINES_cur
4194: INTO v_old_quantity,
4195: v_old_assessable_value,
4196: v_excise_exempt_type,
4197: v_excise_exempt_refno,

Line 4199: CLOSE JAI_OM_OE_SO_LINES_cur;

4195: v_old_assessable_value,
4196: v_excise_exempt_type,
4197: v_excise_exempt_refno,
4198: ln_vat_reversal_price;
4199: CLOSE JAI_OM_OE_SO_LINES_cur;
4200: end if;
4201:
4202: OPEN Bind_Cur(v_header_id);
4203: FETCH Bind_Cur

Line 4275: JAI_OM_OE_SO_LINES table and if this too happens to be null then only should it be assigned as nvl(pr_new.unit_selling_price).

4271:
4272: Functional Description:-
4273: During partial shipment, if the assessable price list setup has been removed after booking an order then
4274: during the excise duty recalculation, the assessable value (which would be found as null in the setup ) should be taken from the
4275: JAI_OM_OE_SO_LINES table and if this too happens to be null then only should it be assigned as nvl(pr_new.unit_selling_price).
4276:
4277: Technical Description:-
4278: Check whether the assessable value is null in the table JAI_OM_OE_SO_LINES
4279: IF

Line 4278: Check whether the assessable value is null in the table JAI_OM_OE_SO_LINES

4274: during the excise duty recalculation, the assessable value (which would be found as null in the setup ) should be taken from the
4275: JAI_OM_OE_SO_LINES table and if this too happens to be null then only should it be assigned as nvl(pr_new.unit_selling_price).
4276:
4277: Technical Description:-
4278: Check whether the assessable value is null in the table JAI_OM_OE_SO_LINES
4279: IF
4280: no then assign this value to the v_assessable_value variable
4281: ELSE
4282: Assign the assign the nvl(pr_new.unit_selling_price) to the v_assessable_value variable.

Line 4296: FROM JAI_OM_OE_SO_LINES

4292: DECLARE
4293:
4294: CURSOR rec_get_assessable_value IS
4295: SELECT assessable_value
4296: FROM JAI_OM_OE_SO_LINES
4297: WHERE line_id = v_line_id;
4298:
4299: cur_rec_get_assessable_value rec_get_assessable_value%ROWTYPE;
4300: BEGIN

Line 4368: UPDATE jai_om_oe_so_lines

4364: ln_vat_reversal_price);
4365:
4366: IF pr_new.line_category_code = 'ORDER' THEN
4367:
4368: UPDATE jai_om_oe_so_lines
4369: SET quantity = v_quantity,
4370: unit_code = v_uom_code,
4371: selling_price = v_selling_price,
4372: assessable_value = nvl(v_assessable_value, v_selling_price),

Line 4414: UPDATE JAI_OM_OE_SO_LINES

4410: v_last_update_login,
4411: ln_vat_assessable_value,
4412: ln_vat_reversal_price);
4413:
4414: UPDATE JAI_OM_OE_SO_LINES
4415: SET quantity = v_quantity,
4416: unit_code = v_uom_code,
4417: selling_price = v_selling_price,
4418: assessable_value = nvl(v_assessable_value,