DBA Data[Home] [Help]

APPS.AP_WEB_CC_VALIDATIONS_PKG dependencies on AP_CREDIT_CARD_TRXNS_ALL

Line 112: return execute_update( 'update ap_credit_card_trxns_all cc '||

108: ------------------------------------------------------------------------------
109: -- Default org_id - based on card program
110: function default_org_id(p_valid_only in boolean) return number is
111: begin
112: return execute_update( 'update ap_credit_card_trxns_all cc '||
113: 'set org_id = (select org_id from ap_card_programs_all apcp where apcp.card_program_id = cc.card_program_id) '||
114: 'where cc.org_id is null' , p_valid_only );
115: end default_org_id;
116:

Line 123: return execute_update( 'update ap_credit_card_trxns_all cc '||

119: function set_request_id(p_request_id in number) return number is
120: l_valid_only boolean;
121: begin
122: l_valid_only := true;
123: return execute_update( 'update ap_credit_card_trxns_all cc '||
124: 'set request_id = ' || to_char(p_request_id) ||
125: 'where cc.request_id is null' , l_valid_only );
126: end set_request_id;
127:

Line 132: return execute_update( 'update ap_credit_card_trxns_all cc '||

128: function set_validate_request_id(p_request_id in number) return number is
129: l_valid_only boolean;
130: begin
131: l_valid_only := true;
132: return execute_update( 'update ap_credit_card_trxns_all cc '||
133: 'set validate_request_id = ' || to_char(p_request_id) ||
134: 'Where 1=1', l_valid_only );
135: end set_validate_request_id;
136:

Line 154: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||

150:
151: l_count number := 0;
152: begin
153: stmt := 'select distinct cp.card_program_id, cp.card_exp_type_map_type_code, cp.card_exp_type_source_col '||
154: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||
155: 'where cc.card_program_id = cp.card_program_id ';
156:
157: if p_valid_only then
158: l_validate_where := ' AND CC.VALIDATE_CODE = ''UNTESTED''';

Line 167: l_stmt := 'update ap_credit_card_trxns_all cc '||

163: fetch c into l_card_program_id, l_map_type_code, l_column_name;
164: exit when c%notfound;
165:
166: if l_map_type_code is not null and l_column_name is not null then
167: l_stmt := 'update ap_credit_card_trxns_all cc '||
168: 'set folio_type = ap_map_types_pkg.get_map_to_code(:r0, cc.'||l_column_name||') '||
169: 'where cc.card_program_id = :r1';
170:
171: if g_where_clause_type = 'ALL' then

Line 196: l_count := execute_update('update ap_credit_card_trxns_all cc '||

192: begin
193: --
194: -- If a null merchant country was passed in,
195: -- default it based on various information of the card program.
196: l_count := execute_update('update ap_credit_card_trxns_all cc '||
197: 'set merchant_country = nvl(merchant_country, ap_web_locations_pkg.default_country(card_program_id)) '||
198: 'where merchant_country is null ', p_valid_only);
199:
200: --

Line 203: l_count := execute_update( 'update ap_credit_card_trxns_all cc '||

199:
200: --
201: -- Default merchant country code
202: -- based on mapping rules
203: l_count := execute_update( 'update ap_credit_card_trxns_all cc '||
204: 'set merchant_country_code = ' ||
205: '(select ap_map_types_pkg.get_map_to_code(c.country_map_type_code, cc.merchant_country) '||
206: ' from ap_card_programs_all c '||
207: ' where c.card_program_id = cc.card_program_id) '||

Line 241: ' update ap_credit_card_trxns_all cc

237: l_custom_pay_trxn := AP_WEB_CUST_DFLEX_PKG.CustomMarkPaymentTrxn;
238:
239: IF (l_custom_pay_trxn = FALSE) THEN
240: num_rows := execute_update(
241: ' update ap_credit_card_trxns_all cc
242: set payment_flag = ''Y''
243: where (mis_industry_code = ''PA''
244: or upper(transaction_type) = ''PAYMENTS''
245: or (card_program_id in (select card_program_id from ap_card_programs_all where card_brand_lookup_code = ''MasterCard'') and

Line 265: 'update ap_credit_card_trxns_all cc

261: function convert_currency_code(p_valid_only in boolean) return number is
262: num_rows number;
263: begin
264: num_rows := execute_update(
265: 'update ap_credit_card_trxns_all cc
266: set cc.billed_currency_code =
267: (select currency_code
268: from ap_card_currencies
269: where numeric_currency_code = cc.billed_currency_code)

Line 289: 'update ap_credit_card_trxns_all cc

285: --------------------------------------------------------------------
286: -- Convert null billed currency codes
287: --------------------------------------------------------------------
288: num_rows := num_rows + execute_update(
289: 'update ap_credit_card_trxns_all cc
290: set cc.billed_currency_code =
291: (select cp.card_program_currency_code
292: from ap_card_programs_all cp
293: where cp.card_program_id = cc.card_program_id)

Line 301: 'update ap_credit_card_trxns_all cc

297: --------------------------------------------------------------------
298: -- Convert posted currency codes
299: --------------------------------------------------------------------
300: num_rows := num_rows + execute_update(
301: 'update ap_credit_card_trxns_all cc
302: set cc.posted_currency_code =
303: (select currency_code
304: from ap_card_currencies
305: where numeric_currency_code = cc.posted_currency_code)

Line 317: 'update ap_credit_card_trxns_all cc

313: --------------------------------------------------------------------
314: -- Convert null posted currency codes
315: --------------------------------------------------------------------
316: num_rows := num_rows + execute_update(
317: 'update ap_credit_card_trxns_all cc
318: set cc.posted_currency_code =
319: (select cp.card_program_currency_code
320: from ap_card_programs_all cp
321: where cp.card_program_id = cc.card_program_id)

Line 335: l_cc_trx ap_credit_card_trxns_all%rowtype;

331: function get_locations(p_valid_only in boolean) return number is
332: stmt varchar2(2000);
333:
334: l_loc_cur t_gen_cur;
335: l_cc_trx ap_credit_card_trxns_all%rowtype;
336:
337: l_return_status varchar2(30);
338: l_msg_count number;
339: l_msg_data varchar2(2000);

Line 344: from ap_credit_card_trxns_all cc

340:
341: num_rows number := 0;
342: begin
343: stmt := 'select *
344: from ap_credit_card_trxns_all cc
345: where location_id is null '||g_where_clause
346: || ' for update of location_id nowait';
347: execute_select(l_loc_cur, stmt, p_valid_only);
348: loop

Line 355: update ap_credit_card_trxns_all set location_id = l_cc_trx.location_id

351:
352: num_rows := num_rows + 1;
353: ap_web_locations_pkg.get_location(l_cc_trx, l_return_status, l_msg_count, l_msg_data);
354:
355: update ap_credit_card_trxns_all set location_id = l_cc_trx.location_id
356: where trx_id = l_cc_trx.trx_id;
357: end loop;
358: close l_loc_cur;
359:

Line 368: ' update ap_credit_card_trxns_all cc

364: -- Stamp CC Transactions with Payment Scenario of Card Program
365: function set_payment_scenario(p_valid_only in boolean) return number is
366: begin
367: return execute_update(
368: ' update ap_credit_card_trxns_all cc
369: set payment_due_from_code = (select payment_due_from_code
370: from ap_card_programs_all cp
371: where cp.card_program_id = cc.card_program_id)
372: where payment_due_from_code is null ', p_valid_only);

Line 388: 'update ap_credit_card_trxns_all cc

384: --------------------------------------------------------------------
385: -- Duplicate transaction
386: --------------------------------------------------------------------
387: return execute_update(
388: 'update ap_credit_card_trxns_all cc
389: set validate_code = ''DUPLICATE_TRANSACTION''
390: where exists
391: (select ''A corresponding transaction exists with this reference number''
392: from ap_credit_card_trxns_all cc2

Line 392: from ap_credit_card_trxns_all cc2

388: 'update ap_credit_card_trxns_all cc
389: set validate_code = ''DUPLICATE_TRANSACTION''
390: where exists
391: (select ''A corresponding transaction exists with this reference number''
392: from ap_credit_card_trxns_all cc2
393: where cc.reference_number = cc2.reference_number
394: and cc.trx_id <> cc2.trx_id
395: and cc.card_id = cc2.card_id
396: and cc.card_program_id = cc2.card_program_id)', p_valid_only

Line 408: 'update ap_credit_card_trxns_all cc

404: --------------------------------------------------------------------
405: -- Invalid billed amount
406: --------------------------------------------------------------------
407: return execute_update(
408: 'update ap_credit_card_trxns_all cc
409: set validate_code = ''INVALID_BILL_AMOUNT''
410: where (billed_amount is null
411: or billed_amount = 0)', p_valid_only
412: );

Line 422: 'update ap_credit_card_trxns_all cc

418: --------------------------------------------------------------------
419: -- Invalid billed currency code
420: --------------------------------------------------------------------
421: return execute_update(
422: 'update ap_credit_card_trxns_all cc
423: set validate_code = ''INVALID_BILL_CURR_CODE''
424: where billed_currency_code is not null
425: and not exists
426: (select ''A corresponding currency exists in FND_CURRENCIES''

Line 444: 'update ap_credit_card_trxns_all cc

440: --------------------------------------------------------------------
441: -- Invalid billed date
442: --------------------------------------------------------------------
443: return execute_update(
444: 'update ap_credit_card_trxns_all cc
445: set validate_code = ''INVALID_BILL_DATE''
446: where billed_date is null', p_valid_only
447: );
448: end invalid_billed_date;

Line 460: 'update ap_credit_card_trxns_all cc

456: --------------------------------------------------------------------
457: -- Inactive card number
458: --------------------------------------------------------------------
459: num_rows := execute_update(
460: 'update ap_credit_card_trxns_all cc
461: set validate_code = ''INACTIVE_CARD_NUMBER''
462: where cc.transaction_date >=
463: (select max(nvl(apc.inactive_date,cc.transaction_date+1))
464: from ap_cards_all apc

Line 480: num_rows := execute_update('update ap_credit_card_trxns_all cc

476: --------------------------------------------------------------------
477: -- Invalid card number
478: --------------------------------------------------------------------
479: IF(IBY_FNDCPT_SETUP_PUB.Get_Encryption_Patch_Level = 'PADSS') THEN
480: num_rows := execute_update('update ap_credit_card_trxns_all cc
481: set validate_code = ''INVALID_CARD_NUMBER''
482: where card_id in
483: (select card_id
484: from ap_cards_all apc, iby_creditcard icc

Line 492: num_rows := execute_update('update ap_credit_card_trxns_all cc

488: icc.invalid_flag = ''Y'')
489: and cc.card_number is null
490: and cc.validate_code != ''Y''', p_valid_only);
491: ELSE
492: num_rows := execute_update('update ap_credit_card_trxns_all cc
493: set validate_code = ''INVALID_CARD_NUMBER''
494: where card_id not in
495: (select card_id
496: from ap_cards_all apc

Line 515: 'update ap_credit_card_trxns_all cc

511: --------------------------------------------------------------------
512: --4730543 : skip validation for AME mis_industry_code 'SP' - Stop Payment
513: --and Transaction Type '05'
514: return execute_update(
515: 'update ap_credit_card_trxns_all cc
516: set validate_code = ''INVALID_MERCH_NAME''
517: where (merchant_name1 is null
518: and merchant_name2 is null)
519: and ( (transaction_type in (''11'',''20'',''22'',''80'')

Line 553: 'update ap_credit_card_trxns_all cc

549: --------------------------------------------------------------------
550: -- Invalid posted currency code
551: --------------------------------------------------------------------
552: return execute_update(
553: 'update ap_credit_card_trxns_all cc
554: set validate_code = ''INVALID_POST_CURR_CODE''
555: where posted_currency_code is not null
556: and posted_currency_code not in (select currency_code from ap_card_currencies) ', p_valid_only
557: );

Line 568: 'update ap_credit_card_trxns_all cc

564: --------------------------------------------------------------------
565: -- Invalid transaction amount
566: --------------------------------------------------------------------
567: return execute_update(
568: 'update ap_credit_card_trxns_all cc
569: set validate_code = ''INVALID_TRX_AMOUNT''
570: where (transaction_amount is null
571: or transaction_amount = 0)', p_valid_only
572: );

Line 583: 'update ap_credit_card_trxns_all cc

579: --------------------------------------------------------------------
580: -- Invalid transaction date
581: --------------------------------------------------------------------
582: return execute_update(
583: 'update ap_credit_card_trxns_all cc
584: set validate_code = ''INVALID_TRX_DATE''
585: where transaction_date is null
586: and ((mis_industry_code <> ''PA''
587: and card_program_id in (select card_program_id

Line 605: 'update ap_credit_card_trxns_all cc

601: -- rows that are still valid
602: function valid_trx return number is
603: begin
604: return execute_update(
605: 'update ap_credit_card_trxns_all cc
606: set validate_code = ''Y''
607: where validate_code = ''UNTESTED''', true);
608: end valid_trx;
609:

Line 621: 'update ap_credit_card_trxns_all cc

617: --------------------------------------------------------------------
618: -- Invalid mis_industry_code
619: --------------------------------------------------------------------
620: return execute_update(
621: 'update ap_credit_card_trxns_all cc
622: set validate_code = ''INVALID_SIC_CODE''
623: where card_program_id in (select card_program_id
624: from ap_card_programs_all
625: where card_brand_lookup_code = ''Visa'')

Line 754: return execute_update( 'update ap_credit_card_trxns_all cc '||

750: function set_row_set_internal
751: return number is
752: num_rows number;
753: begin
754: return execute_update( 'update ap_credit_card_trxns_all cc '||
755: 'set validate_code = ''UNTESTED'' '||
756: 'where validate_code <> ''Y'' ' ||
757: 'and nvl(category,''BUSINESS'') <> ''DEACTIVATED'' ', false );
758: end set_row_set_internal;

Line 842: 'UPDATE AP_CREDIT_CARD_TRXNS_ALL CC

838: BEGIN
839: return execute_update(
840: -- Bug 3313557: Replaced TRXN alias with CC, so that it is compatible
841: -- with the rest of the dynamic SQL.
842: 'UPDATE AP_CREDIT_CARD_TRXNS_ALL CC
843: SET CATEGORY = ''PERSONAL''
844: WHERE CATEGORY <> ''PERSONAL''
845: AND EXISTS (SELECT 1
846: FROM AP_CARDS_ALL CARD,

Line 859: 'update ap_credit_card_trxns_all cc

855:
856: function validate_trx_detail_amount return number is
857: begin
858: return execute_update(
859: 'update ap_credit_card_trxns_all cc
860: set trxn_detail_flag = NULL
861: where trxn_detail_flag = ''Y''
862: and abs(transaction_amount) <
863: (select abs(sum(transaction_amount))

Line 880: return execute_update( 'update ap_credit_card_trxns_all cc ' ||

876: -- Bug 6743651 For adjustment transactions for MasterCard
877:
878: function default_merchant_name(p_valid_only in boolean) return number is
879: begin
880: return execute_update( 'update ap_credit_card_trxns_all cc ' ||
881: 'set merchant_name1 = (' ||
882: 'select card_program_name ' ||
883: 'from ap_card_programs_all apcp ' ||
884: 'where apcp.card_program_id = cc.card_program_id and rownum = 1) ' ||

Line 916: num_rows := execute_update('delete ap_credit_card_trxns_all cc where card_id in

912: --------------------------------------------------------------------
913: -- Delete invalid records
914: --------------------------------------------------------------------
915: IF(IBY_FNDCPT_SETUP_PUB.Get_Encryption_Patch_Level = 'PADSS') THEN
916: num_rows := execute_update('delete ap_credit_card_trxns_all cc where card_id in
917: (select card_id
918: from ap_cards_all apc, iby_creditcard icc
919: where apc.card_program_id = cc.card_program_id and
920: apc.card_id = cc.card_id and

Line 926: num_rows := execute_update('delete ap_credit_card_trxns_all cc where card_id not in

922: icc.invalid_flag = ''Y'')
923: and cc.card_number is null
924: and cc.validate_code != ''Y''' || card_prog_where, p_valid_only);
925: ELSE
926: num_rows := execute_update('delete ap_credit_card_trxns_all cc where card_id not in
927: (select card_id
928: from ap_cards_all apc
929: where apc.card_program_id = cc.card_program_id and
930: apc.card_id = cc.card_id)

Line 944: 'update ap_credit_card_trxns_all cc

940: --------------------------------------------------------------------
941: -- Duplicate transaction
942: --------------------------------------------------------------------
943: return execute_update(
944: 'update ap_credit_card_trxns_all cc
945: set validate_code = ''DUPLICATE_TRANSACTION''
946: where
947: cc.card_program_id in
948: (select acp.card_program_id from ap_card_programs_all acp where gl_program_name =

Line 952: from ap_credit_card_trxns_all cc2

948: (select acp.card_program_id from ap_card_programs_all acp where gl_program_name =
949: (select gl_program_name from ap_card_programs_all where card_program_id = cc.card_program_id))
950: and exists
951: (select ''A corresponding transaction exists with this reference number''
952: from ap_credit_card_trxns_all cc2
953: where cc.reference_number = cc2.reference_number
954: and cc.trx_id <> cc2.trx_id)', p_valid_only
955: );
956: end duplicate_global_trx;

Line 972: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||

968:
969: l_count number := 0;
970: begin
971: stmt := 'select distinct cp.card_program_id, cp.card_exp_type_detail_map_code '||
972: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||
973: 'where cc.card_program_id = cp.card_program_id ';
974:
975: if p_valid_only then
976: l_validate_where := ' AND CC.VALIDATE_CODE = ''UNTESTED''';

Line 987: 'where trx_id in (select trx_id from ap_credit_card_trxns_all cc where cc.card_program_id = :r1';

983:
984: if l_map_type_code is not null then
985: l_stmt := 'update ap_cc_trx_details ac '||
986: 'set folio_type = ap_map_types_pkg.get_map_to_code(:r0, ac.ext_folio_type) '||
987: 'where trx_id in (select trx_id from ap_credit_card_trxns_all cc where cc.card_program_id = :r1';
988:
989: if g_where_clause_type = 'ALL' THEN
990: l_stmt := l_stmt || l_validate_where || ')';
991: execute immediate l_stmt using l_map_type_code, l_card_program_id;