This commit is contained in:
2024-10-18 21:29:49 +05:00
parent 95250a207f
commit 272e4504ab

View File

@@ -95,7 +95,7 @@ class MakePaymentNovaVisaMaster extends Action
->readonly() ->readonly()
->dependsOn('payment_amount', function ($field, $request, $formData) use ($usd_to_tmt) { ->dependsOn('payment_amount', function ($field, $request, $formData) use ($usd_to_tmt) {
if ($formData->payment_amount) { if ($formData->payment_amount) {
$field->setValue(number_format($formData->payment_amount / $usd_to_tmt->value, 2)); $field->setValue(number_format($formData->payment_amount / $usd_to_tmt->value, 2, '.', ''));
} else { } else {
$field->setValue(''); $field->setValue('');
} }
@@ -105,9 +105,9 @@ class MakePaymentNovaVisaMaster extends Action
->fullWidth() ->fullWidth()
->readonly() ->readonly()
->dependsOn('payment_amount', function ($field, $request, $formData) { ->dependsOn('payment_amount', function ($field, $request, $formData) {
if ($formData->payment_amount) { if (is_numeric($formData->payment_amount)) {
$field->setValue( $field->setValue(
floatval(number_format($formData->payment_amount, 2)) + 23 floatval(number_format($formData->payment_amount, 2, '', '')) + 23
); );
} else { } else {
$field->setValue(''); $field->setValue('');