[enhancement] bulk edit in bank reconciliation, #4356
This commit is contained in:
		
							parent
							
								
									0fd67b23f4
								
							
						
					
					
						commit
						2d70887aaf
					
				| @ -2,10 +2,29 @@ | |||||||
| // License: GNU General Public License v3. See license.txt
 | // License: GNU General Public License v3. See license.txt
 | ||||||
| 
 | 
 | ||||||
| frappe.ui.form.on("Bank Reconciliation", { | frappe.ui.form.on("Bank Reconciliation", { | ||||||
|  | 	setup: function(frm) { | ||||||
|  | 		frm.get_docfield("journal_entries").allow_bulk_edit = 1; | ||||||
|  | 		frm.add_fetch("bank_account", "company", "company"); | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
|  | 	onload: function(frm) { | ||||||
|  | 		frm.set_query("bank_account", function() { | ||||||
|  | 			return { | ||||||
|  | 				"filters": { | ||||||
|  | 					"account_type": "Bank", | ||||||
|  | 					"is_group": 0 | ||||||
|  | 				} | ||||||
|  | 			}; | ||||||
|  | 		}); | ||||||
|  | 
 | ||||||
|  | 		frm.set_value("from_date", frappe.datetime.month_start()); | ||||||
|  | 		frm.set_value("to_date", frappe.datetime.month_end()); | ||||||
|  | 	}, | ||||||
|  | 
 | ||||||
| 	refresh: function(frm) { | 	refresh: function(frm) { | ||||||
| 		frm.disable_save(); | 		frm.disable_save(); | ||||||
| 	}, | 	}, | ||||||
| 	 | 
 | ||||||
| 	update_clearance_date: function(frm) { | 	update_clearance_date: function(frm) { | ||||||
| 		return frappe.call({ | 		return frappe.call({ | ||||||
| 			method: "update_details", | 			method: "update_details", | ||||||
| @ -22,19 +41,3 @@ frappe.ui.form.on("Bank Reconciliation", { | |||||||
| 		}); | 		}); | ||||||
| 	} | 	} | ||||||
| }); | }); | ||||||
| 
 |  | ||||||
| cur_frm.cscript.onload = function(doc, cdt, cdn) { |  | ||||||
| 	cur_frm.add_fetch("bank_account", "company", "company"); |  | ||||||
| 
 |  | ||||||
| 	cur_frm.set_query("bank_account", function() { |  | ||||||
| 		return { |  | ||||||
| 			"filters": { |  | ||||||
| 				"account_type": "Bank", |  | ||||||
| 				"is_group": 0 |  | ||||||
| 			} |  | ||||||
| 		}; |  | ||||||
| 	}); |  | ||||||
| 
 |  | ||||||
| 	cur_frm.set_value("from_date", frappe.datetime.month_start()); |  | ||||||
| 	cur_frm.set_value("to_date", frappe.datetime.month_end()); |  | ||||||
| } |  | ||||||
| @ -35,7 +35,7 @@ def _get_party_details(party=None, account=None, party_type="Customer", company= | |||||||
| 	party = out[party_type.lower()] | 	party = out[party_type.lower()] | ||||||
| 
 | 
 | ||||||
| 	if not ignore_permissions and not frappe.has_permission(party_type, "read", party): | 	if not ignore_permissions and not frappe.has_permission(party_type, "read", party): | ||||||
| 		frappe.throw(_("Not permitted"), frappe.PermissionError) | 		frappe.throw(_("Not permitted for {0}").format(party), frappe.PermissionError) | ||||||
| 
 | 
 | ||||||
| 	party = frappe.get_doc(party_type, party) | 	party = frappe.get_doc(party_type, party) | ||||||
| 
 | 
 | ||||||
|  | |||||||
							
								
								
									
										1
									
								
								erpnext/change_log/current/bulk-edit-bank-reco.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								erpnext/change_log/current/bulk-edit-bank-reco.md
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | - Update Clearance date via Upload and Download like Stock Reconciliation. Sponsored by [AG Techologies, Singapore](http://agtech.com.sg) | ||||||
| @ -53,5 +53,13 @@ | |||||||
| 				Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a> | 				Leave Allocation based on Arbitrary Dates <a href="https://github.com/frappe/erpnext/issues/1938">#1938</a> | ||||||
| 			</td> | 			</td> | ||||||
| 		</tr> | 		</tr> | ||||||
|  | 		<tr> | ||||||
|  | 			<td style="width: 30%"> | ||||||
|  | 				<a href="http://agtech.com.sq">AG Technologies, Singapore</a> | ||||||
|  | 			</td> | ||||||
|  | 			<td> | ||||||
|  | 				Bulk edit via export-import in Bank Reconciliation <a href="https://github.com/frappe/erpnext/issues/1938">#4356</a> | ||||||
|  | 			</td> | ||||||
|  | 		</tr> | ||||||
| 	</tbody> | 	</tbody> | ||||||
| </table> | </table> | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user