added banks logos

This commit is contained in:
2026-07-06 13:39:05 +03:30
parent 2f48b88cf6
commit 0f775d20e8
3 changed files with 16 additions and 4 deletions
@@ -183,7 +183,7 @@ class ReportController extends Controller
if ($forceRefresh) {
$this->recordHalfHourPriceSnapshot(
(int) ($storePayload['buy'] ?? 0),
'store',
(string) ($storePayload['price_source'] ?? 'store'),
null,
(int) ($storePayload['price'] ?? $storePayload['buy'] ?? 0)
);
@@ -450,6 +450,7 @@ class ReportController extends Controller
'buy' => $buy,
'price_last' => $priceLast,
'price' => $priceValue,
'price_source' => $priceSource,
'main_product' => $pr_price ?? 0,
'montzar' => $montzar_price ?? 0,
'zaarbox' => $zaarbox_price ?? 0,
@@ -464,7 +465,12 @@ class ReportController extends Controller
?string $sourceUrl,
int $referencePrice
): void {
if ($buyPrice <= 0) {
if ($buyPrice <= 0 && $referencePrice <= 0) {
return;
}
// فقط fallback دیتابیس — مظنهٔ زنده نیست؛ لاگ/رکورد جدید نساز (همان قیمت دیشب تکرار می‌شود).
if ($source === 'database_last') {
return;
}
@@ -582,6 +588,7 @@ class ReportController extends Controller
'buy' => $display['buy'],
'price_last' => $display['priceLast'],
'price' => $priceValue,
'price_source' => $priceSource,
'tala_ir' => $talaIr,
];