This commit is contained in:
2024-11-25 19:52:56 +05:00
parent 1cbb40bb51
commit 8c2a424f89
2 changed files with 2 additions and 4 deletions

View File

@@ -149,7 +149,7 @@ class MakePaymentNovaVisaMaster extends Action
Hidden::make('usd_payment') Hidden::make('usd_payment')
->dependsOn('payment_amount', function ($field, $request, $formData) use ($usd_to_tmt) { ->dependsOn('payment_amount', function ($field, $request, $formData) use ($usd_to_tmt) {
if (property_exists($formData, 'payment_amount')) { if ($formData->payment_amount) {
$field->setValue(number_format($formData->payment_amount / $usd_to_tmt, 2, '.', '')); $field->setValue(number_format($formData->payment_amount / $usd_to_tmt, 2, '.', ''));
} else { } else {
$field->setValue(''); $field->setValue('');
@@ -160,7 +160,7 @@ class MakePaymentNovaVisaMaster extends Action
->fullWidth() ->fullWidth()
->readonly() ->readonly()
->dependsOn('payment_amount', function ($field, $request, $formData) { ->dependsOn('payment_amount', function ($field, $request, $formData) {
if (property_exists($formData, 'payment_amount')) { if ($formData->payment_amount) {
$field->setValue( $field->setValue(
floatval(number_format($formData->payment_amount, 2, '.', '')) + 23 floatval(number_format($formData->payment_amount, 2, '.', '')) + 23
); );

View File

@@ -32,8 +32,6 @@ class MakeSberPaymentAction extends Action
{ {
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value'); $usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
info($fields);
if (! $usd_to_tmt || ! property_exists($fields, 'payment_amount') || ! property_exists($fields, 'usd_payment')) { if (! $usd_to_tmt || ! property_exists($fields, 'payment_amount') || ! property_exists($fields, 'usd_payment')) {
return ActionResponse::danger('Walýuta hasaby girizilmedik, operator bilen habarlaşmagyňyzy haýyş edýärin.'); return ActionResponse::danger('Walýuta hasaby girizilmedik, operator bilen habarlaşmagyňyzy haýyş edýärin.');
} }