[Home] [Help]
500:
501: -- responsible for getting tax category for event
502: cursor cur_get_tax_category is
503: select setup_value1 tax_category
504: from jai_pa_setup_values
505: where context = jai_constants.setup_event_type and -- this will search only for events not for other context types
506: attribute1 = ln_event_type_id ;
507:
508: begin
586: ln_tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type;
587: ----------------CURSOR DECLARATIONS------------------------------
588: cursor cur_get_project_all is
589: select setup_value1 tax_category
590: from jai_pa_setup_values
591: where context = jai_constants.setup_project and
592: attribute1 = pn_project_id ;
593:
594: begin
639: -- responsible for getting tax category attached with customer / site combination or customer / null site combination
640: cursor cur_cust_site_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type ,
641: cn_address_id pa_draft_invoices_all.ship_to_address_id%type) is
642: select setup_value1
643: from jai_pa_setup_values
644: where attribute1 = cn_customer_id and
645: attribute2 = cn_address_id and
646: context = jai_constants.setup_customer_site ;
647:
646: context = jai_constants.setup_customer_site ;
647:
648: cursor cur_cust_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type) is
649: select setup_value1
650: from jai_pa_setup_values
651: where attribute1 = cn_customer_id and
652: context = jai_constants.setup_customer_site and
653: attribute2 is null ;
654: begin
738:
739: -- find out tax category for expenditure types;
740: cursor cur_expn_tax_category(cv_expenditure_type pa_expenditure_types.expenditure_type%type ) is
741: select jpsv.setup_value1
742: from jai_pa_setup_values jpsv,
743: pa_expenditure_types pet
744: where jpsv.context = jai_constants.setup_expenditure_type and
745: jpsv.attribute1 = pet.expenditure_type_id and
746: pet.expenditure_type =cv_expenditure_type ;