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 144: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||

140:
141: l_count number := 0;
142: begin
143: stmt := 'select distinct cp.card_program_id, cp.card_exp_type_map_type_code, cp.card_exp_type_source_col '||
144: 'from ap_credit_card_trxns_all cc, ap_card_programs_all cp '||
145: 'where cc.card_program_id = cp.card_program_id ';
146:
147: if p_valid_only then
148: l_validate_where := ' AND CC.VALIDATE_CODE = ''UNTESTED''';

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

153: fetch c into l_card_program_id, l_map_type_code, l_column_name;
154: exit when c%notfound;
155:
156: if l_map_type_code is not null and l_column_name is not null then
157: l_stmt := 'update ap_credit_card_trxns_all cc '||
158: 'set folio_type = ap_map_types_pkg.get_map_to_code(:r0, cc.'||l_column_name||') '||
159: 'where cc.card_program_id = :r1';
160:
161: if g_where_clause_type = 'ALL' then

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

182: begin
183: --
184: -- If a null merchant country was passed in,
185: -- default it based on various information of the card program.
186: l_count := execute_update('update ap_credit_card_trxns_all cc '||
187: 'set merchant_country = nvl(merchant_country, ap_web_locations_pkg.default_country(card_program_id)) '||
188: 'where merchant_country is null ', p_valid_only);
189:
190: --

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

189:
190: --
191: -- Default merchant country code
192: -- based on mapping rules
193: l_count := execute_update( 'update ap_credit_card_trxns_all cc '||
194: 'set merchant_country_code = ' ||
195: '(select ap_map_types_pkg.get_map_to_code(c.country_map_type_code, cc.merchant_country) '||
196: ' from ap_card_programs_all c '||
197: ' where c.card_program_id = cc.card_program_id) '||

Line 227: ' update ap_credit_card_trxns_all cc

223: -- The criteria for MasterCard IS incorrect.
224: -- 1) transaction_amount may be zero while billed_amount is negative
225: -- 2) may include refunds - not just payments
226: num_rows := execute_update(
227: ' update ap_credit_card_trxns_all cc
228: set payment_flag = ''Y''
229: where (mis_industry_code = ''PA''
230: or transaction_type = ''PAYMENTS''
231: or (upper(description) like ''%PAYMENT%'' and

Line 249: 'update ap_credit_card_trxns_all cc

245: function convert_currency_code(p_valid_only in boolean) return number is
246: num_rows number;
247: begin
248: num_rows := execute_update(
249: 'update ap_credit_card_trxns_all cc
250: set cc.billed_currency_code =
251: (select currency_code
252: from ap_card_currencies
253: where numeric_currency_code = cc.billed_currency_code)

Line 273: 'update ap_credit_card_trxns_all cc

269: --------------------------------------------------------------------
270: -- Convert null billed currency codes
271: --------------------------------------------------------------------
272: num_rows := num_rows + execute_update(
273: 'update ap_credit_card_trxns_all cc
274: set cc.billed_currency_code =
275: (select cp.card_program_currency_code
276: from ap_card_programs_all cp
277: where cp.card_program_id = cc.card_program_id)

Line 285: 'update ap_credit_card_trxns_all cc

281: --------------------------------------------------------------------
282: -- Convert posted currency codes
283: --------------------------------------------------------------------
284: num_rows := num_rows + execute_update(
285: 'update ap_credit_card_trxns_all cc
286: set cc.posted_currency_code =
287: (select currency_code
288: from ap_card_currencies
289: where numeric_currency_code = cc.posted_currency_code)

Line 301: 'update ap_credit_card_trxns_all cc

297: --------------------------------------------------------------------
298: -- Convert null 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 cp.card_program_currency_code
304: from ap_card_programs_all cp
305: where cp.card_program_id = cc.card_program_id)

Line 319: l_cc_trx ap_credit_card_trxns_all%rowtype;

315: function get_locations(p_valid_only in boolean) return number is
316: stmt varchar2(2000);
317:
318: l_loc_cur t_gen_cur;
319: l_cc_trx ap_credit_card_trxns_all%rowtype;
320:
321: l_return_status varchar2(30);
322: l_msg_count number;
323: l_msg_data varchar2(2000);

Line 328: from ap_credit_card_trxns_all cc

324:
325: num_rows number := 0;
326: begin
327: stmt := 'select *
328: from ap_credit_card_trxns_all cc
329: where location_id is null '||g_where_clause
330: || ' for update of location_id nowait';
331: execute_select(l_loc_cur, stmt, p_valid_only);
332: loop

Line 339: update ap_credit_card_trxns_all set location_id = l_cc_trx.location_id

335:
336: num_rows := num_rows + 1;
337: ap_web_locations_pkg.get_location(l_cc_trx, l_return_status, l_msg_count, l_msg_data);
338:
339: update ap_credit_card_trxns_all set location_id = l_cc_trx.location_id
340: where trx_id = l_cc_trx.trx_id;
341: end loop;
342: close l_loc_cur;
343:

Line 352: ' update ap_credit_card_trxns_all cc

348: -- Stamp CC Transactions with Payment Scenario of Card Program
349: function set_payment_scenario(p_valid_only in boolean) return number is
350: begin
351: return execute_update(
352: ' update ap_credit_card_trxns_all cc
353: set payment_due_from_code = (select payment_due_from_code
354: from ap_card_programs_all cp
355: where cp.card_program_id = cc.card_program_id)
356: where payment_due_from_code is null ', p_valid_only);

Line 372: 'update ap_credit_card_trxns_all cc

368: --------------------------------------------------------------------
369: -- Duplicate transaction
370: --------------------------------------------------------------------
371: return execute_update(
372: 'update ap_credit_card_trxns_all cc
373: set validate_code = ''DUPLICATE_TRANSACTION''
374: where exists
375: (select ''A corresponding transaction exists with this reference number''
376: from ap_credit_card_trxns_all cc2

Line 376: from ap_credit_card_trxns_all cc2

372: 'update ap_credit_card_trxns_all cc
373: set validate_code = ''DUPLICATE_TRANSACTION''
374: where exists
375: (select ''A corresponding transaction exists with this reference number''
376: from ap_credit_card_trxns_all cc2
377: where cc.reference_number = cc2.reference_number
378: and cc.trx_id <> cc2.trx_id
379: and cc.card_id = cc2.card_id
380: and cc.card_program_id = cc2.card_program_id)', p_valid_only

Line 392: 'update ap_credit_card_trxns_all cc

388: --------------------------------------------------------------------
389: -- Invalid billed amount
390: --------------------------------------------------------------------
391: return execute_update(
392: 'update ap_credit_card_trxns_all cc
393: set validate_code = ''INVALID_BILL_AMOUNT''
394: where (billed_amount is null
395: or billed_amount = 0)', p_valid_only
396: );

Line 406: 'update ap_credit_card_trxns_all cc

402: --------------------------------------------------------------------
403: -- Invalid billed currency code
404: --------------------------------------------------------------------
405: return execute_update(
406: 'update ap_credit_card_trxns_all cc
407: set validate_code = ''INVALID_BILL_CURR_CODE''
408: where billed_currency_code is not null
409: and not exists
410: (select ''A corresponding currency exists in FND_CURRENCIES''

Line 428: 'update ap_credit_card_trxns_all cc

424: --------------------------------------------------------------------
425: -- Invalid billed date
426: --------------------------------------------------------------------
427: return execute_update(
428: 'update ap_credit_card_trxns_all cc
429: set validate_code = ''INVALID_BILL_DATE''
430: where billed_date is null', p_valid_only
431: );
432: end invalid_billed_date;

Line 444: 'update ap_credit_card_trxns_all cc

440: --------------------------------------------------------------------
441: -- Inactive card number
442: --------------------------------------------------------------------
443: num_rows := execute_update(
444: 'update ap_credit_card_trxns_all cc
445: set validate_code = ''INACTIVE_CARD_NUMBER''
446: where cc.transaction_date >=
447: (select max(nvl(apc.inactive_date,cc.transaction_date+1))
448: from ap_cards_all apc

Line 464: 'update ap_credit_card_trxns_all cc

460: --------------------------------------------------------------------
461: -- Invalid card number
462: --------------------------------------------------------------------
463: num_rows := execute_update(
464: 'update ap_credit_card_trxns_all cc
465: set validate_code = ''INVALID_CARD_NUMBER''
466: where card_id not in
467: (select apc.card_id from ap_cards_all apc
468: where apc.card_program_id = cc.card_program_id

Line 484: 'update ap_credit_card_trxns_all cc

480: --------------------------------------------------------------------
481: --4730543 : skip validation for AME mis_industry_code 'SP' - Stop Payment
482: --and Transaction Type '05'
483: return execute_update(
484: 'update ap_credit_card_trxns_all cc
485: set validate_code = ''INVALID_MERCH_NAME''
486: where (merchant_name1 is null
487: and merchant_name2 is null)
488: and ( (transaction_type in (''11'',''20'',''22'',''80'')

Line 522: 'update ap_credit_card_trxns_all cc

518: --------------------------------------------------------------------
519: -- Invalid posted currency code
520: --------------------------------------------------------------------
521: return execute_update(
522: 'update ap_credit_card_trxns_all cc
523: set validate_code = ''INVALID_POST_CURR_CODE''
524: where posted_currency_code is not null
525: and posted_currency_code not in (select currency_code from ap_card_currencies) ', p_valid_only
526: );

Line 537: 'update ap_credit_card_trxns_all cc

533: --------------------------------------------------------------------
534: -- Invalid transaction amount
535: --------------------------------------------------------------------
536: return execute_update(
537: 'update ap_credit_card_trxns_all cc
538: set validate_code = ''INVALID_TRX_AMOUNT''
539: where (transaction_amount is null
540: or transaction_amount = 0)', p_valid_only
541: );

Line 552: 'update ap_credit_card_trxns_all cc

548: --------------------------------------------------------------------
549: -- Invalid transaction date
550: --------------------------------------------------------------------
551: return execute_update(
552: 'update ap_credit_card_trxns_all cc
553: set validate_code = ''INVALID_TRX_DATE''
554: where transaction_date is null
555: and ((mis_industry_code <> ''PA''
556: and card_program_id in (select card_program_id

Line 574: 'update ap_credit_card_trxns_all cc

570: -- rows that are still valid
571: function valid_trx return number is
572: begin
573: return execute_update(
574: 'update ap_credit_card_trxns_all cc
575: set validate_code = ''Y''
576: where validate_code = ''UNTESTED''', true);
577: end valid_trx;
578:

Line 590: 'update ap_credit_card_trxns_all cc

586: --------------------------------------------------------------------
587: -- Invalid mis_industry_code
588: --------------------------------------------------------------------
589: return execute_update(
590: 'update ap_credit_card_trxns_all cc
591: set validate_code = ''INVALID_SIC_CODE''
592: where card_program_id in (select card_program_id
593: from ap_card_programs_all
594: where card_brand_lookup_code = ''Visa'')

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

709: function set_row_set_internal
710: return number is
711: num_rows number;
712: begin
713: return execute_update( 'update ap_credit_card_trxns_all cc '||
714: 'set validate_code = ''UNTESTED'' '||
715: 'where validate_code <> ''Y'' ' ||
716: 'and nvl(category,''BUSINESS'') <> ''DEACTIVATED'' ', false );
717: end set_row_set_internal;

Line 801: 'UPDATE AP_CREDIT_CARD_TRXNS_ALL CC

797: BEGIN
798: return execute_update(
799: -- Bug 3313557: Replaced TRXN alias with CC, so that it is compatible
800: -- with the rest of the dynamic SQL.
801: 'UPDATE AP_CREDIT_CARD_TRXNS_ALL CC
802: SET CATEGORY = ''PERSONAL''
803: WHERE CATEGORY <> ''PERSONAL''
804: AND EXISTS (SELECT 1
805: FROM AP_CARDS_ALL CARD,

Line 818: 'update ap_credit_card_trxns_all cc

814:
815: function validate_trx_detail_amount return number is
816: begin
817: return execute_update(
818: 'update ap_credit_card_trxns_all cc
819: set trxn_detail_flag = NULL
820: where trxn_detail_flag = ''Y''
821: and abs(transaction_amount) <
822: (select abs(sum(transaction_amount))

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

835: -- Bug 6743651 For adjustment transactions for MasterCard
836:
837: function default_merchant_name(p_valid_only in boolean) return number is
838: begin
839: return execute_update( 'update ap_credit_card_trxns_all cc ' ||
840: 'set merchant_name1 = (' ||
841: 'select card_program_name ' ||
842: 'from ap_card_programs_all apcp ' ||
843: 'where apcp.card_program_id = cc.card_program_id and rownum = 1) ' ||

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

870:
871: --------------------------------------------------------------------
872: -- Delete invalid records
873: --------------------------------------------------------------------
874: num_rows := execute_update('delete ap_credit_card_trxns_all cc where card_id not in
875: (select card_id
876: from ap_cards_all apc
877: where apc.card_program_id = cc.card_program_id and
878: apc.card_id = cc.card_id)