Adds multiply as a template filter (for invoices)
This commit is contained in:
		
							parent
							
								
									8324b51094
								
							
						
					
					
						commit
						aa6377f4ce
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -49,3 +49,8 @@ def items_purchased(context):
 | 
			
		|||
        quantity = pp.aggregate(Sum("quantity"))["quantity__sum"]
 | 
			
		||||
        out.append(ProductAndQuantity(product, quantity))
 | 
			
		||||
    return out
 | 
			
		||||
 | 
			
		||||
@register.filter
 | 
			
		||||
def multiply(value, arg):
 | 
			
		||||
    ''' Multiplies value by arg '''
 | 
			
		||||
    return value * arg
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue