1: PACKAGE IBY_PAYINSTR_PUB AS
2: /*$Header: ibypymis.pls 120.31.12010000.1 2008/07/28 05:42:15 appldev ship $*/
3:
4: /*
5: * This record corresponds to a row in the IBY_PAY_INSTRUCTIONS_ALL
6: * table.
7: *
8: * A PLSQL table of these records are created after applying
9: * grouping rules and this table is used in bulk inserting
6: * table.
7: *
8: * A PLSQL table of these records are created after applying
9: * grouping rules and this table is used in bulk inserting
10: * these payment instructions into the IBY_PAY_INSTRUCTIONS_ALL
11: * table.
12: *
13: * The record docsInPaymentRecType holds the payments
14: * corresponding to this payment instruction.
13: * The record docsInPaymentRecType holds the payments
14: * corresponding to this payment instruction.
15: */
16: --
17: -- This PLSQL table corresponds to IBY_PAY_INSTRUCTIONS_ALL and it
18: -- will be used in bulk updating the IBY_PAY_INSTRUCTIONS_ALL table.
19: --
20: TYPE pmtInstrTabType IS TABLE OF IBY_PAY_INSTRUCTIONS_ALL%ROWTYPE
21: INDEX BY BINARY_INTEGER;
14: * corresponding to this payment instruction.
15: */
16: --
17: -- This PLSQL table corresponds to IBY_PAY_INSTRUCTIONS_ALL and it
18: -- will be used in bulk updating the IBY_PAY_INSTRUCTIONS_ALL table.
19: --
20: TYPE pmtInstrTabType IS TABLE OF IBY_PAY_INSTRUCTIONS_ALL%ROWTYPE
21: INDEX BY BINARY_INTEGER;
22:
16: --
17: -- This PLSQL table corresponds to IBY_PAY_INSTRUCTIONS_ALL and it
18: -- will be used in bulk updating the IBY_PAY_INSTRUCTIONS_ALL table.
19: --
20: TYPE pmtInstrTabType IS TABLE OF IBY_PAY_INSTRUCTIONS_ALL%ROWTYPE
21: INDEX BY BINARY_INTEGER;
22:
23: --
24: -- This record needs to be created because of the fact that
21: INDEX BY BINARY_INTEGER;
22:
23: --
24: -- This record needs to be created because of the fact that
25: -- there is no payment id column in IBY_PAY_INSTRUCTIONS_ALL table.
26: -- So we cannot add the payment id as a field in the pmtInstrRecType
27: -- record (adding this field to the record will cause a syntax
28: -- error during the bulk update).
29: --
42: TYPE pmtsInPmtInstrRecType IS RECORD (
43: payment_id
44: IBY_PAYMENTS_ALL.payment_id%TYPE,
45: pay_instr_id
46: IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
47: payment_amount
48: IBY_PAYMENTS_ALL.payment_amount%TYPE,
49: payment_currency
50: IBY_PAYMENTS_ALL.payment_currency_code%TYPE,
81: -- type set to 'PAPER' - i.e., payment payments.
82: --
83: TYPE paperPmtsSpecialDocsRecType IS RECORD (
84: payment_id IBY_PAYMENTS_ALL.payment_id%TYPE,
85: instruction_id IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
86: num_setup_docs NUMBER,
87: num_overflow_docs NUMBER,
88:
89: /*
285: --
286: TYPE sortedPmtRecType IS RECORD (
287: payment_id IBY_PAYMENTS_ALL.payment_id%TYPE,
288: payment_ref IBY_PAYMENTS_ALL.payment_reference_number%TYPE,
289: instr_id IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
290: instr_status IBY_PAY_INSTRUCTIONS_ALL.
291: payment_instruction_status%TYPE,
292: ca_id IBY_PAY_SERVICE_REQUESTS.calling_app_id%TYPE,
293: le_id IBY_PAYMENTS_ALL.legal_entity_id%TYPE,
286: TYPE sortedPmtRecType IS RECORD (
287: payment_id IBY_PAYMENTS_ALL.payment_id%TYPE,
288: payment_ref IBY_PAYMENTS_ALL.payment_reference_number%TYPE,
289: instr_id IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
290: instr_status IBY_PAY_INSTRUCTIONS_ALL.
291: payment_instruction_status%TYPE,
292: ca_id IBY_PAY_SERVICE_REQUESTS.calling_app_id%TYPE,
293: le_id IBY_PAYMENTS_ALL.legal_entity_id%TYPE,
294: doc_cat_code IBY_PAYMENT_METHODS_VL.document_category_code%TYPE,
376: p_print_now_flag IN VARCHAR2,
377: p_transmit_now_flag IN VARCHAR2,
378:
379: /*-- user/admin assigned criteria --*/
380: p_admin_assigned_ref IN IBY_PAY_INSTRUCTIONS_ALL.
381: pay_admin_assigned_ref_code%TYPE,
382: p_comments IN IBY_PAY_INSTRUCTIONS_ALL.
383: comments%TYPE,
384:
378:
379: /*-- user/admin assigned criteria --*/
380: p_admin_assigned_ref IN IBY_PAY_INSTRUCTIONS_ALL.
381: pay_admin_assigned_ref_code%TYPE,
382: p_comments IN IBY_PAY_INSTRUCTIONS_ALL.
383: comments%TYPE,
384:
385: /*-- selection criteria --*/
386: p_payment_profile_id IN IBY_PAYMENTS_ALL.
436: | NOTES:
437: |
438: *---------------------------------------------------------------------*/
439: PROCEDURE recreatePaymentInstruction(
440: x_pmtInstrRec IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL
441: %ROWTYPE,
442: x_docErrorTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.
443: docErrorTabType,
444: x_errTokenTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.
465: | NOTES:
466: |
467: *---------------------------------------------------------------------*/
468: PROCEDURE insertPmtIntoInstruction(
469: x_pmtInstrRec IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL
470: %ROWTYPE,
471: x_pmtInstrTab IN OUT NOCOPY pmtInstrTabType,
472: p_newPmtInstrFlag IN BOOLEAN,
473: x_currentPmtInstrId IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL.
469: x_pmtInstrRec IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL
470: %ROWTYPE,
471: x_pmtInstrTab IN OUT NOCOPY pmtInstrTabType,
472: p_newPmtInstrFlag IN BOOLEAN,
473: x_currentPmtInstrId IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL.
474: payment_instruction_id%TYPE,
475: x_pmtsInPmtInstrTab IN OUT NOCOPY pmtsInPmtInstrTabType,
476: x_pmtsInPmtInstrRec IN OUT NOCOPY pmtsInpmtInstrRecType,
477: x_pmtsInPmtInstrCount IN OUT NOCOPY NUMBER,
507: | updatePaymentInstructions
508: |
509: | PURPOSE:
510: | Performs an update of all created instructions from PLSQL
511: | table into IBY_PAY_INSTRUCTIONS_ALL table.
512: |
513: | The created instructions have already been inserted into
514: | IBY_PAY_INSTRUCTIONS_ALL after grouping. So we only need to
515: | update certain fields of the instruction that have been
510: | Performs an update of all created instructions from PLSQL
511: | table into IBY_PAY_INSTRUCTIONS_ALL table.
512: |
513: | The created instructions have already been inserted into
514: | IBY_PAY_INSTRUCTIONS_ALL after grouping. So we only need to
515: | update certain fields of the instruction that have been
516: | changed after the grouping was performed.
517: |
518: | PARAMETERS:
551: | NOTES:
552: |
553: *---------------------------------------------------------------------*/
554: PROCEDURE getNextPaymentInstructionID(
555: x_pmtInstrID IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL.
556: payment_instruction_id%TYPE
557: );
558:
559: /*--------------------------------------------------------------------
743: | NOTES:
744: |
745: *---------------------------------------------------------------------*/
746: PROCEDURE setRemitFlagForPmtInstruction(
747: p_pmtInstrId IN IBY_PAY_INSTRUCTIONS_ALL.
748: payment_instruction_id%TYPE,
749: x_pmtInstrTab IN OUT NOCOPY pmtInstrTabType
750: );
751:
793: | NOTES:
794: |
795: *---------------------------------------------------------------------*/
796: PROCEDURE reApplyPayInstrValidationSets(
797: x_pmtInstrRec IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL%ROWTYPE,
798: x_docErrorTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.docErrorTabType,
799: x_errTokenTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.trxnErrTokenTabType
800: );
801:
818: | NOTES:
819: |
820: *---------------------------------------------------------------------*/
821: PROCEDURE executeValidationsForInstr(
822: x_pmtInstrRec IN OUT NOCOPY IBY_PAY_INSTRUCTIONS_ALL%ROWTYPE,
823: p_valSetsTab IN instructionValSetsTab,
824: p_isReval IN BOOLEAN,
825: x_docErrorTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.docErrorTabType,
826: x_errTokenTab IN OUT NOCOPY IBY_VALIDATIONSETS_PUB.trxnErrTokenTabType
1048: *---------------------------------------------------------------------*/
1049: FUNCTION getSortOptionsForProfile(
1050: p_sortOptionsTab IN sortOptionsTabType,
1051: p_profileMap IN IBY_BUILD_UTILS_PKG.profileIdToCodeMapTabType,
1052: p_profile_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_profile_id%TYPE
1053: )
1054: RETURN sortOptionsRecType;
1055:
1056: /*--------------------------------------------------------------------
1198: | NOTES:
1199: |
1200: *---------------------------------------------------------------------*/
1201: PROCEDURE deriveDistinctAccessTypsForIns(
1202: p_instruction_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id
1203: %TYPE,
1204: p_pmt_function IN IBY_PAYMENTS_ALL.payment_function%TYPE,
1205: p_org_id IN IBY_PAYMENTS_ALL.org_id%TYPE,
1206: p_org_type IN IBY_PAYMENTS_ALL.org_type%TYPE,
1299: | NOTES:
1300: |
1301: *---------------------------------------------------------------------*/
1302: FUNCTION checkIfDocSeqCompleted(
1303: p_instr_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE
1304: )
1305: RETURN BOOLEAN;
1306:
1307: /*--------------------------------------------------------------------
1322: | NOTES:
1323: |
1324: *---------------------------------------------------------------------*/
1325: FUNCTION checkIfPmtRefCompleted(
1326: p_instr_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE
1327: )
1328: RETURN BOOLEAN;
1329:
1330: /*--------------------------------------------------------------------
1347: | NOTES:
1348: |
1349: *---------------------------------------------------------------------*/
1350: PROCEDURE getSortedPmtsForInstr(
1351: p_instr_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
1352: p_profile_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_profile_id%TYPE,
1353: p_sortOptionsTab IN sortOptionsTabType,
1354: p_profileMap IN IBY_BUILD_UTILS_PKG.profileIdToCodeMapTabType,
1355: x_sortedPmtTab IN OUT NOCOPY sortedPmtTabType
1348: |
1349: *---------------------------------------------------------------------*/
1350: PROCEDURE getSortedPmtsForInstr(
1351: p_instr_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE,
1352: p_profile_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_profile_id%TYPE,
1353: p_sortOptionsTab IN sortOptionsTabType,
1354: p_profileMap IN IBY_BUILD_UTILS_PKG.profileIdToCodeMapTabType,
1355: x_sortedPmtTab IN OUT NOCOPY sortedPmtTabType
1356: );
1375: | NOTES:
1376: |
1377: *---------------------------------------------------------------------*/
1378: FUNCTION get_instruction_profile (
1379: l_pmt_instr_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_instruction_id%TYPE)
1380: RETURN NUMBER;
1381:
1382: /*--------------------------------------------------------------------
1383: | NAME:
1399: | NOTES:
1400: |
1401: *---------------------------------------------------------------------*/
1402: PROCEDURE retrieveSortOptionForProfile(
1403: p_profile_id IN IBY_PAY_INSTRUCTIONS_ALL.payment_profile_id%TYPE,
1404: x_sortOptionsTab IN OUT NOCOPY sortOptionsTabType
1405: );
1406:
1407: /*--------------------------------------------------------------------