Files
2026-04-25 04:04:14 +00:00

65 lines
2.4 KiB
PHP

<?php
namespace App\Filament\Resources\Settlements\Schemas;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Schema;
class SettlementForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Grid::make(3)
->schema([
Section::make('Thông tin quyết toán')
->columnSpan(2)
->columns(2)
->schema([
Select::make('product_id')
->label('Sản phẩm')
->relationship('product', 'code')
->searchable()
->preload()
->required(),
TextInput::make('type')
->label('Loại quyết toán')
->required(),
TextInput::make('temp_value')
->label('Giá trị tạm tính')
->numeric()
->prefix('VND')
->required(),
TextInput::make('final_value')
->label('Giá trị chốt')
->numeric()
->prefix('VND')
->required(),
TextInput::make('difference')
->label('Chênh lệch')
->numeric()
->prefix('VND')
->required(),
TextInput::make('red_book_status')
->label('Trạng thái sổ đỏ')
->required(),
DatePicker::make('issue_date')
->label('Ngày cấp sổ')
->nullable(),
]),
]),
]);
}
}