fix: Invoice discounting test
This commit is contained in:
		
							parent
							
								
									20d6143c38
								
							
						
					
					
						commit
						2d5530da96
					
				| @ -137,6 +137,7 @@ class InvoiceDiscounting(AccountsController): | |||||||
| 			"cost_center": erpnext.get_default_cost_center(self.company) | 			"cost_center": erpnext.get_default_cost_center(self.company) | ||||||
| 		}) | 		}) | ||||||
| 
 | 
 | ||||||
|  | 		if self.bank_charges: | ||||||
| 			je.append("accounts", { | 			je.append("accounts", { | ||||||
| 				"account": self.bank_charges_account, | 				"account": self.bank_charges_account, | ||||||
| 				"debit_in_account_currency": flt(self.bank_charges), | 				"debit_in_account_currency": flt(self.bank_charges), | ||||||
|  | |||||||
| @ -80,6 +80,7 @@ class TestInvoiceDiscounting(unittest.TestCase): | |||||||
| 			short_term_loan=self.short_term_loan, | 			short_term_loan=self.short_term_loan, | ||||||
| 			bank_charges_account=self.bank_charges_account, | 			bank_charges_account=self.bank_charges_account, | ||||||
| 			bank_account=self.bank_account, | 			bank_account=self.bank_account, | ||||||
|  | 			bank_charges=100 | ||||||
| 			) | 			) | ||||||
| 
 | 
 | ||||||
| 		je = inv_disc.create_disbursement_entry() | 		je = inv_disc.create_disbursement_entry() | ||||||
| @ -289,6 +290,7 @@ def create_invoice_discounting(invoices, **args): | |||||||
| 	inv_disc.bank_account=args.bank_account | 	inv_disc.bank_account=args.bank_account | ||||||
| 	inv_disc.loan_start_date = args.start or nowdate() | 	inv_disc.loan_start_date = args.start or nowdate() | ||||||
| 	inv_disc.loan_period = args.period or 30 | 	inv_disc.loan_period = args.period or 30 | ||||||
|  | 	inv_disc.bank_charges = flt(args.bank_charges) | ||||||
| 
 | 
 | ||||||
| 	for d in invoices: | 	for d in invoices: | ||||||
| 		inv_disc.append("invoices", { | 		inv_disc.append("invoices", { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user