wip
This commit is contained in:
@@ -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
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user