DBA Data[Home] [Help]

APPS.JAI_PO_LLA_TRIGGER_PKG dependencies on JAI_PO_TAXES

Line 109: DELETE FROM JAI_PO_TAXES

105:
106: DELETE FROM JAI_PO_LINE_LOCATIONS
107: WHERE Line_Location_Id = v_po_line_loc_id;
108:
109: DELETE FROM JAI_PO_TAXES
110: WHERE Line_Location_Id = v_po_line_loc_id;
111: END ARD_T1 ;
112:
113: /*

Line 230: FROM JAI_PO_TAXES a

226: CURSOR tax_cur IS
227: SELECT a.Po_Line_Id, a.tax_line_no lno, a.tax_id,
228: a.precedence_1 p_1, a.precedence_2 p_2, a.precedence_3 p_3, a.precedence_4 p_4, a.precedence_5 p_5,
229: a.currency, a.tax_rate, a.qty_rate, a.uom, a.tax_amount, a.tax_type, a.vendor_id, a.modvat_flag
230: FROM JAI_PO_TAXES a
231: WHERE NVL( a.line_location_id, -999 ) = DECODE( v_quot_line_loc_id, -999, -999, v_quot_line_loc_id )
232: AND Po_Line_Id = v_from_line_id
233: ORDER BY a.tax_line_no;
234:

Line 806: JAI_PO_TAXES a ,

802: SELECT
803: nvl(a.tax_amount,0) tax_amount,
804: nvl(b.adhoc_flag, 'N') adhoc_flag
805: FROM
806: JAI_PO_TAXES a ,
807: JAI_CMN_TAXES_ALL b
808: WHERE
809: a.tax_id = b.tax_id AND
810: a.po_line_id = v_po_line_id AND

Line 817: FROM JAI_PO_TAXES

813:
814: CURSOR rec_calc_total_tax
815: IS
816: SELECT sum(tax_amount )
817: FROM JAI_PO_TAXES
818: WHERE
819: po_line_id = v_po_line_id AND
820: po_header_id = v_po_hdr_id AND
821: line_location_id = v_line_loc_id AND

Line 883: JAI_PO_TAXES

879: IS
880: SELECT
881: SUM( NVL( Tax_Amount, 0 ) )
882: FROM
883: JAI_PO_TAXES
884: WHERE
885: po_line_id = v_po_line_id AND
886: line_location_id = v_line_loc_id AND
887: tax_type <> jai_constants.tax_type_tds ; /*'TDS';Ramananda for removal of SQL LITERALs */

Line 894: JAI_PO_TAXES

890: IS
891: SELECT
892: sum( nvl( tax_amount, 0 ) )
893: FROM
894: JAI_PO_TAXES
895: WHERE
896: po_line_id = v_po_line_id AND
897: line_location_id is null AND
898: tax_type <> jai_constants.tax_type_tds ; /*'TDS';Ramananda for removal of SQL LITERALs */

Line 985: the lines from JAI_PO_TAXES and JAI_PO_LINE_LOCATIONS are deleted.

981: ------------------------------------------------------------------------------------------
982: 1. 14/08/2003 Aiyer , Bug #3037284 ,File version 616.1
983: Changed the triggering condition to fire when cancel_flag is 'Y'.
984: In case of full cancellation of a Purchase order line (no receipt done),
985: the lines from JAI_PO_TAXES and JAI_PO_LINE_LOCATIONS are deleted.
986: In case of partial cancellation of purchase order line, apportion the tax amount
987: in the ratio of quantity_received to original line quantity i.e quantity_received/quantity
988: in table JAI_PO_TAXES.
989: Calculate the tax_amount in the table JAI_PO_LINE_LOCATIONS as a sum of all records

Line 988: in table JAI_PO_TAXES.

984: In case of full cancellation of a Purchase order line (no receipt done),
985: the lines from JAI_PO_TAXES and JAI_PO_LINE_LOCATIONS are deleted.
986: In case of partial cancellation of purchase order line, apportion the tax amount
987: in the ratio of quantity_received to original line quantity i.e quantity_received/quantity
988: in table JAI_PO_TAXES.
989: Calculate the tax_amount in the table JAI_PO_LINE_LOCATIONS as a sum of all records
990: in the table JAI_PO_TAXES for that line_locations_id excluding 'TDS'
991: type of taxes.
992: The total amount in JAI_PO_LINE_LOCATIONS is calculated as

Line 990: in the table JAI_PO_TAXES for that line_locations_id excluding 'TDS'

986: In case of partial cancellation of purchase order line, apportion the tax amount
987: in the ratio of quantity_received to original line quantity i.e quantity_received/quantity
988: in table JAI_PO_TAXES.
989: Calculate the tax_amount in the table JAI_PO_LINE_LOCATIONS as a sum of all records
990: in the table JAI_PO_TAXES for that line_locations_id excluding 'TDS'
991: type of taxes.
992: The total amount in JAI_PO_LINE_LOCATIONS is calculated as
993: (po_line_locations_all.quantity_received * po_line_locations_all.price_override)
994: +

Line 995: sum of all taxes from JAI_PO_TAXES for that line_location_id .

991: type of taxes.
992: The total amount in JAI_PO_LINE_LOCATIONS is calculated as
993: (po_line_locations_all.quantity_received * po_line_locations_all.price_override)
994: +
995: sum of all taxes from JAI_PO_TAXES for that line_location_id .
996:
997: 2 15/10/2003 Vijay Shankar for Bug #3184673, File version 618.1
998: Adhoc taxes are not apportioned when quantity is changed which is handled with this bug.
999: Code is added to update JAI_PO_TAXES tables based on old and new quantity for adhoc taxes

Line 999: Code is added to update JAI_PO_TAXES tables based on old and new quantity for adhoc taxes

995: sum of all taxes from JAI_PO_TAXES for that line_location_id .
996:
997: 2 15/10/2003 Vijay Shankar for Bug #3184673, File version 618.1
998: Adhoc taxes are not apportioned when quantity is changed which is handled with this bug.
999: Code is added to update JAI_PO_TAXES tables based on old and new quantity for adhoc taxes
1000:
1001: 3 29-Nov-2004 Sanjikum for 4035297. Version 115.1
1002: Changed the 'INR' check. Added the call to jai_cmn_utils_pkg.check_jai_exists
1003:

Line 1306: and JAI_PO_TAXES and return .

1302: IF nvl(v_quantity_cancelled,-9999) = nvl(v_qty,0) THEN
1303: /*
1304: Indicating that the entire line has been cancelled and no receipt has been made for ths line,
1305: then delete the line and associated taxes from JAI_PO_LINE_LOCATIONS
1306: and JAI_PO_TAXES and return .
1307: */
1308: DELETE
1309: JAI_PO_TAXES
1310: WHERE

Line 1309: JAI_PO_TAXES

1305: then delete the line and associated taxes from JAI_PO_LINE_LOCATIONS
1306: and JAI_PO_TAXES and return .
1307: */
1308: DELETE
1309: JAI_PO_TAXES
1310: WHERE
1311: line_location_id = v_line_loc_id AND
1312: po_line_id = v_po_line_id AND
1313: po_header_id = v_po_hdr_id;

Line 1327: and JAI_PO_TAXES

1323: /*
1324: Indicating that a partial receipt has been made for the line and then the line has been cancelled.
1325: In such a case the cancelled quantity would be lesser than the quantity in table po_line_locations_all.
1326: Now in this scenario update the line and the associated apportioned taxes in the table JAI_PO_LINE_LOCATIONS
1327: and JAI_PO_TAXES
1328: */
1329:
1330: /*
1331: Update the JAI_PO_TAXES with the apportioned tax_amount

Line 1331: Update the JAI_PO_TAXES with the apportioned tax_amount

1327: and JAI_PO_TAXES
1328: */
1329:
1330: /*
1331: Update the JAI_PO_TAXES with the apportioned tax_amount
1332: The tax amounts are apportioned in a ratio of the (quantity_received\quantity)
1333: Only the taxes which have a adhoc flag set to 'N' can be apportioned.
1334: Taxes which have adhoc flag set to 'Y' would remain unaffected .
1335:

Line 1344: JAI_PO_TAXES

1340: -- following IF commented by Vijay Shankar for Bug #3184673
1341: -- IF cur_rec_get_tax_amount.adhoc_flag = 'N' THEN
1342:
1343: UPDATE
1344: JAI_PO_TAXES
1345: SET
1346: tax_amount = (nvl(v_quantity_received,0) / nvl(v_qty,1)) * nvl(cur_rec_get_tax_amount.tax_amount,0)
1347: WHERE
1348: CURRENT OF rec_get_tax_amount;

Line 1354: The record in ja_in_po_line_location has to be updated with the total of all taxes from JAI_PO_TAXES

1350: -- END IF;
1351: END LOOP;
1352:
1353: /*
1354: The record in ja_in_po_line_location has to be updated with the total of all taxes from JAI_PO_TAXES
1355: excluding the TDS type of taxes. The total_amount should be calculated as (quantity_received * price_override) + total of tax amount
1356: */
1357:
1358: OPEN rec_calc_total_tax ;

Line 1575: UPDATE JAI_PO_TAXES a

1571: IF v_old_qty IS NULL OR v_old_qty = 0 THEN
1572: v_old_qty := 1;
1573: END IF;
1574:
1575: UPDATE JAI_PO_TAXES a
1576: SET tax_amount = (tax_amount * pr_new.quantity/ v_old_qty ),
1577: tax_target_amount = (tax_target_amount * pr_new.quantity/ v_old_qty)
1578: WHERE line_location_id = v_line_loc_id
1579: AND EXISTS (select 1 from JAI_CMN_TAXES_ALL b where b.tax_id = a.tax_id and b.adhoc_flag = 'Y');

Line 1628: DELETE FROM JAI_PO_TAXES

1624:
1625:
1626: IF v_flag = 'N' OR retcode = FALSE THEN
1627:
1628: DELETE FROM JAI_PO_TAXES
1629: WHERE Po_Line_Id = v_po_line_id
1630: AND NVL( Line_Location_Id, - 999 ) = NVL( v_line_loc_id, -999 );
1631:
1632: DELETE FROM JAI_PO_LINE_LOCATIONS