mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	Style fixes
This commit is contained in:
		| @@ -6,7 +6,7 @@ import os | ||||
| from django import template | ||||
| from InvenTree import version, settings | ||||
|  | ||||
| from InvenTree.helpers import decimal2string | ||||
| import InvenTree.helpers | ||||
|  | ||||
| from common.models import InvenTreeSetting, ColorTheme | ||||
|  | ||||
| @@ -17,7 +17,7 @@ register = template.Library() | ||||
| def decimal(x, *args, **kwargs): | ||||
|     """ Simplified rendering of a decimal number """ | ||||
|  | ||||
|     return decimal2string(x) | ||||
|     return InvenTree.helpers.decimal2string(x) | ||||
|  | ||||
|  | ||||
| @register.simple_tag() | ||||
| @@ -26,6 +26,7 @@ def str2bool(x, *args, **kwargs): | ||||
|  | ||||
|     return InvenTree.helpers.str2bool(x) | ||||
|  | ||||
|  | ||||
| @register.simple_tag() | ||||
| def inrange(n, *args, **kwargs): | ||||
|     """ Return range(n) for iterating through a numeric quantity """ | ||||
| @@ -35,7 +36,7 @@ def inrange(n, *args, **kwargs): | ||||
| @register.simple_tag() | ||||
| def multiply(x, y, *args, **kwargs): | ||||
|     """ Multiply two numbers together """ | ||||
|     return decimal2string(x * y) | ||||
|     return InvenTree.helpers.decimal2string(x * y) | ||||
|  | ||||
|  | ||||
| @register.simple_tag() | ||||
| @@ -48,7 +49,7 @@ def add(x, y, *args, **kwargs): | ||||
| def part_allocation_count(build, part, *args, **kwargs): | ||||
|     """ Return the total number of <part> allocated to <build> """ | ||||
|  | ||||
|     return decimal2string(build.getAllocatedQuantity(part)) | ||||
|     return InvenTree.helpers.decimal2string(build.getAllocatedQuantity(part)) | ||||
|  | ||||
|  | ||||
| @register.simple_tag() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user