diff --git a/app/Classes/Modules/Companies/Services/FetchesCompanyServiceSettings.php b/app/Classes/Modules/Companies/Services/FetchesCompanyServiceSettings.php index a3827892..71fe8ac4 100644 --- a/app/Classes/Modules/Companies/Services/FetchesCompanyServiceSettings.php +++ b/app/Classes/Modules/Companies/Services/FetchesCompanyServiceSettings.php @@ -41,7 +41,7 @@ class FetchesCompanyServiceSettings $currency->max_limit->value, $currency->min_limit->value, $rate->selling); if($this->hasCustomOptions($constants)){ - $customOptions = $this->getServiceCustomOptions($constants, $object, $standardConfigurations, $object->getPaymentMethod())->sortByDesc(function($option) use($object) { + $customOptions = $this->getServiceCustomOptions($constants, $object, $standardConfigurations)->sortBy(function($option) use($object) { return (new CalculationObject($object, $option))->getTotal(); })->first();