Add Payment Reconciliation Feature/Tool - minor changes
This commit is contained in:
		
							parent
							
								
									90b79fcd1f
								
							
						
					
					
						commit
						0e57b971ad
					
				| @ -7,19 +7,26 @@ erpnext.accounts.PaymentReconciliationController = frappe.ui.form.Controller.ext | ||||
| 
 | ||||
| 	onload: function() { | ||||
| 		var me = this | ||||
| 		this.frm.set_query ("party_account", function() { | ||||
| 		this.frm.set_query ('party_account', function() { | ||||
| 			return{ | ||||
| 				filters:[ | ||||
| 					["Account", "company", "=", me.frm.doc.company], | ||||
| 					["Account", "group_or_ledger", "=", "Ledger"], | ||||
| 					["Account", "master_type", "in", ["Customer", "Supplier"]] | ||||
| 					['Account', 'company', '=', me.frm.doc.company], | ||||
| 					['Account', 'group_or_ledger', '=', 'Ledger'], | ||||
| 					['Account', 'master_type', 'in', ['Customer', 'Supplier']] | ||||
| 				] | ||||
| 			}; | ||||
| 		}); | ||||
| 	}, | ||||
| 
 | ||||
| 	get_unreconciled_entries: function() { | ||||
| 		return this.frm.call({ | ||||
| 			doc: me.frm.doc, | ||||
| 			method: 'get_unreconciled_entries' | ||||
| 		}); | ||||
| 	} | ||||
| 
 | ||||
| }); | ||||
| 
 | ||||
| $.extend(cur_frm.cscript, new erpnext.accounts.PaymentReconciliationController({frm: cur_frm})); | ||||
| 
 | ||||
| cur_frm.add_fetch("party_account", "master_type", "party_type") | ||||
| cur_frm.add_fetch('party_account', 'master_type', 'party_type') | ||||
| @ -11,4 +11,8 @@ from frappe import msgprint, _ | ||||
| from frappe.model.document import Document | ||||
| 
 | ||||
| class PaymentReconciliation(Document): | ||||
| 	pass | ||||
| 	def get_unreconciled_entries(self): | ||||
| 		self.set('payment_reconciliation_payment', []) | ||||
| 		jve = self.get_jv_entries() | ||||
| 		self.create_payment_reconciliation_payment(jve) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user