The following lines contain the word 'select', 'insert', 'update' or 'delete':
select line_type_lookup_code,
po_distribution_id,
rcv_transaction_id,
set_of_books_id
from ap_invoice_distributions_all
where invoice_id = p_invoice_id
and distribution_line_number = p_distribution_line_number;*/
select line_type_lookup_code,
po_distribution_id,
rcv_transaction_id,
set_of_books_id
from ap_invoice_lines_all /*rchandan for bug#4428980*/
where invoice_id = p_invoice_id
and line_number = p_line_number;
select currency_code
from gl_sets_of_books
where set_of_books_id = p_set_of_books_id;
select shipment_line_id,
vendor_id
from rcv_transactions
where transaction_id = p_transaction_id;
select count(1)
from JAI_RCV_LINE_TAXES
where shipment_line_id = p_shipment_line_id
and nvl(tax_amount, 0) <> 0
and
(
(upper(tax_type) in
( jai_constants.tax_type_cvd, /*--'CVD', 'CUSTOMS', Ramananda for removal of SQL LITERALs */
jai_constants.tax_type_customs,
jai_constants.tax_type_customs_edu_cess,
jai_constants.tax_type_cvd_Edu_cess))
/* BOE Tax */
or
(upper(tax_type) not in --('TDS', 'MODVAT RECOVERY') /* Third party tax */
(
jai_constants.tax_type_tds,
jai_constants.tax_type_modvat_recovery
)
and vendor_id > 0
and vendor_id <> p_po_vendor_id
)
);
select count(1)
from JAI_FA_MASS_ADDITIONS
where create_batch_id = p_parent_request_id
and process_flag <> 'Y';
insert into JAI_FA_MASS_ADDITIONS
(
mass_addition_id,
invoice_id,
distribution_line_number,
invoice_line_number, /*rchandan for bug#4454657*/
process_flag,
book_type_code,
date_placed_in_service,
create_batch_date,
invoice_number,
invoice_date,
vendor_number,
po_number,
DEPRECIATE_STATUS,
asset_type,
accounting_date,
payables_code_combination_id,
created_by,
creation_date,
last_update_login,
last_update_date,
last_updated_by,
create_batch_id
)
values
(
pr_new.mass_addition_id,
pr_new.invoice_id,
pr_new.ap_distribution_line_number,
pr_new.invoice_line_number,
'N',
pr_new.book_type_code,
pr_new.date_placed_in_service,
pr_new.create_batch_date,
pr_new.invoice_number,
pr_new.invoice_date,
pr_new.vendor_number,
pr_new.po_number,
pr_new.depreciate_flag,
pr_new.asset_type,
pr_new.accounting_date,
pr_new.payables_code_combination_id,
pr_new.created_by,
pr_new.creation_date,
pr_new.last_update_login,
pr_new.last_update_date,
pr_new.last_updated_by,
pr_new.create_batch_id
);
/* Not the firstrecord to be inserted by the trigger for the batch
No need to invoke the concurrent */
return;
SELECT A.invoice_id,
A.rcv_transaction_id,
A.distribution_line_number,
A.line_type_lookup_code,
A.amount
FROM JAI_CMN_FA_INV_DIST_ALL A, ap_invoice_distributions_all B
WHERE A.line_type_lookup_code NOT like 'ITEM'
AND B.invoice_id = pr_new.invoice_id
AND A.INVOICE_ID = B.INVOICE_ID
AND A.distribution_line_number = B.distribution_line_number
AND B.distribution_line_number = pr_new.ap_distribution_line_number;*/
SELECT A.rcv_transaction_id
FROM jai_ap_match_inv_taxes A, ap_invoice_lines_all B /* rchandan for bug#4454657 JAI_CMN_FA_INV_DIST_ALL is obsolete and so replaced by JAI_AP_MATCH_INV_TAXES */
WHERE A.line_type_lookup_code NOT like 'ITEM'
AND B.invoice_id = pr_new.invoice_id
AND A.INVOICE_ID = B.INVOICE_ID
AND A.invoice_line_number = B.line_number
AND B.line_number = pr_new.invoice_line_number;
SELECT shipment_header_id,
shipment_line_id
FROM rcv_transactions
WHERE transaction_id = p_rcv_transaction_id;
SELECT jmsi.modvat_flag
FROM JAI_INV_ITM_SETUPS jmsi,
rcv_shipment_lines rsl
WHERE rsl.shipment_line_id = c_shipment_line_id
AND jmsi.organization_id = rsl.to_organization_id
AND jmsi.inventory_item_id = rsl.item_id;
SELECT b.mod_cr_percentage,
a.tax_id
,a.parent_invoice_distribution_id -- 5763527
,a.line_no -- 5763527
FROM JAI_AP_MATCH_INV_TAXES a,
JAI_CMN_TAXES_ALL b
WHERE a.invoice_id = pr_new.invoice_id
AND a.invoice_line_number = pr_new.invoice_line_number /*rchandan for bug#4454657*/
AND a.tax_id = b.tax_id;
SELECT receipt_num,
shipment_header_id
FROM rcv_shipment_headers
WHERE shipment_header_id =p_ship_head_id;
SELECT mfg_trading
FROM JAI_RCV_LINES
WHERE shipment_header_id = p_ship_head_id
AND shipment_line_id = p_ship_line_id;
SELECT tax_amount,
modvat_flag
FROM JAI_RCV_LINE_TAXES
WHERE shipment_line_id = c_ship_line_id
AND tax_id = c_tax_id;
SELECT set_of_Books_id
FROM ap_invoices_all
WHERE invoice_id = pr_new.invoice_id; /*rchandan for bug#4454657*/
select count(1)
from JAI_AP_MATCH_INV_TAXES a
where a.invoice_id = pr_new.invoice_id
and a.parent_invoice_distribution_id = cp_parent_inv_dist_id
and a.tax_id = cp_tax_id
and a.line_no = cp_tax_line_num ;
context is not used at the time of inserting records into FA_MASS_ADDITIONS. The process
here is mass additions create and the dff is not used at that point.
There was no need to put extra condtion as the cursor dist_tax_cur would return null for
non localization record and the control would return from here.
3. 29-nov-2004 ssumaith - bug# 4037690 - File version 115.1
Check whether india localization is being used was done using a INR check in every trigger.
This check has now been moved into a new package and calls made to this package from this trigger
If the function jai_cmn_utils_pkg.check_jai_exists returns true it means INR is the set of books currency ,
Hence if this function returns FALSE , control should return.
4. 08-Jun-2005 This Object is Modified to refer to New DB Entity names in place of Old
DB Entity as required for CASE COMPLAINCE. Version 116.1
5. 13-Jun-2005 File Version: 116.2
Ramananda for bug#4428980. Removal of SQL LITERALs is done
6. 24-Jun-2005 rchandan for bug#4454657,File Version: 116.3
Modified the object as a part of AP LINES Impact Uptake
A column invoice_line_number ie added to jai_fa_mass_additions.
The ap_invoice_lines_all is used instead of ap_invoice_distributions_all while querying wherever applicable.
Future Dependencies For the release Of this Object:-
(Please add a row in the section below only if your bug introduces a dependency due to spec change/ A new call to a object/
A datamodel change )
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Current Version Current Bug Dependent Files Version Author Date Remarks
Of File On Bug/Patchset Dependent On
ja_in_fa_mass_add_trg1.sql
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
115.1 4037690 IN60105D2 ja_in_util_pkg_s.sql 115.0 ssumaith 29-Nov-2004 Call to this function.
ja_in_util_pkg_s.sql 115.0 ssumaith
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* pr_new.Attribute1 := TO_CHAR(TO_DATE(pr_new.Attribute1, 'DD/MM/YYYY'),'DD-MON-RRRR'); */