[Home] [Help]
229: where delivery_detail_id = cp_delivery_Detail_id;
230:
231: cursor c_cess_amount(cp_delivery_id number) is
232: select sum(a.tax_amount)
233: from JAI_OM_WSH_LINE_TAXES a, JAI_CMN_TAXES_ALL b
234: where delivery_detail_id in
235: (select delivery_detail_id
236: from JAI_OM_WSH_LINES_ALL
237: where delivery_id = cp_delivery_id
242:
243: /*Bug 5989740 bduvarag start*/
244: cursor c_sh_cess_amount(cp_delivery_id number) is
245: select sum(a.tax_amount)
246: from JAI_OM_WSH_LINE_TAXES a, JAI_CMN_TAXES_ALL b
247: where delivery_detail_id in
248: (select delivery_detail_id
249: from JAI_OM_WSH_LINES_ALL
250: where delivery_id = cp_delivery_id
655: This was done because if there is no cess amount, there is no need to call the insert row procedure
656: */
657: CURSOR c_tax_type_rec IS
658: SELECT jtc.tax_type , round(sum(jsptl.func_tax_amount),0) tax_amount --rchandan for bug#4388950
659: FROM JAI_OM_WSH_LINE_TAXES jsptl ,
660: JAI_CMN_TAXES_ALL jtc
661: WHERE jtc.tax_id = jsptl.tax_id
662: --Modified for bug5747126
663: AND delivery_detail_id = p_delivery_detail_id
683:
684: -- foll cursor added by ssumaith - bug# 5747126 - one off
685: CURSOR c_tax_type_for_delivery_rec IS
686: SELECT jtc.tax_type , round(sum(jsptl.func_tax_amount),0) tax_amount
687: FROM JAI_OM_WSH_LINE_TAXES jsptl ,
688: JAI_OM_WSH_LINES_ALL jspl ,
689: JAI_CMN_TAXES_ALL jtc ,
690: JAI_INV_ITM_SETUPS jmsi /* Added by Ramananda for bug#5912620*/
691: WHERE jtc.tax_id = jsptl.tax_id
926: p_source_name := 'Register India' ;
927: p_category_name := 'Register India' ;
928: p_transaction_hdr_id := It has the delivery detail id
929:
930: Based on the delivery detail id , pick up the delivery id, organization id and get the taxes from JAI_OM_WSH_LINE_TAXES
931:
932: If called from AR invoice completion the values for the parameters are as follows.
933:
934: p_source_name := 'Receivables India'
963: end if;
964:
965: if p_je_source_name = 'Register India' and p_je_category_name = 'Register India' then
966: /*
967: Do all things needed to populate records into the register table , picking up taxes from the JAI_OM_WSH_LINE_TAXES table
968: */
969: ln_header_id := ln_delivery_id;
970: ja_in_om_cess_register_entries(p_delivery_id => ln_delivery_id ,
971: p_source_type => p_source_type ,
1202: WHERE delivery_detail_id = cp_delivery_detail_id;
1203:
1204: CURSOR c_cess_amount(cp_delivery_id number) is
1205: SELECT sum(a.tax_amount)
1206: FROM JAI_OM_WSH_LINE_TAXES a, JAI_CMN_TAXES_ALL b
1207: WHERE delivery_detail_id in
1208: (SELECt delivery_detail_id
1209: FROM JAI_OM_WSH_LINES_ALL
1210: WHERE delivery_id = cp_delivery_id
3523:
3524:
3525: CURSOR c_cess_amount IS
3526: SELECT sum(a.tax_amount)
3527: FROM JAI_OM_WSH_LINE_TAXES a, JAI_CMN_TAXES_ALL b
3528: WHERE delivery_detail_id = p_reference_line_id
3529: AND a.tax_id = b.tax_id
3530: AND upper(b.tax_type) in (jai_constants.TAX_TYPE_CVD_EDU_CESS,jai_constants.TAX_TYPE_EXC_EDU_CESS);
3531: /*Bug 5989740 bduvarag*/
3530: AND upper(b.tax_type) in (jai_constants.TAX_TYPE_CVD_EDU_CESS,jai_constants.TAX_TYPE_EXC_EDU_CESS);
3531: /*Bug 5989740 bduvarag*/
3532: CURSOR c_sh_cess_amount IS
3533: SELECT sum(a.tax_amount)
3534: FROM JAI_OM_WSH_LINE_TAXES a, JAI_CMN_TAXES_ALL b
3535: WHERE delivery_detail_id = p_reference_line_id
3536: AND a.tax_id = b.tax_id
3537: AND upper(b.tax_type) in (JAI_CONSTANTS.tax_type_sh_cvd_edu_cess,JAI_CONSTANTS.tax_type_sh_exc_edu_cess);
3538:
3976: following two cursors added by ssumaith - bug# 4136981
3977: */
3978: cursor c_get_om_cess_amount(cp_delivery_id number) is
3979: select SUM(NVL(jsptl.func_tax_amount,0)) tax_amount --NVL(sum(jsptl.func_tax_amount),0) tax_amount -- added , Ramananda NVL condition for bug #4516577
3980: from JAI_OM_WSH_LINE_TAXES jsptl ,
3981: JAI_CMN_TAXES_ALL jtc
3982: where jtc.tax_id = jsptl.tax_id
3983: and delivery_detail_id in
3984: (select delivery_detail_id
3988: and upper(jtc.tax_type) in (jai_constants.TAX_TYPE_CVD_EDU_CESS,jai_constants.TAX_TYPE_EXC_EDU_CESS);
3989: /*Bug 5989740 bduvarag*/
3990: cursor c_get_om_sh_cess_amount(cp_delivery_id number) is
3991: select NVL(sum(jsptl.func_tax_amount),0) tax_amount
3992: from JAI_OM_WSH_LINE_TAXES jsptl ,
3993: JAI_CMN_TAXES_ALL jtc
3994: where jtc.tax_id = jsptl.tax_id
3995: and delivery_detail_id in
3996: (select delivery_detail_id