mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Do not allow line_item.unit_value to be updated if the variant.unit_value is zero
This commit is contained in:
@@ -171,6 +171,12 @@ angular.module("ofn.admin").controller "AdminOrderMgmtCtrl", [
|
||||
lineItem.unit_value = lineItem.units_variant.unit_value
|
||||
lineItem.price = lineItem.price * lineItem.unit_value / oldValue
|
||||
#$scope.bulk_order_form.line_item.price.$setViewValue($scope.bulk_order_form.line_item.price.$viewValue)
|
||||
|
||||
$scope.unitValueLessThanZero = (lineItem) ->
|
||||
if lineItem.units_variant.unit_value <= 0
|
||||
true
|
||||
else
|
||||
false
|
||||
]
|
||||
|
||||
daysFromToday = (days) ->
|
||||
|
||||
Reference in New Issue
Block a user