2781: l_site_use_id NUMBER;
2782: l_cust_acct_site_id NUMBER;
2783: l_class_status HZ_CUST_PROFILE_CLASSES.status%TYPE;
2784: l_profile_class_name HZ_CUST_PROFILE_CLASSES.name%TYPE;
2785: l_created_by_module HZ_CUSTOMER_PROFILES.created_by_module%TYPE;
2786: l_application_id NUMBER;
2787: l_credit_rating HZ_CUSTOMER_PROFILES.credit_rating%TYPE;
2788: l_risk_code HZ_CUSTOMER_PROFILES.risk_code%TYPE;
2789: l_status HZ_CUSTOMER_PROFILES.status%TYPE;
2783: l_class_status HZ_CUST_PROFILE_CLASSES.status%TYPE;
2784: l_profile_class_name HZ_CUST_PROFILE_CLASSES.name%TYPE;
2785: l_created_by_module HZ_CUSTOMER_PROFILES.created_by_module%TYPE;
2786: l_application_id NUMBER;
2787: l_credit_rating HZ_CUSTOMER_PROFILES.credit_rating%TYPE;
2788: l_risk_code HZ_CUSTOMER_PROFILES.risk_code%TYPE;
2789: l_status HZ_CUSTOMER_PROFILES.status%TYPE;
2790: l_profile_class_rec HZ_CUST_PROFILE_CLASSES%ROWTYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2784: l_profile_class_name HZ_CUST_PROFILE_CLASSES.name%TYPE;
2785: l_created_by_module HZ_CUSTOMER_PROFILES.created_by_module%TYPE;
2786: l_application_id NUMBER;
2787: l_credit_rating HZ_CUSTOMER_PROFILES.credit_rating%TYPE;
2788: l_risk_code HZ_CUSTOMER_PROFILES.risk_code%TYPE;
2789: l_status HZ_CUSTOMER_PROFILES.status%TYPE;
2790: l_profile_class_rec HZ_CUST_PROFILE_CLASSES%ROWTYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2792: := p_customer_profile_rec;
2785: l_created_by_module HZ_CUSTOMER_PROFILES.created_by_module%TYPE;
2786: l_application_id NUMBER;
2787: l_credit_rating HZ_CUSTOMER_PROFILES.credit_rating%TYPE;
2788: l_risk_code HZ_CUSTOMER_PROFILES.risk_code%TYPE;
2789: l_status HZ_CUSTOMER_PROFILES.status%TYPE;
2790: l_profile_class_rec HZ_CUST_PROFILE_CLASSES%ROWTYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2792: := p_customer_profile_rec;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2789: l_status HZ_CUSTOMER_PROFILES.status%TYPE;
2790: l_profile_class_rec HZ_CUST_PROFILE_CLASSES%ROWTYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2792: := p_customer_profile_rec;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2790: l_profile_class_rec HZ_CUST_PROFILE_CLASSES%ROWTYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2792: := p_customer_profile_rec;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2791: v_customer_profile_rec HZ_CUSTOMER_PROFILE_V2PUB.CUSTOMER_PROFILE_REC_TYPE
2792: := p_customer_profile_rec;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2792: := p_customer_profile_rec;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2793: l_discount_terms HZ_CUSTOMER_PROFILES.discount_terms%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2794: l_discount_grace_days HZ_CUSTOMER_PROFILES.discount_grace_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2795: l_dunning_letters HZ_CUSTOMER_PROFILES.dunning_letters%TYPE;
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2796: l_dunning_letter_set_id HZ_CUSTOMER_PROFILES.dunning_letter_set_id%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2797: l_send_statements HZ_CUSTOMER_PROFILES.send_statements%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2798: l_statement_cycle_id HZ_CUSTOMER_PROFILES.statement_cycle_id%TYPE;
2799: l_credit_balance_statements HZ_CUSTOMER_PROFILES.credit_balance_statements%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2800: l_interest_charges HZ_CUSTOMER_PROFILES.interest_charges%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2801: l_finance_charge_flag HZ_CUSTOMER_PROFILES.charge_on_finance_charge_flag%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2802: l_interest_period_days HZ_CUSTOMER_PROFILES.interest_period_days%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2803:
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2804: l_account_status HZ_CUSTOMER_PROFILES.ACCOUNT_STATUS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2805: l_tolerance HZ_CUSTOMER_PROFILES.TOLERANCE%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2806: l_percent_collectable HZ_CUSTOMER_PROFILES.PERCENT_COLLECTABLE%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2807: l_standard_terms HZ_CUSTOMER_PROFILES.STANDARD_TERMS%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2808: l_override_terms HZ_CUSTOMER_PROFILES.OVERRIDE_TERMS%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2809: l_lockbox_matching_option HZ_CUSTOMER_PROFILES.LOCKBOX_MATCHING_OPTION%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2810: l_autocash_hierarchy_id HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2811: l_autocash_hierarchy_id_for_ad HZ_CUSTOMER_PROFILES.AUTOCASH_HIERARCHY_ID_FOR_ADR%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2812: l_clearing_days HZ_CUSTOMER_PROFILES.CLEARING_DAYS%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2820: l_credit_classification HZ_CUSTOMER_PROFILES.CREDIT_CLASSIFICATION%TYPE;
2813: l_payment_grace_days HZ_CUSTOMER_PROFILES.PAYMENT_GRACE_DAYS%TYPE;
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2820: l_credit_classification HZ_CUSTOMER_PROFILES.CREDIT_CLASSIFICATION%TYPE;
2821:
2814: l_grouping_rule_id HZ_CUSTOMER_PROFILES.GROUPING_RULE_ID%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2820: l_credit_classification HZ_CUSTOMER_PROFILES.CREDIT_CLASSIFICATION%TYPE;
2821:
2822: l_cust_acct_site_use_code HZ_CUST_SITE_USES.SITE_USE_CODE%TYPE;
2815: l_tax_printing_option HZ_CUSTOMER_PROFILES.TAX_PRINTING_OPTION%TYPE;
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2820: l_credit_classification HZ_CUSTOMER_PROFILES.CREDIT_CLASSIFICATION%TYPE;
2821:
2822: l_cust_acct_site_use_code HZ_CUST_SITE_USES.SITE_USE_CODE%TYPE;
2823: l_return_status VARCHAR2(1);
2816: l_review_cycle HZ_CUSTOMER_PROFILES.REVIEW_CYCLE%TYPE;
2817: l_last_credit_review_date HZ_CUSTOMER_PROFILES.LAST_CREDIT_REVIEW_DATE%TYPE;
2818: l_next_credit_review_date HZ_CUSTOMER_PROFILES.NEXT_CREDIT_REVIEW_DATE%TYPE;
2819: l_party_id HZ_CUSTOMER_PROFILES.PARTY_ID%TYPE;
2820: l_credit_classification HZ_CUSTOMER_PROFILES.CREDIT_CLASSIFICATION%TYPE;
2821:
2822: l_cust_acct_site_use_code HZ_CUST_SITE_USES.SITE_USE_CODE%TYPE;
2823: l_return_status VARCHAR2(1);
2824: l_org_id HZ_CUST_ACCT_SITES_ALL.org_id%TYPE;
2826: l_ckeck_acc_bfb_enabled VARCHAR2(1);
2827: ll_cons_inv_flag VARCHAR2(1);
2828:
2829: -- Added following variables for late charge policy project.
2830: l_late_charge_calculation_trx HZ_CUSTOMER_PROFILES.LATE_CHARGE_CALCULATION_TRX%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2827: ll_cons_inv_flag VARCHAR2(1);
2828:
2829: -- Added following variables for late charge policy project.
2830: l_late_charge_calculation_trx HZ_CUSTOMER_PROFILES.LATE_CHARGE_CALCULATION_TRX%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2828:
2829: -- Added following variables for late charge policy project.
2830: l_late_charge_calculation_trx HZ_CUSTOMER_PROFILES.LATE_CHARGE_CALCULATION_TRX%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2829: -- Added following variables for late charge policy project.
2830: l_late_charge_calculation_trx HZ_CUSTOMER_PROFILES.LATE_CHARGE_CALCULATION_TRX%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2830: l_late_charge_calculation_trx HZ_CUSTOMER_PROFILES.LATE_CHARGE_CALCULATION_TRX%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2831: l_credit_items_flag HZ_CUSTOMER_PROFILES.CREDIT_ITEMS_FLAG%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2832: l_disputed_transactions_flag HZ_CUSTOMER_PROFILES.DISPUTED_TRANSACTIONS_FLAG%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2840: l_automatch_set_id HZ_CUSTOMER_PROFILES.AUTOMATCH_SET_ID%TYPE;
2833: l_late_charge_type HZ_CUSTOMER_PROFILES.LATE_CHARGE_TYPE%TYPE;
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2840: l_automatch_set_id HZ_CUSTOMER_PROFILES.AUTOMATCH_SET_ID%TYPE;
2841:
2834: l_late_charge_term_id HZ_CUSTOMER_PROFILES.LATE_CHARGE_TERM_ID%TYPE;
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2840: l_automatch_set_id HZ_CUSTOMER_PROFILES.AUTOMATCH_SET_ID%TYPE;
2841:
2842: BEGIN
2835: l_interest_calculation_period HZ_CUSTOMER_PROFILES.INTEREST_CALCULATION_PERIOD%TYPE;
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2840: l_automatch_set_id HZ_CUSTOMER_PROFILES.AUTOMATCH_SET_ID%TYPE;
2841:
2842: BEGIN
2843:
2836: l_hold_charged_invoices_flag HZ_CUSTOMER_PROFILES.HOLD_CHARGED_INVOICES_FLAG%TYPE;
2837: l_message_Text_id HZ_CUSTOMER_PROFILES.MESSAGE_TEXT_ID%TYPE;
2838: l_multiple_Interest_Rates_flag HZ_CUSTOMER_PROFILES.MULTIPLE_INTEREST_RATES_FLAG%TYPE;
2839: l_charge_begin_date HZ_CUSTOMER_PROFILES.CHARGE_BEGIN_DATE%TYPE;
2840: l_automatch_set_id HZ_CUSTOMER_PROFILES.AUTOMATCH_SET_ID%TYPE;
2841:
2842: BEGIN
2843:
2844: -- Check if API is called in debug mode. If yes, enable debug.
2884: l_credit_classification, l_late_charge_calculation_trx, l_credit_items_flag,
2885: l_disputed_transactions_flag, l_late_charge_type, l_late_charge_term_id,
2886: l_interest_calculation_period, l_hold_charged_invoices_flag, l_message_text_id,
2887: l_multiple_interest_rates_flag, l_charge_begin_date,l_automatch_set_id
2888: FROM HZ_CUSTOMER_PROFILES
2889: WHERE ROWID = p_rowid;
2890: END IF;
2891:
2892: --------------------------------------
2904: p_customer_profile_rec.cust_account_profile_id <> FND_API.G_MISS_NUM
2905: THEN
2906: BEGIN
2907: SELECT 'Y' INTO l_dummy
2908: FROM HZ_CUSTOMER_PROFILES
2909: WHERE CUST_ACCOUNT_PROFILE_ID = p_customer_profile_rec.cust_account_profile_id;
2910:
2911: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_DUPLICATE_COLUMN' );
2912: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_profile_id' );
3070: p_customer_profile_rec.cust_account_id <> -1
3071: THEN
3072: BEGIN
3073: SELECT 'Y' INTO l_dummy
3074: FROM HZ_CUSTOMER_PROFILES
3075: WHERE CUST_ACCOUNT_ID = p_customer_profile_rec.cust_account_id
3076: AND SITE_USE_ID IS NULL
3077: AND ROWNUM = 1;
3078:
3103: -- One party can only have 1 and only 1 profile directly attachment to the party
3104: -- At party level
3105: BEGIN
3106: SELECT 'Y' INTO l_dummy
3107: FROM HZ_CUSTOMER_PROFILES
3108: WHERE PARTY_ID = p_customer_profile_rec.party_id
3109: AND CUST_ACCOUNT_ID = -1;
3110:
3111: FND_MESSAGE.SET_NAME( 'AR', 'HZ_ONLY_ONE_PROF_AT_PARTY_LEV' );
3517:
3518:
3519: BEGIN
3520: SELECT 'Y' INTO l_dummy
3521: FROM HZ_CUSTOMER_PROFILES
3522: WHERE CUST_ACCOUNT_ID = p_customer_profile_rec.cust_account_id
3523: AND SITE_USE_ID = p_customer_profile_rec.site_use_id
3524: AND ROWNUM = 1;
3525:
4603: ll_cons_inv_flag := 'N';
4604: begin
4605: select cons_inv_flag
4606: into ll_cons_inv_flag
4607: from hz_customer_profiles
4608: where cust_account_id = p_customer_profile_rec.cust_account_id
4609: and site_use_id is NULL;
4610: exception when others then
4611: ll_cons_inv_flag := 'N';
4625: ll_cons_inv_flag := 'N';
4626: begin
4627: select cons_inv_flag
4628: into ll_cons_inv_flag
4629: from hz_customer_profiles
4630: where cust_account_id = p_customer_profile_rec.cust_account_id
4631: and site_use_id is NULL;
4632: exception when others then
4633: ll_cons_inv_flag := 'N';
5757: p_msg_level=>fnd_log.level_statement);
5758: END IF;
5759: END IF;
5760:
5761: -- cust_account_profile_id is foreign key to hz_customer_profiles
5762: -- Since cust_account_profile_id is mandatory and non-updateable,
5763: -- we only need to check FK during creation.
5764:
5765:
5780: -- Bug 4770111 : select created_by_module also
5781:
5782: SELECT CUST_ACCOUNT_ID, SITE_USE_ID, CREATED_BY_MODULE
5783: INTO l_cust_account_id, l_site_use_id, l_prof_cbm
5784: FROM HZ_CUSTOMER_PROFILES
5785: WHERE CUST_ACCOUNT_PROFILE_ID = p_cust_profile_amt_rec.cust_account_profile_id;
5786:
5787: EXCEPTION
5788: WHEN NO_DATA_FOUND THEN
5788: WHEN NO_DATA_FOUND THEN
5789: FND_MESSAGE.SET_NAME( 'AR', 'HZ_API_INVALID_FK' );
5790: FND_MESSAGE.SET_TOKEN( 'FK', 'cust_account_profile_id' );
5791: FND_MESSAGE.SET_TOKEN( 'COLUMN', 'cust_account_profile_id' );
5792: FND_MESSAGE.SET_TOKEN( 'TABLE', 'hz_customer_profiles' );
5793: FND_MSG_PUB.ADD;
5794: x_return_status := FND_API.G_RET_STS_ERROR;
5795: END;
5796:
5794: x_return_status := FND_API.G_RET_STS_ERROR;
5795: END;
5796:
5797: IF fnd_log.level_statement>=fnd_log.g_current_runtime_level THEN
5798: hz_utility_v2pub.debug(p_message=>'cust_account_profile_id is foreign key to hz_customer_profiles. ' ||
5799: 'x_return_status = ' || x_return_status,
5800: p_prefix =>l_debug_prefix,
5801: p_msg_level=>fnd_log.level_statement);
5802: END IF;