mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 00:17:30 -04:00 
			
		
		
		
	Add check for PHP/JS balances
This commit is contained in:
		
							parent
							
								
									b534ad4e83
								
							
						
					
					
						commit
						a9104c64b0
					
				| @ -863,6 +863,13 @@ | |||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|                 model.invoice().addItem(); // add blank item
 |                 model.invoice().addItem(); // add blank item
 | ||||||
|  | 
 | ||||||
|  |                 // check amounts are correct
 | ||||||
|  |                 var phpBalance = invoice.balance; | ||||||
|  |                 var jsBalance = model.invoice().totals.rawTotal(); | ||||||
|  |                 if (phpBalance != jsBalance) { | ||||||
|  |                     window.onerror('Balances do not match | PHP: ' + phpBalance + ', JS: ' + jsBalance); | ||||||
|  |                 } | ||||||
|             @else |             @else | ||||||
|                 // set the default account tax rate
 |                 // set the default account tax rate
 | ||||||
|                 @if ($account->invoice_taxes) |                 @if ($account->invoice_taxes) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user