This commit is contained in:
gholak tala
2026-02-05 06:14:14 +00:00
parent 6c30722d7d
commit 329fd18d5e
@@ -128,7 +128,8 @@ class ReportController extends Controller
$main_product_id = Cnt::where('key', 'main_product')->first()['value'];
$pr_product = Product::find($main_product_id);
$ref = Http::timeout(40)->get('https://garoosigholaktala.ir/server/refPricer', [])->json();
$priceValue = $pr_product['price'] + $pr_product['price_profit'];//$tala_ir;//4000
$lastPrice = Price::latest()->first();
if (!$lastPrice || $lastPrice->price != $priceValue and $priceValue > 30000000) {
@@ -167,7 +168,8 @@ class ReportController extends Controller
// 'henzagold' => $henzagold_18,
// 'Ounce' => $henzagold_ons_gold,
// 'milli' => $milli,
'main_product' => $pr_product['price'] + $pr_product['price_profit']
'main_product' => $pr_product['price'] + $pr_product['price_profit'],
'refpricer' => $ref
];
} else {
return [];