Naser remove refpricer from last api
This commit is contained in:
@@ -133,11 +133,11 @@ class ReportController extends Controller
|
||||
|
||||
$main_product_id = Cnt::where('key', 'main_product')->first()['value'];
|
||||
$refpricer = new ProductController();
|
||||
if ($refpricer->getPrice()) {
|
||||
$ref = true;
|
||||
} else {
|
||||
$ref = false;
|
||||
}
|
||||
// if ($refpricer->getPrice()) {
|
||||
// $ref = true;
|
||||
// } else {
|
||||
// $ref = false;
|
||||
// }
|
||||
$pr_product = Product::find($main_product_id);
|
||||
|
||||
try {
|
||||
@@ -145,7 +145,7 @@ class ReportController extends Controller
|
||||
$tgn = (int)$taban_gohar['c']*10;
|
||||
}catch (\Exception $e){$tgn = 0;}
|
||||
|
||||
$priceValue = $tgn !== 0 ? $tgn : $pr_product['price'] + $pr_product['price_profit'];//$tala_ir;//4000
|
||||
$priceValue = /*$tgn !== 0 ? $tgn : */$pr_product['price'] + $pr_product['price_profit'];//$tala_ir;//4000
|
||||
$lastPrice = Price::latest()->first();
|
||||
if (!$lastPrice || $lastPrice->price != $priceValue and $priceValue > 30000000) {
|
||||
$price = new Price();
|
||||
@@ -185,7 +185,7 @@ class ReportController extends Controller
|
||||
// 'milli' => $milli,
|
||||
'main_product' => $pr_product['price'] + $pr_product['price_profit'],
|
||||
'taban_gohar' => $tgn,
|
||||
'refpricer' => $ref
|
||||
// 'refpricer' => $ref
|
||||
];
|
||||
} else {
|
||||
return [];
|
||||
|
||||
Reference in New Issue
Block a user