This commit is contained in:
2024-10-30 17:41:27 +05:00
parent 379f756526
commit 975662d79c

View File

@@ -64,8 +64,8 @@ class MakeSberPaymentAction extends Action
public function fields(NovaRequest $request)
{
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
$usd_to_rub = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'RUB')->first('value');
$rub_to_tmt = CurrencyRate::where('currency_from', 'RUB')->where('currency_to', 'TMT')->first('value');
$usd_to_rub = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'RUB')->first('value')?->value;
$rub_to_tmt = CurrencyRate::where('currency_from', 'RUB')->where('currency_to', 'TMT')->first('value')?->value;
if (! $usd_to_tmt || ! $usd_to_rub || ! $rub_to_tmt) {
return [];