mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-14 23:47:48 +00:00
Adding super admin configuration for the minimum billable turnover functionality
This commit is contained in:
@@ -9,6 +9,10 @@ angular.module("admin.businessModelConfiguration").controller "BusinessModelConf
|
||||
return $scope.bill() if !$scope.cap? || Number($scope.cap) == 0
|
||||
Math.min($scope.bill(), Number($scope.cap))
|
||||
|
||||
$scope.finalBill = ->
|
||||
return 0 if Number($scope.turnover) <= Number($scope.min_bill_to)
|
||||
$scope.cappedBill()
|
||||
|
||||
$scope.capReached = ->
|
||||
return "No" if !$scope.cap? || Number($scope.cap) == 0
|
||||
if $scope.bill() >= Number($scope.cap) then "Yes" else "No"
|
||||
@@ -18,4 +22,4 @@ angular.module("admin.businessModelConfiguration").controller "BusinessModelConf
|
||||
($scope.cappedBill() * Number($scope.taxRate))
|
||||
|
||||
$scope.total = ->
|
||||
$scope.cappedBill() + $scope.includedTax()
|
||||
$scope.finalBill() + $scope.includedTax()
|
||||
|
||||
Reference in New Issue
Block a user