27: and fix a existing tax re-calculation issue that tax amount is zero after saved changes on AR transaction line
28:
29: 03/12/2009 Modified by Xiao for bug#9109910
30: Issue: tax_amount is Zero after Trx Line amount changed.
31: Analysis: for adhoc tax, tax_amount is updated as JAI_CMN_TAXES_ALL.tax_amount, which is always Zero
32: when adhoc tax is defined in table JAI_CMN_TAXES_ALL.
33: Fix: Modified cursor tax_cur, get JAI_AR_TRX_TAX_LINES.tax_amount instead of JAI_CMN_TAXES_ALL.tax_amount
34: to update tax_amount.
35:
28:
29: 03/12/2009 Modified by Xiao for bug#9109910
30: Issue: tax_amount is Zero after Trx Line amount changed.
31: Analysis: for adhoc tax, tax_amount is updated as JAI_CMN_TAXES_ALL.tax_amount, which is always Zero
32: when adhoc tax is defined in table JAI_CMN_TAXES_ALL.
33: Fix: Modified cursor tax_cur, get JAI_AR_TRX_TAX_LINES.tax_amount instead of JAI_CMN_TAXES_ALL.tax_amount
34: to update tax_amount.
35:
36: 02-Sep-2010 Bug 10043656 Modified by Peng Zheng
29: 03/12/2009 Modified by Xiao for bug#9109910
30: Issue: tax_amount is Zero after Trx Line amount changed.
31: Analysis: for adhoc tax, tax_amount is updated as JAI_CMN_TAXES_ALL.tax_amount, which is always Zero
32: when adhoc tax is defined in table JAI_CMN_TAXES_ALL.
33: Fix: Modified cursor tax_cur, get JAI_AR_TRX_TAX_LINES.tax_amount instead of JAI_CMN_TAXES_ALL.tax_amount
34: to update tax_amount.
35:
36: 02-Sep-2010 Bug 10043656 Modified by Peng Zheng
37: New Tax Category Default logic for GST
139: )
140: )tax_type_val,
141: b.mod_cr_Percentage, b.vendor_id, b.tax_type
142: , b.inclusive_tax_flag -- Added by Jia Li for Tax Inclusive Computations on 2007/12/11
143: FROM JAI_AR_TRX_TAX_LINES a, JAI_CMN_TAXES_ALL b ,
144: jai_regime_tax_types_v rgm_tax_types /* added by ssumaith - bug# 4245053*/
145: WHERE a.link_to_cust_trx_line_id = p_line_id
146: AND a.tax_id = b.tax_id
147: AND rgm_tax_types.tax_type (+) = b.tax_type /* added by ssumaith - bug# 4245053*/
191:
192: This needs to be used for the calculation of the taxes registered under vat regime.
193:
194: This change has been done by using the view jai_regime_tax_types_v - and outer joining it with the
195: JAI_CMN_TAXES_ALL table based on the tax type column.
196:
197: Added a parameter p_vat_assessable_Value NUMBER for this procedure.
198:
199: Dependency due to this bug - Huge