fix sql
This commit is contained in:
@@ -93,7 +93,7 @@ class ConfigService
|
||||
}
|
||||
|
||||
/** اختلاف خرید نمایش (/api/price/last) — fee_single / buy_fee */
|
||||
public function displayBuySpreadRial(): float
|
||||
public function displayBuyPriceDiffRial(): float
|
||||
{
|
||||
$feeSingle = (float) $this->get('fee_single', 0);
|
||||
$buyFee = (float) $this->get('buy_fee', $feeSingle);
|
||||
@@ -102,7 +102,7 @@ class ConfigService
|
||||
}
|
||||
|
||||
/** اختلاف فروش نمایش — fee_single / sell_fee */
|
||||
public function displaySellSpreadRial(): float
|
||||
public function displaySellPriceDiffRial(): float
|
||||
{
|
||||
$feeSingle = (float) $this->get('fee_single', 0);
|
||||
$sellFee = (float) $this->get('sell_fee', $feeSingle);
|
||||
@@ -111,7 +111,7 @@ class ConfigService
|
||||
}
|
||||
|
||||
/** اختلاف ریالی سفارش — fee_single، بعد fee_cash (legacy)، بعد config/fee.php */
|
||||
public function orderSpreadRial(): float
|
||||
public function orderPriceDiffRial(): float
|
||||
{
|
||||
$feeSingle = $this->getString('fee_single', '');
|
||||
if ($feeSingle !== '') {
|
||||
@@ -161,8 +161,8 @@ class ConfigService
|
||||
?string $priceSource = null,
|
||||
array $montzarFlags = []
|
||||
): array {
|
||||
$diffBuy = (float) $this->displayBuySpreadRial();
|
||||
$diffSell = (float) $this->displaySellSpreadRial();
|
||||
$diffBuy = (float) $this->displayBuyPriceDiffRial();
|
||||
$diffSell = (float) $this->displaySellPriceDiffRial();
|
||||
$feeSingle = (float) $this->get('fee_single', 0);
|
||||
|
||||
$openBuy = true;
|
||||
|
||||
@@ -131,8 +131,8 @@ class LivePriceCacheService
|
||||
|
||||
$payload['up'] = $config->resolvedDailyBaseExtremes()['up'] > 0
|
||||
? [
|
||||
'sell' => max(0, (int) ceil($config->resolvedDailyBaseExtremes()['down'] - $config->displaySellSpreadRial())),
|
||||
'buy' => (int) ceil($config->resolvedDailyBaseExtremes()['up'] + $config->displayBuySpreadRial()),
|
||||
'sell' => max(0, (int) ceil($config->resolvedDailyBaseExtremes()['down'] - $config->displaySellPriceDiffRial())),
|
||||
'buy' => (int) ceil($config->resolvedDailyBaseExtremes()['up'] + $config->displayBuyPriceDiffRial()),
|
||||
]
|
||||
: ['sell' => $payload['sell'] ?? 0, 'buy' => $payload['buy'] ?? 0];
|
||||
$payload['last_historical'] = $display->resolveHistoricalBasePrice();
|
||||
|
||||
@@ -465,8 +465,8 @@ class ProductDisplayPriceService
|
||||
}
|
||||
}
|
||||
|
||||
$diffBuy = (int) $config->displayBuySpreadRial();
|
||||
$diffSell = (int) $config->displaySellSpreadRial();
|
||||
$diffBuy = (int) $config->displayBuyPriceDiffRial();
|
||||
$diffSell = (int) $config->displaySellPriceDiffRial();
|
||||
|
||||
$payload = [
|
||||
'price' => $price,
|
||||
|
||||
Reference in New Issue
Block a user