Merge pull request #13785 from rohitwaghchaure/fix_patch_pos_taxes
[Fix] POS Patch
This commit is contained in:
		
						commit
						7bd1453f8f
					
				| @ -8,7 +8,7 @@ def execute(): | |||||||
| 	for d in frappe.get_all('Sales Invoice', fields=["name"], | 	for d in frappe.get_all('Sales Invoice', fields=["name"], | ||||||
| 		filters = {'is_pos':1, 'docstatus': 1, 'creation': ('>', '2018-04-23')}): | 		filters = {'is_pos':1, 'docstatus': 1, 'creation': ('>', '2018-04-23')}): | ||||||
| 		doc = frappe.get_doc('Sales Invoice', d.name) | 		doc = frappe.get_doc('Sales Invoice', d.name) | ||||||
| 		if (not doc.taxes and doc.taxes_and_charges and doc.pos_profile and | 		if (not doc.taxes and doc.taxes_and_charges and doc.pos_profile and doc.outstanding_amount != 0 and | ||||||
| 			frappe.db.get_value('POS Profile', doc.pos_profile, 'taxes_and_charges', cache=True) == doc.taxes_and_charges): | 			frappe.db.get_value('POS Profile', doc.pos_profile, 'taxes_and_charges', cache=True) == doc.taxes_and_charges): | ||||||
| 
 | 
 | ||||||
| 			doc.append_taxes_from_master() | 			doc.append_taxes_from_master() | ||||||
| @ -19,7 +19,7 @@ def execute(): | |||||||
| 			doc.db_update() | 			doc.db_update() | ||||||
| 
 | 
 | ||||||
| 			delete_gle_for_voucher(doc.name) | 			delete_gle_for_voucher(doc.name) | ||||||
| 			doc.make_gl_entries() | 			doc.make_gl_entries(repost_future_gle=False) | ||||||
| 
 | 
 | ||||||
| def delete_gle_for_voucher(voucher_no): | def delete_gle_for_voucher(voucher_no): | ||||||
| 	frappe.db.sql("""delete from `tabGL Entry` where voucher_no = %(voucher_no)s""", | 	frappe.db.sql("""delete from `tabGL Entry` where voucher_no = %(voucher_no)s""", | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user