changed logic in rfq chart
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s

This commit is contained in:
dhanabalan
2026-01-23 15:11:41 +05:30
parent 2f470c5c54
commit 9ae6dede23

View File

@@ -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 => '🥈',