[Home] [Help]
731: | User defined :common to the package: -30001 to -30009 |
732: | user defined: Procedure specific : -30030 to -30039 |
733: +========================================================================*/
734:
735: PROCEDURE copy_charge( p_old_charge_id IN OP_CHRG_MST.CHARGE_ID%TYPE ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
732: | user defined: Procedure specific : -30030 to -30039 |
733: +========================================================================*/
734:
735: PROCEDURE copy_charge( p_old_charge_id IN OP_CHRG_MST.CHARGE_ID%TYPE ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
733: +========================================================================*/
734:
735: PROCEDURE copy_charge( p_old_charge_id IN OP_CHRG_MST.CHARGE_ID%TYPE ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
741: p_currency_code IN OP_CHRG_MST.CURRENCY_CODE%TYPE ,
734:
735: PROCEDURE copy_charge( p_old_charge_id IN OP_CHRG_MST.CHARGE_ID%TYPE ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
741: p_currency_code IN OP_CHRG_MST.CURRENCY_CODE%TYPE ,
742: p_price_change_type IN NUMBER ,
735: PROCEDURE copy_charge( p_old_charge_id IN OP_CHRG_MST.CHARGE_ID%TYPE ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
741: p_currency_code IN OP_CHRG_MST.CURRENCY_CODE%TYPE ,
742: p_price_change_type IN NUMBER ,
743: p_price_change IN NUMBER ,
736: p_charge_code IN OP_CHRG_MST.CHARGE_CODE%TYPE ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
741: p_currency_code IN OP_CHRG_MST.CURRENCY_CODE%TYPE ,
742: p_price_change_type IN NUMBER ,
743: p_price_change IN NUMBER ,
744: p_decimal IN NUMBER ,
737: p_charge_desc IN OP_CHRG_MST.CHARGE_DESC%TYPE ,
738: p_charge_type IN OP_CHRG_MST.CHARGE_TYPE%TYPE ,
739: p_chgtax_class IN OP_CHRG_MST.CHGTAX_CLASS%TYPE ,
740: p_billable_ind IN OP_CHRG_MST.BILLABLE_IND%TYPE ,
741: p_currency_code IN OP_CHRG_MST.CURRENCY_CODE%TYPE ,
742: p_price_change_type IN NUMBER ,
743: p_price_change IN NUMBER ,
744: p_decimal IN NUMBER ,
745: p_copy_text IN VARCHAR2 ,
742: p_price_change_type IN NUMBER ,
743: p_price_change IN NUMBER ,
744: p_decimal IN NUMBER ,
745: p_copy_text IN VARCHAR2 ,
746: p_user_id IN OP_CHRG_MST.CREATED_BY%TYPE ,
747: p_err_num OUT NOCOPY NUMBER ,
748: p_err_msg OUT NOCOPY VARCHAR2
749: ) IS
750: /* Cursors */
749: ) IS
750: /* Cursors */
751: CURSOR Cur_chrg_mst IS
752: SELECT *
753: FROM op_chrg_mst
754: WHERE charge_id = p_old_charge_id;
755:
756: CURSOR Cur_chrg_brk ( V_old_charge_id OP_CHRG_BRK.CHARGE_ID%TYPE) IS
757: SELECT *
761: /* Composites */
762: V_chrg_mst Cur_chrg_mst%ROWTYPE ;
763:
764: /* Scalars */
765: X_charge_id OP_CHRG_MST.CHARGE_ID%TYPE;
766: X_base_rate OP_CHRG_MST.BASE_RATE%TYPE;
767: X_base_amount OP_CHRG_MST.BASE_AMOUNT%TYPE;
768: X_base_per_unit OP_CHRG_MST.BASE_PER_UNIT%TYPE;
769: X_chrgbreak_id OP_CHRG_BRK.CHRGBREAK_ID%TYPE;
762: V_chrg_mst Cur_chrg_mst%ROWTYPE ;
763:
764: /* Scalars */
765: X_charge_id OP_CHRG_MST.CHARGE_ID%TYPE;
766: X_base_rate OP_CHRG_MST.BASE_RATE%TYPE;
767: X_base_amount OP_CHRG_MST.BASE_AMOUNT%TYPE;
768: X_base_per_unit OP_CHRG_MST.BASE_PER_UNIT%TYPE;
769: X_chrgbreak_id OP_CHRG_BRK.CHRGBREAK_ID%TYPE;
770: X_chrg_mst_text_code OP_CHRG_MST.TEXT_CODE%TYPE ;
763:
764: /* Scalars */
765: X_charge_id OP_CHRG_MST.CHARGE_ID%TYPE;
766: X_base_rate OP_CHRG_MST.BASE_RATE%TYPE;
767: X_base_amount OP_CHRG_MST.BASE_AMOUNT%TYPE;
768: X_base_per_unit OP_CHRG_MST.BASE_PER_UNIT%TYPE;
769: X_chrgbreak_id OP_CHRG_BRK.CHRGBREAK_ID%TYPE;
770: X_chrg_mst_text_code OP_CHRG_MST.TEXT_CODE%TYPE ;
771: X_breakpoint_price OP_CHRG_BRK.BREAKPOINT_PRICE%TYPE;
764: /* Scalars */
765: X_charge_id OP_CHRG_MST.CHARGE_ID%TYPE;
766: X_base_rate OP_CHRG_MST.BASE_RATE%TYPE;
767: X_base_amount OP_CHRG_MST.BASE_AMOUNT%TYPE;
768: X_base_per_unit OP_CHRG_MST.BASE_PER_UNIT%TYPE;
769: X_chrgbreak_id OP_CHRG_BRK.CHRGBREAK_ID%TYPE;
770: X_chrg_mst_text_code OP_CHRG_MST.TEXT_CODE%TYPE ;
771: X_breakpoint_price OP_CHRG_BRK.BREAKPOINT_PRICE%TYPE;
772:
766: X_base_rate OP_CHRG_MST.BASE_RATE%TYPE;
767: X_base_amount OP_CHRG_MST.BASE_AMOUNT%TYPE;
768: X_base_per_unit OP_CHRG_MST.BASE_PER_UNIT%TYPE;
769: X_chrgbreak_id OP_CHRG_BRK.CHRGBREAK_ID%TYPE;
770: X_chrg_mst_text_code OP_CHRG_MST.TEXT_CODE%TYPE ;
771: X_breakpoint_price OP_CHRG_BRK.BREAKPOINT_PRICE%TYPE;
772:
773: /* Variable that decides if sign of the charge amounts/rates needs to be changed because of */
774: /* change in type of charge. */
885: X_base_per_unit := X_base_per_unit * (-1);
886: END IF;
887: END IF;
888:
889: /* Now write the OP_CHRG_MST record to the table. */
890: /* When creating a new record, if the following parameters are passed in as NULLs, replace them with */
891: /* the corresponding values form the old charge: */
892: /* Charge_desc, Charge_type, currency_code, chgtax_class, billable_ind. */
893: INSERT INTO OP_CHRG_MST
889: /* Now write the OP_CHRG_MST record to the table. */
890: /* When creating a new record, if the following parameters are passed in as NULLs, replace them with */
891: /* the corresponding values form the old charge: */
892: /* Charge_desc, Charge_type, currency_code, chgtax_class, billable_ind. */
893: INSERT INTO OP_CHRG_MST
894: ( charge_id , charge_code ,
895: charge_desc ,
896: charge_type ,
897: currency_code ,
1077:
1078: /* Charge type */
1079: CURSOR Cur_linecharge_ind IS
1080: SELECT linecharge_ind
1081: FROM op_chrg_mst
1082: WHERE charge_id = p_list_id ;
1083:
1084: /* Composites */
1085: V_prce_eff Cur_prce_eff%ROWTYPE ;
1106:
1107: /* Scalars */
1108: X_priceff_id OP_PRCE_EFF.PRICEFF_ID%TYPE ;
1109: X_prce_eff_text_code OP_PRCE_EFF.TEXT_CODE%TYPE ;
1110: X_linecharge_ind OP_CHRG_MST.LINECHARGE_IND%TYPE ;
1111: X_check_dup_eff NUMBER DEFAULT 0 ;
1112:
1113: /* Exceptions */
1114: e_charge_type_mismatch EXCEPTION ;
1280:
1281: PROCEDURE copy_charge_asc ( p_old_chargeitem_id IN OP_CHRG_ITM.CHARGEITEM_ID%TYPE ,
1282: p_charge_id IN OP_CHRG_ITM.CHARGE_ID%TYPE ,
1283: p_copy_text IN VARCHAR2 ,
1284: p_user_id IN OP_CHRG_MST.CREATED_BY%TYPE ,
1285: p_err_num OUT NOCOPY NUMBER ,
1286: p_err_msg OUT NOCOPY VARCHAR2
1287: ) IS
1288: /* Cursors */
1294:
1295: /* Charge type */
1296: CURSOR Cur_linecharge_ind IS
1297: SELECT linecharge_ind
1298: FROM op_chrg_mst
1299: WHERE charge_id = p_charge_id ;
1300:
1301: /* Composites */
1302: V_chrg_itm Cur_chrg_itm%ROWTYPE ;
1303:
1304: /* Scalars */
1305: X_chargeitem_id OP_CHRG_ITM.CHARGEITEM_ID%TYPE;
1306: X_chrg_itm_text_code OP_CHRG_ITM.TEXT_CODE%TYPE ;
1307: X_linecharge_ind OP_CHRG_MST.LINECHARGE_IND%TYPE ;
1308:
1309: /* Exceptions */
1310: e_charge_type_mismatch EXCEPTION ;
1311: