fixed price 2

This commit is contained in:
2026-06-28 10:58:37 +03:30
parent 14055c5770
commit 9b9685f477
+4 -4
View File
@@ -128,11 +128,11 @@ class ConfigService
$montzarProfit = (float) $this->get('montzar_diff', 0);
$finalBuyDiff = $diffBuy + $montzarProfit;
$finalSellDiff = $diffSell + $montzarProfit;
$openBuy = $montzarFlags['montzar_open_buy'] ?? $this->getBool('montzar_open_buy', true);
$openSell = $montzarFlags['montzar_open_sell'] ?? $this->getBool('montzar_open_sell', true);
$sell = $openSell ? (int) ceil($priceValue - $finalSellDiff) : 0;
$buy = $openBuy ? (int) ceil($priceValue + $finalBuyDiff) : 0;
// montzar_open_buy/sell وضعیت همکار است — نمایش قیمت را صفر نکن.
// باز/بسته بودن معامله = product.open_buy/open_sell در اپ محلی.
$sell = (int) ceil($priceValue - $finalSellDiff);
$buy = (int) ceil($priceValue + $finalBuyDiff);
$priceLast = (int) ceil($priceValue + $finalBuyDiff);
return compact('sell', 'buy', 'priceLast');