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;
|
||||
|
||||
// $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()
|
||||
->where('request_quotation_id', $rfqNumber) // 🔥 MISSING CONDITION
|
||||
->whereRaw(
|
||||
'CAST(total_freight_charge AS DECIMAL(10,2)) < ?',
|
||||
[$myAmount]
|
||||
@@ -107,6 +116,7 @@ class RfqChart extends BaseWidget
|
||||
->distinct()
|
||||
->count() + 1;
|
||||
|
||||
|
||||
$medal = match (true) {
|
||||
$rank == 1 => '🥇',
|
||||
$rank == 2 => '🥈',
|
||||
|
||||
Reference in New Issue
Block a user