The following lines contain the word 'select', 'insert', 'update' or 'delete':
| to igs_fi_credits_pkg.update_row() |
| schodava 06-Oct-2003 Bug # 3123405. Modified procedure |
| transfer_deposit.
| vvutukur 22-Sep-2003 Enh#3045007.Payment Plans Build.Modified|
| reverse_transaction. |
| vvutukur 16-Jun-2003 Enh#2831582.Lockbox Build.Modified the |
| procedures forfeit_deposit, |
| reverse_transaction,transfer_deposit. |
| schodava 11-Jun-2003 Enh# 2831587. Credit Card Fund Transfer |
| Modified forfeit_deposit, |
| reverse_transaction and transfer_deposit|
| procedures |
| vvutukur 09-Apr-2003 Enh#2831554.Internal Credits API Build. |
| Modified procedure transfer_deposit. |
| pathipat 8-Dec-02 Enh # 2584741 Deposits build |
| Added forfeit_deposit and transfer_deposit
| schodava 4-Dec-02 Enh # 2584741 Deposits Build |
| Added logic for reversal of Deposit |
| related transactions |
*=======================================================================*/
g_cleared CONSTANT igs_lookup_values.lookup_code%TYPE := 'CLEARED';
SELECT cre.rowid,cre.*
FROM igs_fi_credits cre
WHERE credit_id = cp_credit_id
AND status = g_cleared;
SELECT *
FROM igs_fi_cr_types
WHERE credit_type_id = cp_credit_type_id;
igs_fi_credits_pkg.update_row ( x_mode => 'R',
x_rowid => l_cur_fi_credits.rowid,
x_credit_id => l_cur_fi_credits.credit_id,
x_credit_number => l_cur_fi_credits.credit_number ,
x_status => g_forfeited ,
x_credit_source => l_cur_fi_credits.credit_source,
x_party_id => l_cur_fi_credits.party_id,
x_credit_type_id => l_cur_fi_credits.credit_type_id,
x_credit_instrument => l_cur_fi_credits.credit_instrument,
x_description => l_cur_fi_credits.description,
x_amount => l_cur_fi_credits.amount,
x_currency_cd => l_cur_fi_credits.currency_cd,
x_exchange_rate => l_cur_fi_credits.exchange_rate,
x_transaction_date => l_cur_fi_credits.transaction_date,
x_effective_date => l_cur_fi_credits.effective_date,
x_reversal_date => NULL,
x_reversal_reason_code => NULL,
x_reversal_comments => NULL,
x_unapplied_amount => l_cur_fi_credits.unapplied_amount,
x_source_transaction_id => l_cur_fi_credits.source_transaction_id,
x_receipt_lockbox_number => l_cur_fi_credits.receipt_lockbox_number,
x_merchant_id => l_cur_fi_credits.merchant_id,
x_credit_card_code => l_cur_fi_credits.credit_card_code,
x_credit_card_holder_name => l_cur_fi_credits.credit_card_holder_name,
x_credit_card_number => l_cur_fi_credits.credit_card_number,
x_credit_card_expiration_date => l_cur_fi_credits.credit_card_expiration_date,
x_credit_card_approval_code => l_cur_fi_credits.credit_card_approval_code,
x_awd_yr_cal_type => l_cur_fi_credits.awd_yr_cal_type,
x_awd_yr_ci_sequence_number => l_cur_fi_credits.awd_yr_ci_sequence_number,
x_fee_cal_type => l_cur_fi_credits.fee_cal_type,
x_fee_ci_sequence_number => l_cur_fi_credits.fee_ci_sequence_number,
x_attribute_category => l_cur_fi_credits.attribute_category,
x_attribute1 => l_cur_fi_credits.attribute1,
x_attribute2 => l_cur_fi_credits.attribute2,
x_attribute3 => l_cur_fi_credits.attribute3,
x_attribute4 => l_cur_fi_credits.attribute4,
x_attribute5 => l_cur_fi_credits.attribute5,
x_attribute6 => l_cur_fi_credits.attribute6,
x_attribute7 => l_cur_fi_credits.attribute7,
x_attribute8 => l_cur_fi_credits.attribute8,
x_attribute9 => l_cur_fi_credits.attribute9,
x_attribute10 => l_cur_fi_credits.attribute10,
x_attribute11 => l_cur_fi_credits.attribute11,
x_attribute12 => l_cur_fi_credits.attribute12,
x_attribute13 => l_cur_fi_credits.attribute13,
x_attribute14 => l_cur_fi_credits.attribute14,
x_attribute15 => l_cur_fi_credits.attribute15,
x_attribute16 => l_cur_fi_credits.attribute16,
x_attribute17 => l_cur_fi_credits.attribute17,
x_attribute18 => l_cur_fi_credits.attribute18,
x_attribute19 => l_cur_fi_credits.attribute19,
x_attribute20 => l_cur_fi_credits.attribute20,
x_gl_date => l_cur_fi_credits.gl_date,
x_check_number => l_cur_fi_credits.check_number,
x_source_transaction_type => l_cur_fi_credits.source_transaction_type,
x_source_transaction_ref => l_cur_fi_credits.source_transaction_ref,
x_credit_card_payee_cd => l_cur_fi_credits.credit_card_payee_cd,
x_credit_card_status_code => l_cur_fi_credits.credit_card_status_code,
x_credit_card_tangible_cd => l_cur_fi_credits.credit_card_tangible_cd,
x_lockbox_interface_id => l_cur_fi_credits.lockbox_interface_id,
x_batch_name => l_cur_fi_credits.batch_name,
x_deposit_date => l_cur_fi_credits.deposit_date,
x_source_invoice_id => l_cur_fi_credits.source_invoice_id,
x_tax_year_code => l_cur_fi_credits.tax_year_code
);
igs_fi_cr_activities_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_activity_id => l_n_credit_activity_id,
x_credit_id => l_cur_fi_credits.credit_id,
x_status => g_forfeited ,
x_transaction_date => TRUNC(SYSDATE),
x_amount => l_cur_fi_credits.amount,
x_dr_account_cd => l_v_dr_account_cd,
x_cr_account_cd => l_v_cr_account_cd,
x_dr_gl_ccid => l_n_dr_gl_ccid,
x_cr_gl_ccid => l_n_cr_gl_ccid,
x_bill_id => NULL,
x_bill_number => NULL,
x_bill_date => NULL,
x_gl_date => TRUNC(p_d_gl_date),
x_gl_posted_date => NULL,
x_posting_id => NULL
);
SELECT 'X'
FROM igs_lookup_values
WHERE lookup_type = 'IGS_FI_REVERSAL_REASON'
AND lookup_code = cp_reversal_code
AND TRUNC(SYSDATE) BETWEEN TRUNC(NVL(start_date_active,SYSDATE)) AND TRUNC(NVL(end_date_active, SYSDATE))
AND NVL(enabled_flag,'N') = 'Y';
SELECT *
FROM igs_fi_credits
WHERE credit_id = cp_credit_id;
SELECT *
FROM igs_fi_credits
WHERE party_id = cp_party_id
AND credit_number = cp_receipt_number;
SELECT *
FROM igs_fi_cr_types
WHERE credit_type_id = cp_credit_type_id;
SELECT app.rowid a_rowid,
app.installment_application_id a_inst_app_id,
app.application_type_code a_appl_typ_cd,
app.credit_id a_cr_id,
app.credit_activity_id a_cr_acty_id,
app.applied_amt a_app_amt,
app.transaction_date a_txn_dt,
app.link_application_id a_lnk_app_id,
inst.rowid i_rowid,
inst.installment_id i_inst_id,
inst.student_plan_id i_std_pln_id,
inst.installment_line_num i_inst_ln_num,
inst.due_day i_due_day,
inst.due_month_code i_due_mnth_cd,
inst.due_year i_due_year,
inst.due_date i_due_date,
inst.installment_amt i_inst_amt,
inst.due_amt i_due_amt,
inst.penalty_flag i_pnlty_flg
FROM igs_fi_pp_ins_appls app,
igs_fi_pp_instlmnts inst,
igs_fi_pp_std_attrs std
WHERE std.plan_status_code = cp_v_plan_status_cd
AND std.student_plan_id = inst.student_plan_id
AND inst.installment_id = app.installment_id
AND app.credit_id = cp_n_credit_id;
igs_fi_credits_pkg.update_row( x_mode => 'R',
x_rowid => l_cur_fi_credits.row_id,
x_credit_id => l_cur_fi_credits.credit_id,
x_credit_number => l_cur_fi_credits.credit_number,
x_status => l_c_status, -- Set to 'REVERSED' for CASE 1,2,3. Set to 'CLEARED' for Case 4.
x_credit_source => l_cur_fi_credits.credit_source,
x_party_id => l_cur_fi_credits.party_id,
x_credit_type_id => l_cur_fi_credits.credit_type_id,
x_credit_instrument => l_cur_fi_credits.credit_instrument,
x_description => l_cur_fi_credits.description,
x_amount => l_cur_fi_credits.amount,
x_currency_cd => l_cur_fi_credits.currency_cd,
x_exchange_rate => l_cur_fi_credits.exchange_rate,
x_transaction_date => l_cur_fi_credits.transaction_date,
x_effective_date => l_cur_fi_credits.effective_date,
x_reversal_date => l_d_date,
x_reversal_reason_code => l_c_reversal_reason,
x_reversal_comments => l_c_reversal_comments,
x_unapplied_amount => l_n_unapp_amt, -- Set to '0' for CASE 1,2,3. Set to the existing value for Case 4.
x_source_transaction_id => l_cur_fi_credits.source_transaction_id,
x_receipt_lockbox_number => l_cur_fi_credits.receipt_lockbox_number,
x_merchant_id => l_cur_fi_credits.merchant_id,
x_credit_card_code => l_cur_fi_credits.credit_card_code,
x_credit_card_holder_name => l_cur_fi_credits.credit_card_holder_name,
x_credit_card_number => l_cur_fi_credits.credit_card_number,
x_credit_card_expiration_date => l_cur_fi_credits.credit_card_expiration_date,
x_credit_card_approval_code => l_cur_fi_credits.credit_card_approval_code,
x_awd_yr_cal_type => l_cur_fi_credits.awd_yr_cal_type,
x_awd_yr_ci_sequence_number => l_cur_fi_credits.awd_yr_ci_sequence_number,
x_fee_cal_type => l_cur_fi_credits.fee_cal_type,
x_fee_ci_sequence_number => l_cur_fi_credits.fee_ci_sequence_number,
x_attribute_category => l_cur_fi_credits.attribute_category,
x_attribute1 => l_cur_fi_credits.attribute1,
x_attribute2 => l_cur_fi_credits.attribute2,
x_attribute3 => l_cur_fi_credits.attribute3,
x_attribute4 => l_cur_fi_credits.attribute4,
x_attribute5 => l_cur_fi_credits.attribute5,
x_attribute6 => l_cur_fi_credits.attribute6,
x_attribute7 => l_cur_fi_credits.attribute7,
x_attribute8 => l_cur_fi_credits.attribute8,
x_attribute9 => l_cur_fi_credits.attribute9,
x_attribute10 => l_cur_fi_credits.attribute10,
x_attribute11 => l_cur_fi_credits.attribute11,
x_attribute12 => l_cur_fi_credits.attribute12,
x_attribute13 => l_cur_fi_credits.attribute13,
x_attribute14 => l_cur_fi_credits.attribute14,
x_attribute15 => l_cur_fi_credits.attribute15,
x_attribute16 => l_cur_fi_credits.attribute16,
x_attribute17 => l_cur_fi_credits.attribute17,
x_attribute18 => l_cur_fi_credits.attribute18,
x_attribute19 => l_cur_fi_credits.attribute19,
x_attribute20 => l_cur_fi_credits.attribute20,
x_gl_date => l_cur_fi_credits.gl_date,
x_check_number => l_cur_fi_credits.check_number,
x_source_transaction_type => l_cur_fi_credits.source_transaction_type,
x_source_transaction_ref => l_cur_fi_credits.source_transaction_ref,
x_credit_card_payee_cd => l_cur_fi_credits.credit_card_payee_cd,
x_credit_card_status_code => l_cur_fi_credits.credit_card_status_code,
x_credit_card_tangible_cd => l_cur_fi_credits.credit_card_tangible_cd,
x_lockbox_interface_id => l_cur_fi_credits.lockbox_interface_id,
x_batch_name => l_cur_fi_credits.batch_name,
x_deposit_date => l_cur_fi_credits.deposit_date,
x_source_invoice_id => l_cur_fi_credits.source_invoice_id,
x_tax_year_code => l_cur_fi_credits.tax_year_code
);
igs_fi_cr_activities_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_activity_id => l_n_credit_activity_id,
x_credit_id => l_cur_fi_credits.credit_id,
x_status => l_c_status, -- Set to 'REVERSED' for CASE 1,2,3. Set to 'CLEARED' for Case 4.
x_transaction_date => TRUNC(SYSDATE),
x_amount => ((-1) * l_cur_fi_credits.amount),
x_dr_account_cd => l_dr_account_cd,
x_cr_account_cd => l_cr_account_cd,
x_dr_gl_ccid => l_dr_gl_ccid,
x_cr_gl_ccid => l_cr_gl_ccid,
x_bill_id => NULL,
x_bill_number => NULL,
x_bill_date => NULL,
x_gl_date => TRUNC(p_d_gl_date),
x_gl_posted_date => NULL,
x_posting_id => NULL
);
igs_fi_prc_balances.update_balances ( p_party_id => l_cur_fi_credits.party_id,
p_balance_type => 'STANDARD',
p_balance_date => TRUNC(SYSDATE),
p_amount => ABS(NVL(l_cur_fi_credits.amount,0)), --Amount always passed as +ve
p_source => 'CREDIT',
p_source_id => p_n_credit_id,
p_message_name => l_v_message_name1
) ;
igs_fi_prc_balances.update_balances ( p_party_id => l_cur_fi_credits.party_id,
p_balance_type => 'HOLDS',
p_balance_date => TRUNC(SYSDATE),
p_amount => ABS(NVL(l_cur_fi_credits.amount,0)), --Amount always passed as +ve
p_source => 'CREDIT',
p_source_id => p_n_credit_id,
p_message_name => l_v_message_name1
) ;
igs_fi_credits_pkg.update_row (
x_mode => 'R',
x_rowid => rec_deposit.row_id,
x_credit_id => rec_deposit.credit_id,
x_credit_number => rec_deposit.credit_number ,
x_status => 'CLEARED',
x_credit_source => rec_deposit.credit_source,
x_party_id => rec_deposit.party_id,
x_credit_type_id => rec_deposit.credit_type_id,
x_credit_instrument => rec_deposit.credit_instrument,
x_description => rec_deposit.description,
x_amount => rec_deposit.amount,
x_currency_cd => rec_deposit.currency_cd,
x_exchange_rate => rec_deposit.exchange_rate,
x_transaction_date => rec_deposit.transaction_date,
x_effective_date => rec_deposit.effective_date,
x_reversal_date => rec_deposit.reversal_date,
x_reversal_reason_code => rec_deposit.reversal_reason_code,
x_reversal_comments => rec_deposit.reversal_comments,
x_unapplied_amount => rec_deposit.unapplied_amount,
x_source_transaction_id => rec_deposit.source_transaction_id,
x_receipt_lockbox_number => rec_deposit.receipt_lockbox_number,
x_merchant_id => rec_deposit.merchant_id,
x_credit_card_code => rec_deposit.credit_card_code,
x_credit_card_holder_name => rec_deposit.credit_card_holder_name,
x_credit_card_number => rec_deposit.credit_card_number,
x_credit_card_expiration_date => rec_deposit.credit_card_expiration_date,
x_credit_card_approval_code => rec_deposit.credit_card_approval_code,
x_awd_yr_cal_type => rec_deposit.awd_yr_cal_type,
x_awd_yr_ci_sequence_number => rec_deposit.awd_yr_ci_sequence_number,
x_fee_cal_type => rec_deposit.fee_cal_type,
x_fee_ci_sequence_number => rec_deposit.fee_ci_sequence_number,
x_attribute_category => rec_deposit.attribute_category,
x_attribute1 => rec_deposit.attribute1,
x_attribute2 => rec_deposit.attribute2,
x_attribute3 => rec_deposit.attribute3,
x_attribute4 => rec_deposit.attribute4,
x_attribute5 => rec_deposit.attribute5,
x_attribute6 => rec_deposit.attribute6,
x_attribute7 => rec_deposit.attribute7,
x_attribute8 => rec_deposit.attribute8,
x_attribute9 => rec_deposit.attribute9,
x_attribute10 => rec_deposit.attribute10,
x_attribute11 => rec_deposit.attribute11,
x_attribute12 => rec_deposit.attribute12,
x_attribute13 => rec_deposit.attribute13,
x_attribute14 => rec_deposit.attribute14,
x_attribute15 => rec_deposit.attribute15,
x_attribute16 => rec_deposit.attribute16,
x_attribute17 => rec_deposit.attribute17,
x_attribute18 => rec_deposit.attribute18,
x_attribute19 => rec_deposit.attribute19,
x_attribute20 => rec_deposit.attribute20,
x_gl_date => rec_deposit.gl_date,
x_check_number => rec_deposit.check_number,
x_source_transaction_type => rec_deposit.source_transaction_type,
x_source_transaction_ref => rec_deposit.source_transaction_ref,
x_credit_card_payee_cd => rec_deposit.credit_card_payee_cd,
x_credit_card_status_code => rec_deposit.credit_card_status_code,
x_credit_card_tangible_cd => rec_deposit.credit_card_tangible_cd,
x_lockbox_interface_id => rec_deposit.lockbox_interface_id,
x_batch_name => rec_deposit.batch_name,
x_deposit_date => rec_deposit.deposit_date,
x_source_invoice_id => rec_deposit.source_invoice_id,
x_tax_year_code => rec_deposit.tax_year_code
);
igs_fi_cr_activities_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_activity_id => l_n_credit_activity_id,
x_credit_id => rec_deposit.credit_id,
x_status => 'CLEARED',
x_transaction_date => TRUNC(SYSDATE),
x_amount => rec_deposit.amount,
x_dr_account_cd => NULL,
x_cr_account_cd => NULL,
x_dr_gl_ccid => NULL,
x_cr_gl_ccid => NULL,
x_bill_id => NULL,
x_bill_number => NULL,
x_bill_date => NULL,
x_gl_date => NULL,
x_gl_posted_date => NULL,
x_posting_id => NULL
);
igs_fi_pp_instlmnts_pkg.update_row(
x_rowid => rec_cur_insts.i_rowid,
x_installment_id => rec_cur_insts.i_inst_id,
x_student_plan_id => rec_cur_insts.i_std_pln_id,
x_installment_line_num => rec_cur_insts.i_inst_ln_num,
x_due_day => rec_cur_insts.i_due_day,
x_due_month_code => rec_cur_insts.i_due_mnth_cd,
x_due_year => rec_cur_insts.i_due_year,
x_due_date => rec_cur_insts.i_due_date,
x_installment_amt => rec_cur_insts.i_inst_amt,
x_due_amt => l_n_due_amt,
x_penalty_flag => rec_cur_insts.i_pnlty_flg,
x_mode => 'R'
);
igs_fi_pp_ins_appls_pkg.insert_row(
x_rowid => l_rowid,
x_installment_application_id => l_n_inst_appl_id,
x_application_type_code => 'UNAPP',
x_installment_id => rec_cur_insts.i_inst_id,
x_credit_id => p_n_credit_id,
x_credit_activity_id => l_n_credit_activity_id,
x_applied_amt => -1 * rec_cur_insts.a_app_amt,
x_transaction_date => TRUNC(SYSDATE),
x_link_application_id => rec_cur_insts.a_inst_app_id,
x_mode => 'R'
);
SELECT cre.rowid,cre.*
FROM igs_fi_credits cre
WHERE credit_id = cp_credit_id
AND status = g_cleared;
SELECT cr_account_cd, cr_gl_ccid
FROM igs_fi_cr_types
WHERE credit_type_id = cp_credit_type_id;
igs_fi_credits_pkg.update_row ( x_mode => 'R',
x_rowid => l_cur_fi_credits.rowid,
x_credit_id => l_cur_fi_credits.credit_id,
x_credit_number => l_cur_fi_credits.credit_number ,
x_status => g_transferred,
x_credit_source => l_cur_fi_credits.credit_source,
x_party_id => l_cur_fi_credits.party_id,
x_credit_type_id => l_cur_fi_credits.credit_type_id,
x_credit_instrument => l_cur_fi_credits.credit_instrument,
x_description => l_cur_fi_credits.description,
x_amount => l_cur_fi_credits.amount,
x_currency_cd => l_cur_fi_credits.currency_cd,
x_exchange_rate => l_cur_fi_credits.exchange_rate,
x_transaction_date => l_cur_fi_credits.transaction_date,
x_effective_date => l_cur_fi_credits.effective_date,
x_reversal_date => l_cur_fi_credits.reversal_date,
x_reversal_reason_code => l_cur_fi_credits.reversal_reason_code,
x_reversal_comments => l_cur_fi_credits.reversal_comments,
x_unapplied_amount => l_cur_fi_credits.unapplied_amount,
x_source_transaction_id => l_cur_fi_credits.source_transaction_id,
x_receipt_lockbox_number => l_cur_fi_credits.receipt_lockbox_number,
x_merchant_id => l_cur_fi_credits.merchant_id,
x_credit_card_code => l_cur_fi_credits.credit_card_code,
x_credit_card_holder_name => l_cur_fi_credits.credit_card_holder_name,
x_credit_card_number => l_cur_fi_credits.credit_card_number,
x_credit_card_expiration_date => l_cur_fi_credits.credit_card_expiration_date,
x_credit_card_approval_code => l_cur_fi_credits.credit_card_approval_code,
x_awd_yr_cal_type => l_cur_fi_credits.awd_yr_cal_type,
x_awd_yr_ci_sequence_number => l_cur_fi_credits.awd_yr_ci_sequence_number,
x_fee_cal_type => l_cur_fi_credits.fee_cal_type,
x_fee_ci_sequence_number => l_cur_fi_credits.fee_ci_sequence_number,
x_attribute_category => l_cur_fi_credits.attribute_category,
x_attribute1 => l_cur_fi_credits.attribute1,
x_attribute2 => l_cur_fi_credits.attribute2,
x_attribute3 => l_cur_fi_credits.attribute3,
x_attribute4 => l_cur_fi_credits.attribute4,
x_attribute5 => l_cur_fi_credits.attribute5,
x_attribute6 => l_cur_fi_credits.attribute6,
x_attribute7 => l_cur_fi_credits.attribute7,
x_attribute8 => l_cur_fi_credits.attribute8,
x_attribute9 => l_cur_fi_credits.attribute9,
x_attribute10 => l_cur_fi_credits.attribute10,
x_attribute11 => l_cur_fi_credits.attribute11,
x_attribute12 => l_cur_fi_credits.attribute12,
x_attribute13 => l_cur_fi_credits.attribute13,
x_attribute14 => l_cur_fi_credits.attribute14,
x_attribute15 => l_cur_fi_credits.attribute15,
x_attribute16 => l_cur_fi_credits.attribute16,
x_attribute17 => l_cur_fi_credits.attribute17,
x_attribute18 => l_cur_fi_credits.attribute18,
x_attribute19 => l_cur_fi_credits.attribute19,
x_attribute20 => l_cur_fi_credits.attribute20,
x_gl_date => l_cur_fi_credits.gl_date,
x_check_number => l_cur_fi_credits.check_number,
x_source_transaction_type => l_cur_fi_credits.source_transaction_type,
x_source_transaction_ref => l_cur_fi_credits.source_transaction_ref,
x_credit_card_payee_cd => l_cur_fi_credits.credit_card_payee_cd,
x_credit_card_status_code => l_cur_fi_credits.credit_card_status_code,
x_credit_card_tangible_cd => l_cur_fi_credits.credit_card_tangible_cd,
x_lockbox_interface_id => l_cur_fi_credits.lockbox_interface_id,
x_batch_name => l_cur_fi_credits.batch_name,
x_deposit_date => l_cur_fi_credits.deposit_date,
x_source_invoice_id => l_cur_fi_credits.source_invoice_id,
x_tax_year_code => l_cur_fi_credits.tax_year_code
);
igs_fi_cr_activities_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_activity_id => l_n_credit_activity_id,
x_credit_id => l_cur_fi_credits.credit_id,
x_status => g_transferred,
x_transaction_date => TRUNC(SYSDATE),
x_amount => l_cur_fi_credits.amount,
x_dr_account_cd => NULL,
x_cr_account_cd => NULL,
x_dr_gl_ccid => NULL,
x_cr_gl_ccid => NULL,
x_bill_id => NULL,
x_bill_number => NULL,
x_bill_date => NULL,
x_gl_date => NULL,
x_gl_posted_date => NULL,
x_posting_id => NULL
);
igs_fi_credits_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_id => l_n_credit_id,
x_credit_number => l_v_credit_number ,
x_status => g_cleared,
x_credit_source => NULL,
x_party_id => l_cur_fi_credits.party_id,
x_credit_type_id => l_n_pay_credit_type_id,
x_credit_instrument => g_deposit,
x_description => l_cur_fi_credits.description,
x_amount => l_cur_fi_credits.amount,
x_currency_cd => l_cur_fi_credits.currency_cd,
x_exchange_rate => l_cur_fi_credits.exchange_rate,
x_transaction_date => TRUNC(SYSDATE),
x_effective_date => TRUNC(SYSDATE),
x_reversal_date => NULL,
x_reversal_reason_code => NULL,
x_reversal_comments => NULL,
x_unapplied_amount => l_cur_fi_credits.unapplied_amount,
x_source_transaction_id => NULL,
x_receipt_lockbox_number => NULL,
x_merchant_id => NULL,
x_credit_card_code => NULL,
x_credit_card_holder_name => NULL,
x_credit_card_number => NULL,
x_credit_card_expiration_date => NULL,
x_credit_card_approval_code => NULL,
x_awd_yr_cal_type => NULL,
x_awd_yr_ci_sequence_number => NULL,
x_fee_cal_type => l_cur_fi_credits.fee_cal_type,
x_fee_ci_sequence_number => l_cur_fi_credits.fee_ci_sequence_number,
x_attribute_category => l_cur_fi_credits.attribute_category,
x_attribute1 => l_cur_fi_credits.attribute1,
x_attribute2 => l_cur_fi_credits.attribute2,
x_attribute3 => l_cur_fi_credits.attribute3,
x_attribute4 => l_cur_fi_credits.attribute4,
x_attribute5 => l_cur_fi_credits.attribute5,
x_attribute6 => l_cur_fi_credits.attribute6,
x_attribute7 => l_cur_fi_credits.attribute7,
x_attribute8 => l_cur_fi_credits.attribute8,
x_attribute9 => l_cur_fi_credits.attribute9,
x_attribute10 => l_cur_fi_credits.attribute10,
x_attribute11 => l_cur_fi_credits.attribute11,
x_attribute12 => l_cur_fi_credits.attribute12,
x_attribute13 => l_cur_fi_credits.attribute13,
x_attribute14 => l_cur_fi_credits.attribute14,
x_attribute15 => l_cur_fi_credits.attribute15,
x_attribute16 => l_cur_fi_credits.attribute16,
x_attribute17 => l_cur_fi_credits.attribute17,
x_attribute18 => l_cur_fi_credits.attribute18,
x_attribute19 => l_cur_fi_credits.attribute19,
x_attribute20 => l_cur_fi_credits.attribute20,
x_gl_date => p_d_gl_date,
x_check_number => NULL,
x_source_transaction_type => g_deposit,
x_source_transaction_ref => l_cur_fi_credits.credit_number,
x_credit_card_payee_cd => l_cur_fi_credits.credit_card_payee_cd,
x_credit_card_status_code => l_cur_fi_credits.credit_card_status_code,
x_credit_card_tangible_cd => l_cur_fi_credits.credit_card_tangible_cd,
x_lockbox_interface_id => l_cur_fi_credits.lockbox_interface_id,
x_batch_name => l_cur_fi_credits.batch_name,
x_deposit_date => l_cur_fi_credits.deposit_date,
x_source_invoice_id => l_cur_fi_credits.source_invoice_id,
x_tax_year_code => NULL
);
igs_fi_cr_activities_pkg.insert_row ( x_mode => 'R',
x_rowid => l_rowid,
x_credit_activity_id => l_n_credit_activity_id,
x_credit_id => l_n_credit_id,
x_status => g_cleared,
x_transaction_date => TRUNC(SYSDATE),
x_amount => l_cur_fi_credits.amount,
x_dr_account_cd => l_v_dr_account_cd,
x_cr_account_cd => l_v_cr_account_cd,
x_dr_gl_ccid => l_n_dr_gl_ccid,
x_cr_gl_ccid => l_n_cr_gl_ccid,
x_bill_id => NULL,
x_bill_number => NULL,
x_bill_date => NULL,
x_gl_date => p_d_gl_date,
x_gl_posted_date => NULL,
x_posting_id => NULL
);
igs_fi_prc_balances.update_balances ( p_party_id => l_cur_fi_credits.party_id,
p_balance_type => 'STANDARD',
p_balance_date => TRUNC(SYSDATE),
p_amount => NVL((-1)*l_cur_fi_credits.amount,0), --Amount always passed as -ve
p_source => 'CREDIT',
p_source_id => l_n_credit_id,
p_message_name => l_v_message_name
) ;
igs_fi_prc_balances.update_balances ( p_party_id => l_cur_fi_credits.party_id,
p_balance_type => 'HOLDS',
p_balance_date => TRUNC(SYSDATE),
p_amount => NVL((-1)*l_cur_fi_credits.amount,0), --Amount always passed as +ve
p_source => 'CREDIT',
p_source_id => l_n_credit_id,
p_message_name => l_v_message_name
) ;