This commit is contained in:
Mekan1206
2026-05-08 20:26:31 +05:00
parent 03c2e9a253
commit 009879b10d

View File

@@ -152,39 +152,39 @@ class MakePaymentNovaVisaMaster extends Action
->fullWidth()
->readonly()
->dependsOn('payment_amount', function (Text $field, NovaRequest $request, FormData $formData) use ($usd_to_tmt) {
$payment_amount = $formData->get('payment_amount');
// $payment_amount = $formData->get('payment_amount');
if ($payment_amount) {
$field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
} else {
$field->setValue('');
}
// if ($payment_amount) {
// $field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
// } else {
// $field->setValue('');
// }
}),
Hidden::make('usd_payment')
->dependsOn('payment_amount', function (Hidden $field, NovaRequest $request, FormData $formData) use ($usd_to_tmt) {
$payment_amount = $formData->get('payment_amount');
// $payment_amount = $formData->get('payment_amount');
if ($payment_amount) {
$field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
} else {
$field->setValue('');
}
// if ($payment_amount) {
// $field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
// } else {
// $field->setValue('');
// }
}),
Text::make(__('Jemi (TMT)'), 'total_amount')
->fullWidth()
->readonly()
->dependsOn('payment_amount', function ($field, $request, $formData) {
$payment_amount = $formData->get('payment_amount');
// $payment_amount = $formData->get('payment_amount');
if ($payment_amount) {
$field->setValue(
floatval(number_format($payment_amount, 2, '.', '')) + 115
);
} else {
$field->setValue('');
}
// if ($payment_amount) {
// $field->setValue(
// floatval(number_format($payment_amount, 2, '.', '')) + 115
// );
// } else {
// $field->setValue('');
// }
}),
Heading::make(Blade::render(<<<HTML