mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-30 20:55:42 +00:00 
			
		
		
		
	moved the special stuff into the inherited view
This commit is contained in:
		| @@ -1586,3 +1586,11 @@ class LineItemPricing(PartPricing): | |||||||
|                 return None |                 return None | ||||||
|         else: |         else: | ||||||
|             return None |             return None | ||||||
|  |  | ||||||
|  |     def get_quantity(self): | ||||||
|  |         """ Return set quantity in decimal format """ | ||||||
|  |         qty = Decimal(self.request.GET.get('quantity', 1)) | ||||||
|  |         if qty == 1: | ||||||
|  |             return Decimal(self.request.POST.get('quantity', 1)) | ||||||
|  |         return qty | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1959,19 +1959,7 @@ class PartPricing(AjaxView): | |||||||
|  |  | ||||||
|     def get_quantity(self): |     def get_quantity(self): | ||||||
|         """ Return set quantity in decimal format """ |         """ Return set quantity in decimal format """ | ||||||
|  |         return Decimal(self.request.POST.get('quantity', 1)) | ||||||
|         # check POST |  | ||||||
|         qty = self.request.POST.get('quantity', None) |  | ||||||
|  |  | ||||||
|         # check GET |  | ||||||
|         if not qty: |  | ||||||
|             qty = self.request.GET.get('quantity', None) |  | ||||||
|  |  | ||||||
|         # nothing found: return 1 |  | ||||||
|         if not qty: |  | ||||||
|             return Decimal(1) |  | ||||||
|         # return as decimal |  | ||||||
|         return Decimal(qty) |  | ||||||
|  |  | ||||||
|     def get_part(self): |     def get_part(self): | ||||||
|         try: |         try: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user