mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-11-04 06:37:33 -05:00 
			
		
		
		
	VAT calculation with 3 decimal precision is not correct in PDF
This commit is contained in:
		
							parent
							
								
									d8423716ba
								
							
						
					
					
						commit
						076e301e38
					
				@ -726,7 +726,7 @@ function calculateAmounts(invoice) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // calculate line item tax
 | 
					    // calculate line item tax
 | 
				
			||||||
    var lineTotal = NINJA.parseFloat(item.cost) * NINJA.parseFloat(item.qty);
 | 
					    var lineTotal = roundToFour(NINJA.parseFloat(item.cost)) * roundToFour(NINJA.parseFloat(item.qty));
 | 
				
			||||||
    if (invoice.discount != 0) {
 | 
					    if (invoice.discount != 0) {
 | 
				
			||||||
        if (parseInt(invoice.is_amount_discount)) {
 | 
					        if (parseInt(invoice.is_amount_discount)) {
 | 
				
			||||||
            lineTotal -= roundToTwo((lineTotal/total) * invoice.discount);
 | 
					            lineTotal -= roundToTwo((lineTotal/total) * invoice.discount);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user