update
This commit is contained in:
@@ -152,39 +152,39 @@ class MakePaymentNovaVisaMaster extends Action
|
|||||||
->fullWidth()
|
->fullWidth()
|
||||||
->readonly()
|
->readonly()
|
||||||
->dependsOn('payment_amount', function (Text $field, NovaRequest $request, FormData $formData) use ($usd_to_tmt) {
|
->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) {
|
// if ($payment_amount) {
|
||||||
$field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
|
// $field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
|
||||||
} else {
|
// } else {
|
||||||
$field->setValue('');
|
// $field->setValue('');
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Hidden::make('usd_payment')
|
Hidden::make('usd_payment')
|
||||||
->dependsOn('payment_amount', function (Hidden $field, NovaRequest $request, FormData $formData) use ($usd_to_tmt) {
|
->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) {
|
// if ($payment_amount) {
|
||||||
$field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
|
// $field->setValue(number_format($payment_amount / $usd_to_tmt, 2, '.', ''));
|
||||||
} else {
|
// } else {
|
||||||
$field->setValue('');
|
// $field->setValue('');
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Text::make(__('Jemi (TMT)'), 'total_amount')
|
Text::make(__('Jemi (TMT)'), 'total_amount')
|
||||||
->fullWidth()
|
->fullWidth()
|
||||||
->readonly()
|
->readonly()
|
||||||
->dependsOn('payment_amount', function ($field, $request, $formData) {
|
->dependsOn('payment_amount', function ($field, $request, $formData) {
|
||||||
$payment_amount = $formData->get('payment_amount');
|
// $payment_amount = $formData->get('payment_amount');
|
||||||
|
|
||||||
if ($payment_amount) {
|
// if ($payment_amount) {
|
||||||
$field->setValue(
|
// $field->setValue(
|
||||||
floatval(number_format($payment_amount, 2, '.', '')) + 115
|
// floatval(number_format($payment_amount, 2, '.', '')) + 115
|
||||||
);
|
// );
|
||||||
} else {
|
// } else {
|
||||||
$field->setValue('');
|
// $field->setValue('');
|
||||||
}
|
// }
|
||||||
}),
|
}),
|
||||||
|
|
||||||
Heading::make(Blade::render(<<<HTML
|
Heading::make(Blade::render(<<<HTML
|
||||||
|
|||||||
Reference in New Issue
Block a user