This commit is contained in:
2025-09-09 10:48:46 +05:00
parent 7efad097ef
commit 4e1f286eb5
15 changed files with 64 additions and 31 deletions

View File

@@ -17,6 +17,7 @@ use Spatie\MediaLibrary\InteractsWithMedia;
* @property string $tmt_payment_amount
* @property string $usd_payment_amount
* @property bool $paid
* @property bool $synced_with_system
* @property \Illuminate\Support\Carbon $created_at
* @property \Illuminate\Support\Carbon $updated_at
*/
@@ -36,6 +37,16 @@ class SberPaymentOrderItem extends Model implements HasMedia
*/
protected $guarded = [];
/**
* The attributes that should be cast.
*
* @var array<string, string>
*/
protected $casts = [
'paid' => 'boolean',
'synced_with_system' => 'boolean',
];
/**
* Parent order
*

View File

@@ -74,16 +74,16 @@ class SberPaymentOrderFieldsForDetail
new Panel(__('Payment'), [
Text::make(__('Payment sender data'), function () use ($resource) {
return sprintf(
'<strong>%s-%s %s</strong>',
$resource->sender_passport_serie,
$resource->sender_passport_number,
'<strong>%s-%s %s</strong>',
$resource->sender_passport_serie,
$resource->sender_passport_number,
$resource->sender_full_name
);
})->asHtml(),
Text::make(__('Töleg ugradyjynyň goýum hasaby'), function () use ($resource) {
return sprintf(
'<strong>%s</strong>',
'<strong>%s</strong>',
number_format($resource->sender_deposit_account, 0, '', '')
);
})->asHtml(),

View File

@@ -10,7 +10,6 @@ use App\Nova\Actions\MakeSberPaymentAction;
use App\Nova\Filters\VisaMasterMonthlyPaidFilter;
use App\Nova\Resource;
use App\Nova\User;
use Illuminate\Support\Facades\Validator;
use App\Repos\Order\Card\CardOrderRepo;
use App\Repos\Order\OrderRepo;
use App\Repos\System\Nova\NovaRepo;
@@ -261,19 +260,19 @@ class NovaSberPaymentOrder extends Resource
->rules('required')
->fullWidth()
->sortable(),
NovaInputmask::make(__('Passport number'), 'sender_passport_number')
->mask('999999')
->fullWidth()
->rules('required', 'max:255'),
Text::make(
name: sprintf('%s %s %s', __('Name'), __('Surname'), __('Patronic name')),
attribute: 'sender_full_name'
)
->fullWidth()
->rules('required', 'max:255'),
Text::make(
name: __('Goýum hasaby'),
attribute: 'sender_deposit_account'

View File

@@ -120,6 +120,8 @@ class NovaSberPaymentOrderItem extends Resource
Text::make('Amalyň referensi', fn ($model) => $model->payment_order_number),
Boolean::make(__('Paid'), 'paid'),
Boolean::make(__('Synced with system'), 'synced_with_system'),
];
}