673: END IF;
674: ELSIF p_order_number IS NULL
675: AND p_plan_id IS NOT NULL THEN
676: -- Insert a record into IGS_AS_DOC_FEE_PMNT table to note that the student has subscribed to the plan.
677: igs_as_doc_fee_pmnt_pkg.insert_row (
678: x_rowid => lv_rowid,
679: x_person_id => p_person_id,
680: x_fee_paid_date => SYSDATE,
681: x_fee_amount => p_fee_amt,
771: CLOSE cur_doc_fee_upd;
772: IF fee_rec.person_id IS NULL THEN
773: lvrow_id := NULL;
774: -- No record exists hence insert a record.
775: igs_as_doc_fee_pmnt_pkg.insert_row (
776: x_rowid => lvrow_id,
777: x_person_id => p_person_id,
778: x_fee_paid_date => SYSDATE,
779: x_fee_amount => 0,
794: x_msg_count => l_msg_count
795: );
796: ELSE
797: -- Record is already existing hence update the row..
798: igs_as_doc_fee_pmnt_pkg.update_row (
799: x_rowid => fee_rec.row_id,
800: x_person_id => fee_rec.person_id,
801: x_fee_paid_date => fee_rec.fee_paid_date,
802: x_fee_amount => fee_rec.fee_amount,
823: CLOSE cur_doc_fee_upd_non_free;
824: IF non_free_fee_rec.person_id IS NULL THEN
825: -- No record exists hence insert a record.
826: lvrow_id := NULL;
827: igs_as_doc_fee_pmnt_pkg.insert_row (
828: x_rowid => lvrow_id,
829: x_person_id => p_person_id,
830: x_fee_paid_date => SYSDATE,
831: x_fee_amount => 0,
846: x_msg_count => l_msg_count
847: );
848: ELSE
849: -- Record is already existing hence update the row..
850: igs_as_doc_fee_pmnt_pkg.update_row (
851: x_rowid => non_free_fee_rec.row_id,
852: x_person_id => non_free_fee_rec.person_id,
853: x_fee_paid_date => non_free_fee_rec.fee_paid_date,
854: x_fee_amount => non_free_fee_rec.fee_amount,
880: ELSE
881: lnumcopies := fee_rec.num_of_copies - p_num_copies;
882: END IF;
883: IF fee_rec.person_id IS NOT NULL THEN
884: igs_as_doc_fee_pmnt_pkg.update_row (
885: x_rowid => fee_rec.row_id,
886: x_person_id => fee_rec.person_id,
887: x_fee_paid_date => fee_rec.fee_paid_date,
888: x_fee_amount => fee_rec.fee_amount,
912: ELSE
913: lnumcopies := non_free_fee_rec.num_of_copies - p_num_copies;
914: END IF;
915: IF non_free_fee_rec.person_id IS NOT NULL THEN
916: igs_as_doc_fee_pmnt_pkg.update_row (
917: x_rowid => non_free_fee_rec.row_id,
918: x_person_id => non_free_fee_rec.person_id,
919: x_fee_paid_date => non_free_fee_rec.fee_paid_date,
920: x_fee_amount => non_free_fee_rec.fee_amount,