before
This commit is contained in:
@@ -128,7 +128,8 @@ class ReportController extends Controller
|
|||||||
|
|
||||||
$main_product_id = Cnt::where('key', 'main_product')->first()['value'];
|
$main_product_id = Cnt::where('key', 'main_product')->first()['value'];
|
||||||
$pr_product = Product::find($main_product_id);
|
$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
|
$priceValue = $pr_product['price'] + $pr_product['price_profit'];//$tala_ir;//4000
|
||||||
$lastPrice = Price::latest()->first();
|
$lastPrice = Price::latest()->first();
|
||||||
if (!$lastPrice || $lastPrice->price != $priceValue and $priceValue > 30000000) {
|
if (!$lastPrice || $lastPrice->price != $priceValue and $priceValue > 30000000) {
|
||||||
@@ -167,7 +168,8 @@ class ReportController extends Controller
|
|||||||
// 'henzagold' => $henzagold_18,
|
// 'henzagold' => $henzagold_18,
|
||||||
// 'Ounce' => $henzagold_ons_gold,
|
// 'Ounce' => $henzagold_ons_gold,
|
||||||
// 'milli' => $milli,
|
// 'milli' => $milli,
|
||||||
'main_product' => $pr_product['price'] + $pr_product['price_profit']
|
'main_product' => $pr_product['price'] + $pr_product['price_profit'],
|
||||||
|
'refpricer' => $ref
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user