Merge pull request #14756 from rohitwaghchaure/fix_patch_for_set_salary_component_properties
[Fix] Patch
This commit is contained in:
		
						commit
						c5183b7c2a
					
				| @ -1,13 +1,16 @@ | |||||||
| import frappe | import frappe | ||||||
| 
 | 
 | ||||||
| def execute(): | def execute(): | ||||||
|     frappe.db.sql("update `tabSalary Component` set is_payable=1, is_tax_applicable=1 where type='Earning'") | 	frappe.reload_doc('hr', 'doctype', 'salary_detail') | ||||||
|     frappe.db.sql("update `tabSalary Component` set is_payable=0 where type='Deduction'") | 	frappe.reload_doc('hr', 'doctype', 'salary_component') | ||||||
| 
 | 
 | ||||||
|     frappe.db.sql("""update `tabSalary Component` set variable_based_on_taxable_salary=1 | 	frappe.db.sql("update `tabSalary Component` set is_payable=1, is_tax_applicable=1 where type='Earning'") | ||||||
|         where type='Deduction' and name in ('TDS', 'Tax Deducted at Source')""") | 	frappe.db.sql("update `tabSalary Component` set is_payable=0 where type='Deduction'") | ||||||
| 
 | 
 | ||||||
|     frappe.db.sql("""update `tabSalary Detail` set is_tax_applicable=1  | 	frappe.db.sql("""update `tabSalary Component` set variable_based_on_taxable_salary=1 | ||||||
|         where parentfield='earnings' and statistical_component=0""") | 	    where type='Deduction' and name in ('TDS', 'Tax Deducted at Source')""") | ||||||
|     frappe.db.sql("""update `tabSalary Detail` set variable_based_on_taxable_salary=1  | 
 | ||||||
|         where parentfield='deductions' and salary_component in ('TDS', 'Tax Deducted at Source')""") | 	frappe.db.sql("""update `tabSalary Detail` set is_tax_applicable=1 | ||||||
|  | 	    where parentfield='earnings' and statistical_component=0""") | ||||||
|  | 	frappe.db.sql("""update `tabSalary Detail` set variable_based_on_taxable_salary=1 | ||||||
|  | 	    where parentfield='deductions' and salary_component in ('TDS', 'Tax Deducted at Source')""") | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user