26: issue.
27: 5. 12/07/2003 Aiyer - Bug #3749294 File Version 115.1
28: Issue:-
29: Uom based taxes do not get calculated correctly if the transaction UOM is different from the
30: UOM setup in the tax definitions India Localization (JAI_CMN_TAXES_ALL table).
31:
32: Fix:-
33: ----
34: Modified the procedure ja_in_calc_prec_taxes.For more details please refer the change history
116: */
117: type ref_cur_typ is ref cursor;
118: type tax_rec_typ is record
119: (
120: tax_id JAI_CMN_TAXES_ALL.tax_id%type
121: , lno JAI_CMN_TAX_CTG_LINES.line_no%type
122: , p_1 JAI_CMN_TAX_CTG_LINES.precedence_1%type
123: , p_2 JAI_CMN_TAX_CTG_LINES.precedence_2%type
124: , p_3 JAI_CMN_TAX_CTG_LINES.precedence_3%type
128: , p_7 JAI_CMN_TAX_CTG_LINES.precedence_7%type
129: , p_8 JAI_CMN_TAX_CTG_LINES.precedence_8%type
130: , p_9 JAI_CMN_TAX_CTG_LINES.precedence_9%type
131: , p_10 JAI_CMN_TAX_CTG_LINES.precedence_10%type
132: , tax_rate JAI_CMN_TAXES_ALL.tax_rate%type
133: , tax_amount JAI_CMN_TAXES_ALL.tax_amount%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
129: , p_8 JAI_CMN_TAX_CTG_LINES.precedence_8%type
130: , p_9 JAI_CMN_TAX_CTG_LINES.precedence_9%type
131: , p_10 JAI_CMN_TAX_CTG_LINES.precedence_10%type
132: , tax_rate JAI_CMN_TAXES_ALL.tax_rate%type
133: , tax_amount JAI_CMN_TAXES_ALL.tax_amount%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
130: , p_9 JAI_CMN_TAX_CTG_LINES.precedence_9%type
131: , p_10 JAI_CMN_TAX_CTG_LINES.precedence_10%type
132: , tax_rate JAI_CMN_TAXES_ALL.tax_rate%type
133: , tax_amount JAI_CMN_TAXES_ALL.tax_amount%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
131: , p_10 JAI_CMN_TAX_CTG_LINES.precedence_10%type
132: , tax_rate JAI_CMN_TAXES_ALL.tax_rate%type
133: , tax_amount JAI_CMN_TAXES_ALL.tax_amount%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
132: , tax_rate JAI_CMN_TAXES_ALL.tax_rate%type
133: , tax_amount JAI_CMN_TAXES_ALL.tax_amount%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
134: , qty_rate JAI_CMN_TAXES_ALL.tax_amount%type /*Added qty_rate by mmurtuza for bug 14675629*/
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
135: , uom_code JAI_CMN_TAXES_ALL.uom_code%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
143: , tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type
136: , valid_date JAI_CMN_TAXES_ALL.end_date%type
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
143: , tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type
144: , inclusive_tax_flag JAI_CMN_TAXES_ALL.inclusive_tax_flag%type --added by walton for inclusive tax
137: , tax_type_val number
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
143: , tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type
144: , inclusive_tax_flag JAI_CMN_TAXES_ALL.inclusive_tax_flag%type --added by walton for inclusive tax
145: );
138: , mod_cr_percentage JAI_CMN_TAXES_ALL.mod_cr_percentage%type
139: , vendor_id JAI_CMN_TAXES_ALL.vendor_id%type
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
143: , tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type
144: , inclusive_tax_flag JAI_CMN_TAXES_ALL.inclusive_tax_flag%type --added by walton for inclusive tax
145: );
146: /*end of bug#5631784 */
140: , tax_type JAI_CMN_TAXES_ALL.tax_type%type
141: , rounding_factor JAI_CMN_TAXES_ALL.rounding_factor%type
142: , adhoc_flag JAI_CMN_TAXES_ALL.adhoc_flag%type
143: , tax_category_id JAI_CMN_TAX_CTGS_ALL.tax_category_id%type
144: , inclusive_tax_flag JAI_CMN_TAXES_ALL.inclusive_tax_flag%type --added by walton for inclusive tax
145: );
146: /*end of bug#5631784 */
147:
148: PROCEDURE ja_in_cust_default_taxes(
191: p_last_update_login NUMBER,
192: p_operation_flag NUMBER DEFAULT NULL,
193: p_vat_assessable_value NUMBER DEFAULT 0
194: /** bgowrava for forward porting bug#5631784,Following parameters are added for TCS enh.*/
195: , p_thhold_cat_base_tax_typ JAI_CMN_TAXES_ALL.tax_type%type default null -- tax type to be considered as base when calculating threshold taxes
196: , p_threshold_tax_cat_id JAI_AP_TDS_THHOLD_TAXES.tax_category_id%type default null
197: , p_source_trx_type jai_cmn_document_taxes.source_doc_type%type default null
198: , p_source_table_name jai_cmn_document_taxes.source_table_name%type default null
199: , p_action varchar2 default null