changed logic in rfq chart
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
This commit is contained in:
@@ -98,7 +98,16 @@ class RfqChart extends BaseWidget
|
|||||||
|
|
||||||
$myAmount = (float) $selectedRfq->total_freight_charge;
|
$myAmount = (float) $selectedRfq->total_freight_charge;
|
||||||
|
|
||||||
|
// $rank = RfqTransporterBid::query()
|
||||||
|
// ->whereRaw(
|
||||||
|
// 'CAST(total_freight_charge AS DECIMAL(10,2)) < ?',
|
||||||
|
// [$myAmount]
|
||||||
|
// )
|
||||||
|
// ->selectRaw('CAST(total_freight_charge AS DECIMAL(10,2))')
|
||||||
|
// ->distinct()
|
||||||
|
// ->count() + 1;
|
||||||
$rank = RfqTransporterBid::query()
|
$rank = RfqTransporterBid::query()
|
||||||
|
->where('request_quotation_id', $rfqNumber) // 🔥 MISSING CONDITION
|
||||||
->whereRaw(
|
->whereRaw(
|
||||||
'CAST(total_freight_charge AS DECIMAL(10,2)) < ?',
|
'CAST(total_freight_charge AS DECIMAL(10,2)) < ?',
|
||||||
[$myAmount]
|
[$myAmount]
|
||||||
@@ -107,6 +116,7 @@ class RfqChart extends BaseWidget
|
|||||||
->distinct()
|
->distinct()
|
||||||
->count() + 1;
|
->count() + 1;
|
||||||
|
|
||||||
|
|
||||||
$medal = match (true) {
|
$medal = match (true) {
|
||||||
$rank == 1 => '🥇',
|
$rank == 1 => '🥇',
|
||||||
$rank == 2 => '🥈',
|
$rank == 2 => '🥈',
|
||||||
|
|||||||
Reference in New Issue
Block a user