fix kashkool
This commit is contained in:
@@ -494,17 +494,14 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* فروشگاه — منطق lastPrice: montzar_price / prices
|
||||
* فروشگاه — منطق lastPrice بر اساس price_provider
|
||||
*/
|
||||
protected function storeLastPrice(ConfigService $config): array
|
||||
{
|
||||
$toBool = fn ($value) => filter_var($value, FILTER_VALIDATE_BOOLEAN);
|
||||
|
||||
$talaIr = 0;
|
||||
$montzar = 0;
|
||||
|
||||
$montzarExists = Setting::where('key', 'montzar_price')->exists();
|
||||
$montzarEnabled = $montzarExists && $toBool($config->Config('montzar_price'));
|
||||
$montzarEnabled = $config->priceProvider() === 'montzar';
|
||||
|
||||
if ($montzarEnabled) {
|
||||
try {
|
||||
@@ -588,7 +585,7 @@ class ReportController extends Controller
|
||||
'tala_ir' => $talaIr,
|
||||
];
|
||||
|
||||
if ($montzarExists) {
|
||||
if ($montzarEnabled) {
|
||||
$response['montzar'] = $montzar;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user