update
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user