Andrew Wallo 10 månader sedan
förälder
incheckning
6331e5b9dc

+ 252
- 0
app/Filament/Company/Resources/Accounting/DocumentResource.php Visa fil

@@ -0,0 +1,252 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Resources\Accounting;
4
+
5
+use App\Filament\Company\Resources\Accounting\DocumentResource\Pages;
6
+use App\Models\Accounting\Document;
7
+use App\Models\Common\Offering;
8
+use Awcodes\TableRepeater\Components\TableRepeater;
9
+use Awcodes\TableRepeater\Header;
10
+use Filament\Forms;
11
+use Filament\Forms\Components\FileUpload;
12
+use Filament\Forms\Form;
13
+use Filament\Resources\Resource;
14
+use Filament\Support\Enums\MaxWidth;
15
+use Filament\Tables;
16
+use Filament\Tables\Table;
17
+use Illuminate\Support\Facades\Auth;
18
+use Livewire\Features\SupportFileUploads\TemporaryUploadedFile;
19
+
20
+class DocumentResource extends Resource
21
+{
22
+    protected static ?string $model = Document::class;
23
+
24
+    protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
25
+
26
+    public static function form(Form $form): Form
27
+    {
28
+        $company = Auth::user()->currentCompany;
29
+
30
+        return $form
31
+            ->schema([
32
+                Forms\Components\Section::make('Invoice Header')
33
+                    ->collapsible()
34
+                    ->schema([
35
+                        Forms\Components\Split::make([
36
+                            Forms\Components\Group::make([
37
+                                FileUpload::make('logo')
38
+                                    ->openable()
39
+                                    ->maxSize(1024)
40
+                                    ->localizeLabel()
41
+                                    ->visibility('public')
42
+                                    ->disk('public')
43
+                                    ->directory('logos/document')
44
+                                    ->imageResizeMode('contain')
45
+                                    ->imageCropAspectRatio('3:2')
46
+                                    ->panelAspectRatio('3:2')
47
+                                    ->maxWidth(MaxWidth::ExtraSmall)
48
+                                    ->panelLayout('integrated')
49
+                                    ->removeUploadedFileButtonPosition('center bottom')
50
+                                    ->uploadButtonPosition('center bottom')
51
+                                    ->uploadProgressIndicatorPosition('center bottom')
52
+                                    ->getUploadedFileNameForStorageUsing(
53
+                                        static fn (TemporaryUploadedFile $file): string => (string) str($file->getClientOriginalName())
54
+                                            ->prepend(Auth::user()->currentCompany->id . '_'),
55
+                                    )
56
+                                    ->acceptedFileTypes(['image/png', 'image/jpeg', 'image/gif']),
57
+                            ]),
58
+                            Forms\Components\Group::make([
59
+                                Forms\Components\TextInput::make('header')
60
+                                    ->default(fn () => $company->defaultInvoice->header),
61
+                                Forms\Components\TextInput::make('subheader')
62
+                                    ->default(fn () => $company->defaultInvoice->subheader),
63
+                                Forms\Components\View::make('filament.forms.components.company-info')
64
+                                    ->viewData([
65
+                                        'company_name' => $company->name,
66
+                                        'company_address' => $company->profile->address,
67
+                                        'company_city' => $company->profile->city?->name,
68
+                                        'company_state' => $company->profile->state?->name,
69
+                                        'company_zip' => $company->profile->zip_code,
70
+                                        'company_country' => $company->profile->state?->country->name,
71
+                                    ]),
72
+                            ])->grow(true),
73
+                        ])->from('md'),
74
+                    ]),
75
+                Forms\Components\Section::make('Invoice Details')
76
+                    ->schema([
77
+                        Forms\Components\Split::make([
78
+                            Forms\Components\Group::make([
79
+                                Forms\Components\Select::make('client_id')
80
+                                    ->relationship('client', 'name'),
81
+                            ]),
82
+                            Forms\Components\Group::make([
83
+                                Forms\Components\TextInput::make('document_number')
84
+                                    ->label('Invoice Number')
85
+                                    ->default(fn () => $company->defaultInvoice->getNumberNext()),
86
+                                Forms\Components\TextInput::make('order_number')
87
+                                    ->label('P.O/S.O Number'),
88
+                                Forms\Components\DatePicker::make('date')
89
+                                    ->label('Invoice Date')
90
+                                    ->default(now()),
91
+                                Forms\Components\DatePicker::make('due_date')
92
+                                    ->label('Payment Due')
93
+                                    ->default(function () use ($company) {
94
+                                        return now()->addDays($company->defaultInvoice->payment_terms->getDays());
95
+                                    }),
96
+                            ])->grow(true),
97
+                        ])->from('md'),
98
+                        TableRepeater::make('lineItems')
99
+                            ->relationship()
100
+                            ->headers([
101
+                                Header::make('Items'),
102
+                                Header::make('Description'),
103
+                                Header::make('Quantity'),
104
+                                Header::make('Price'),
105
+                                Header::make('Amount'),
106
+                            ])
107
+                            ->schema([
108
+                                Forms\Components\Select::make('offering_id')
109
+                                    ->relationship('offering', 'name')
110
+                                    ->preload()
111
+                                    ->searchable()
112
+                                    ->required()
113
+                                    ->live()
114
+                                    ->afterStateUpdated(function (Forms\Set $set, $state) {
115
+                                        $offeringId = $state;
116
+                                        $offeringRecord = Offering::find($offeringId);
117
+                                        $set('description', $offeringRecord->description);
118
+                                        $set('unit_price', $offeringRecord->price);
119
+                                        $set('total', $offeringRecord->price);
120
+                                    }),
121
+                                Forms\Components\TextInput::make('description')
122
+                                    ->required(),
123
+                                Forms\Components\TextInput::make('quantity')
124
+                                    ->required()
125
+                                    ->numeric()
126
+                                    ->live()
127
+                                    ->default(1),
128
+                                Forms\Components\TextInput::make('unit_price')
129
+                                    ->required()
130
+                                    ->live()
131
+                                    ->numeric()
132
+                                    ->default(0),
133
+                                Forms\Components\Placeholder::make('total')
134
+                                    ->hiddenLabel()
135
+                                    ->content(function (Forms\Get $get) {
136
+                                        $quantity = $get('quantity');
137
+                                        $unitPrice = $get('unit_price');
138
+
139
+                                        if ($quantity && $unitPrice) {
140
+                                            return $quantity * $unitPrice;
141
+                                        }
142
+                                    }),
143
+                            ]),
144
+                        Forms\Components\Textarea::make('terms')
145
+                            ->columnSpanFull(),
146
+                    ]),
147
+                Forms\Components\Section::make('Invoice Footer')
148
+                    ->collapsible()
149
+                    ->schema([
150
+                        Forms\Components\Textarea::make('footer')
151
+                            ->columnSpanFull(),
152
+                    ]),
153
+            ]);
154
+    }
155
+
156
+    public static function table(Table $table): Table
157
+    {
158
+        return $table
159
+            ->columns([
160
+                Tables\Columns\TextColumn::make('company.name')
161
+                    ->numeric()
162
+                    ->sortable(),
163
+                Tables\Columns\TextColumn::make('client.name')
164
+                    ->numeric()
165
+                    ->sortable(),
166
+                Tables\Columns\TextColumn::make('vendor.name')
167
+                    ->numeric()
168
+                    ->sortable(),
169
+                Tables\Columns\TextColumn::make('type')
170
+                    ->searchable(),
171
+                Tables\Columns\TextColumn::make('logo')
172
+                    ->searchable(),
173
+                Tables\Columns\TextColumn::make('header')
174
+                    ->searchable(),
175
+                Tables\Columns\TextColumn::make('subheader')
176
+                    ->searchable(),
177
+                Tables\Columns\TextColumn::make('document_number')
178
+                    ->searchable(),
179
+                Tables\Columns\TextColumn::make('order_number')
180
+                    ->searchable(),
181
+                Tables\Columns\TextColumn::make('date')
182
+                    ->date()
183
+                    ->sortable(),
184
+                Tables\Columns\TextColumn::make('due_date')
185
+                    ->date()
186
+                    ->sortable(),
187
+                Tables\Columns\TextColumn::make('status')
188
+                    ->searchable(),
189
+                Tables\Columns\TextColumn::make('currency_code')
190
+                    ->searchable(),
191
+                Tables\Columns\TextColumn::make('subtotal')
192
+                    ->numeric()
193
+                    ->sortable(),
194
+                Tables\Columns\TextColumn::make('tax_total')
195
+                    ->numeric()
196
+                    ->sortable(),
197
+                Tables\Columns\TextColumn::make('discount_total')
198
+                    ->numeric()
199
+                    ->sortable(),
200
+                Tables\Columns\TextColumn::make('total')
201
+                    ->numeric()
202
+                    ->sortable(),
203
+                Tables\Columns\TextColumn::make('amount_paid')
204
+                    ->numeric()
205
+                    ->sortable(),
206
+                Tables\Columns\TextColumn::make('amount_due')
207
+                    ->numeric()
208
+                    ->sortable(),
209
+                Tables\Columns\TextColumn::make('created_by')
210
+                    ->numeric()
211
+                    ->sortable(),
212
+                Tables\Columns\TextColumn::make('updated_by')
213
+                    ->numeric()
214
+                    ->sortable(),
215
+                Tables\Columns\TextColumn::make('created_at')
216
+                    ->dateTime()
217
+                    ->sortable()
218
+                    ->toggleable(isToggledHiddenByDefault: true),
219
+                Tables\Columns\TextColumn::make('updated_at')
220
+                    ->dateTime()
221
+                    ->sortable()
222
+                    ->toggleable(isToggledHiddenByDefault: true),
223
+            ])
224
+            ->filters([
225
+                //
226
+            ])
227
+            ->actions([
228
+                Tables\Actions\EditAction::make(),
229
+            ])
230
+            ->bulkActions([
231
+                Tables\Actions\BulkActionGroup::make([
232
+                    Tables\Actions\DeleteBulkAction::make(),
233
+                ]),
234
+            ]);
235
+    }
236
+
237
+    public static function getRelations(): array
238
+    {
239
+        return [
240
+            //
241
+        ];
242
+    }
243
+
244
+    public static function getPages(): array
245
+    {
246
+        return [
247
+            'index' => Pages\ListDocuments::route('/'),
248
+            'create' => Pages\CreateDocument::route('/create'),
249
+            'edit' => Pages\EditDocument::route('/{record}/edit'),
250
+        ];
251
+    }
252
+}

+ 11
- 0
app/Filament/Company/Resources/Accounting/DocumentResource/Pages/CreateDocument.php Visa fil

@@ -0,0 +1,11 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Resources\Accounting\DocumentResource\Pages;
4
+
5
+use App\Filament\Company\Resources\Accounting\DocumentResource;
6
+use Filament\Resources\Pages\CreateRecord;
7
+
8
+class CreateDocument extends CreateRecord
9
+{
10
+    protected static string $resource = DocumentResource::class;
11
+}

+ 19
- 0
app/Filament/Company/Resources/Accounting/DocumentResource/Pages/EditDocument.php Visa fil

@@ -0,0 +1,19 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Resources\Accounting\DocumentResource\Pages;
4
+
5
+use App\Filament\Company\Resources\Accounting\DocumentResource;
6
+use Filament\Actions;
7
+use Filament\Resources\Pages\EditRecord;
8
+
9
+class EditDocument extends EditRecord
10
+{
11
+    protected static string $resource = DocumentResource::class;
12
+
13
+    protected function getHeaderActions(): array
14
+    {
15
+        return [
16
+            Actions\DeleteAction::make(),
17
+        ];
18
+    }
19
+}

+ 19
- 0
app/Filament/Company/Resources/Accounting/DocumentResource/Pages/ListDocuments.php Visa fil

@@ -0,0 +1,19 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Resources\Accounting\DocumentResource\Pages;
4
+
5
+use App\Filament\Company\Resources\Accounting\DocumentResource;
6
+use Filament\Actions;
7
+use Filament\Resources\Pages\ListRecords;
8
+
9
+class ListDocuments extends ListRecords
10
+{
11
+    protected static string $resource = DocumentResource::class;
12
+
13
+    protected function getHeaderActions(): array
14
+    {
15
+        return [
16
+            Actions\CreateAction::make(),
17
+        ];
18
+    }
19
+}

+ 9
- 2
app/Filament/Company/Resources/Common/VendorResource.php Visa fil

@@ -43,6 +43,7 @@ class VendorResource extends Resource
43 43
                                     ->columnSpanFull(),
44 44
                                 CreateCurrencySelect::make('currency_code')
45 45
                                     ->relationship('currency', 'name')
46
+                                    ->nullable()
46 47
                                     ->visible(fn (Forms\Get $get) => VendorType::parse($get('type')) === VendorType::Regular),
47 48
                                 Forms\Components\Select::make('contractor_type')
48 49
                                     ->label('Contractor Type')
@@ -54,12 +55,18 @@ class VendorResource extends Resource
54 55
                                     ->label('Social Security Number')
55 56
                                     ->required()
56 57
                                     ->live()
58
+                                    ->mask('999-99-9999')
59
+                                    ->stripCharacters('-')
60
+                                    ->maxLength(11)
57 61
                                     ->visible(fn (Forms\Get $get) => ContractorType::parse($get('contractor_type')) === ContractorType::Individual)
58 62
                                     ->maxLength(255),
59 63
                                 Forms\Components\TextInput::make('ein')
60 64
                                     ->label('Employer Identification Number')
61 65
                                     ->required()
62 66
                                     ->live()
67
+                                    ->mask('99-9999999')
68
+                                    ->stripCharacters('-')
69
+                                    ->maxLength(10)
63 70
                                     ->visible(fn (Forms\Get $get) => ContractorType::parse($get('contractor_type')) === ContractorType::Business)
64 71
                                     ->maxLength(255),
65 72
                                 Forms\Components\TextInput::make('account_number')
@@ -174,13 +181,13 @@ class VendorResource extends Resource
174 181
                     ->searchable(),
175 182
                 Tables\Columns\TextColumn::make('name')
176 183
                     ->searchable()
177
-                    ->description(fn (Vendor $vendor) => $vendor->contact->full_name),
184
+                    ->description(fn (Vendor $vendor) => $vendor->contact?->full_name),
178 185
                 Tables\Columns\TextColumn::make('contact.email')
179 186
                     ->label('Email')
180 187
                     ->searchable(),
181 188
                 Tables\Columns\TextColumn::make('primaryContact.phones')
182 189
                     ->label('Phone')
183
-                    ->state(fn (Vendor $vendor) => $vendor->contact->primary_phone),
190
+                    ->state(fn (Vendor $vendor) => $vendor->contact?->primary_phone),
184 191
             ])
185 192
             ->filters([
186 193
                 //

+ 67
- 1
app/Models/Accounting/Document.php Visa fil

@@ -2,11 +2,77 @@
2 2
 
3 3
 namespace App\Models\Accounting;
4 4
 
5
+use App\Casts\MoneyCast;
6
+use App\Concerns\Blamable;
7
+use App\Concerns\CompanyOwned;
8
+use App\Models\Banking\Payment;
9
+use App\Models\Common\Client;
10
+use App\Models\Common\Vendor;
5 11
 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 12
 use Illuminate\Database\Eloquent\Model;
13
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
14
+use Illuminate\Database\Eloquent\Relations\HasMany;
7 15
 
8 16
 class Document extends Model
9 17
 {
10
-    /** @use HasFactory<\Database\Factories\Accounting\DocumentFactory> */
18
+    use Blamable;
19
+    use CompanyOwned;
11 20
     use HasFactory;
21
+
22
+    protected $table = 'documents';
23
+
24
+    protected $fillable = [
25
+        'company_id',
26
+        'client_id',
27
+        'vendor_id',
28
+        'type',
29
+        'logo',
30
+        'header',
31
+        'subheader',
32
+        'document_number',
33
+        'order_number',
34
+        'date',
35
+        'due_date',
36
+        'status',
37
+        'currency_code',
38
+        'subtotal',
39
+        'tax_total',
40
+        'discount_total',
41
+        'total',
42
+        'amount_paid',
43
+        'terms',
44
+        'footer',
45
+        'created_by',
46
+        'updated_by',
47
+    ];
48
+
49
+    protected $casts = [
50
+        'date' => 'date',
51
+        'due_date' => 'date',
52
+        'subtotal' => MoneyCast::class,
53
+        'tax_total' => MoneyCast::class,
54
+        'discount_total' => MoneyCast::class,
55
+        'total' => MoneyCast::class,
56
+        'amount_paid' => MoneyCast::class,
57
+    ];
58
+
59
+    public function client(): BelongsTo
60
+    {
61
+        return $this->belongsTo(Client::class);
62
+    }
63
+
64
+    public function vendor(): BelongsTo
65
+    {
66
+        return $this->belongsTo(Vendor::class);
67
+    }
68
+
69
+    public function lineItems(): HasMany
70
+    {
71
+        return $this->hasMany(DocumentLineItem::class);
72
+    }
73
+
74
+    public function payments(): HasMany
75
+    {
76
+        return $this->hasMany(Payment::class);
77
+    }
12 78
 }

+ 57
- 1
app/Models/Accounting/DocumentLineItem.php Visa fil

@@ -2,11 +2,67 @@
2 2
 
3 3
 namespace App\Models\Accounting;
4 4
 
5
+use App\Casts\MoneyCast;
6
+use App\Concerns\Blamable;
7
+use App\Concerns\CompanyOwned;
8
+use App\Enums\Accounting\AdjustmentCategory;
9
+use App\Models\Common\Offering;
5 10
 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 11
 use Illuminate\Database\Eloquent\Model;
12
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
13
+use Illuminate\Database\Eloquent\Relations\MorphToMany;
7 14
 
8 15
 class DocumentLineItem extends Model
9 16
 {
10
-    /** @use HasFactory<\Database\Factories\Accounting\DocumentLineItemFactory> */
17
+    use Blamable;
18
+    use CompanyOwned;
11 19
     use HasFactory;
20
+
21
+    protected $table = 'document_line_items';
22
+
23
+    protected $fillable = [
24
+        'company_id',
25
+        'document_id',
26
+        'offering_id',
27
+        'description',
28
+        'quantity',
29
+        'unit_price',
30
+        'total',
31
+        'tax_total',
32
+        'discount_total',
33
+        'created_by',
34
+        'updated_by',
35
+    ];
36
+
37
+    protected $casts = [
38
+        'unit_price' => MoneyCast::class,
39
+        'total' => MoneyCast::class,
40
+        'tax_total' => MoneyCast::class,
41
+        'discount_total' => MoneyCast::class,
42
+    ];
43
+
44
+    public function document(): BelongsTo
45
+    {
46
+        return $this->belongsTo(Document::class);
47
+    }
48
+
49
+    public function offering(): BelongsTo
50
+    {
51
+        return $this->belongsTo(Offering::class);
52
+    }
53
+
54
+    public function adjustments(): MorphToMany
55
+    {
56
+        return $this->morphToMany(Adjustment::class, 'adjustmentable', 'adjustmentables');
57
+    }
58
+
59
+    public function taxes(): MorphToMany
60
+    {
61
+        return $this->adjustments()->where('category', AdjustmentCategory::Tax);
62
+    }
63
+
64
+    public function discounts(): MorphToMany
65
+    {
66
+        return $this->adjustments()->where('category', AdjustmentCategory::Discount);
67
+    }
12 68
 }

+ 34
- 1
app/Models/Banking/Payment.php Visa fil

@@ -2,11 +2,44 @@
2 2
 
3 3
 namespace App\Models\Banking;
4 4
 
5
+use App\Casts\MoneyCast;
6
+use App\Concerns\Blamable;
7
+use App\Concerns\CompanyOwned;
8
+use App\Models\Accounting\Document;
5 9
 use Illuminate\Database\Eloquent\Factories\HasFactory;
6 10
 use Illuminate\Database\Eloquent\Model;
11
+use Illuminate\Database\Eloquent\Relations\BelongsTo;
7 12
 
8 13
 class Payment extends Model
9 14
 {
10
-    /** @use HasFactory<\Database\Factories\Banking\PaymentFactory> */
15
+    use Blamable;
16
+    use CompanyOwned;
11 17
     use HasFactory;
18
+
19
+    protected $fillable = [
20
+        'company_id',
21
+        'document_id',
22
+        'date',
23
+        'amount',
24
+        'payment_method',
25
+        'bank_account_id',
26
+        'notes',
27
+        'created_by',
28
+        'updated_by',
29
+    ];
30
+
31
+    protected $casts = [
32
+        'date' => 'date',
33
+        'amount' => MoneyCast::class,
34
+    ];
35
+
36
+    public function document(): BelongsTo
37
+    {
38
+        return $this->belongsTo(Document::class);
39
+    }
40
+
41
+    public function bankAccount(): BelongsTo
42
+    {
43
+        return $this->belongsTo(BankAccount::class);
44
+    }
12 45
 }

+ 2
- 0
app/Providers/FilamentCompaniesServiceProvider.php Visa fil

@@ -25,6 +25,7 @@ use App\Filament\Company\Pages\ManageCompany;
25 25
 use App\Filament\Company\Pages\Reports;
26 26
 use App\Filament\Company\Pages\Service\ConnectedAccount;
27 27
 use App\Filament\Company\Pages\Service\LiveCurrency;
28
+use App\Filament\Company\Resources\Accounting\DocumentResource;
28 29
 use App\Filament\Company\Resources\Banking\AccountResource;
29 30
 use App\Filament\Company\Resources\Common\ClientResource;
30 31
 use App\Filament\Company\Resources\Common\OfferingResource;
@@ -136,6 +137,7 @@ class FilamentCompaniesServiceProvider extends PanelProvider
136 137
                             ->icon('heroicon-o-clipboard-document-list')
137 138
                             ->extraSidebarAttributes(['class' => 'es-sidebar-group'])
138 139
                             ->items([
140
+                                ...DocumentResource::getNavigationItems(),
139 141
                                 ...AccountChart::getNavigationItems(),
140 142
                                 ...Transactions::getNavigationItems(),
141 143
                             ]),

+ 23
- 0
database/migrations/2024_11_13_214900_create_documents_table.php Visa fil

@@ -13,6 +13,29 @@ return new class extends Migration
13 13
     {
14 14
         Schema::create('documents', function (Blueprint $table) {
15 15
             $table->id();
16
+            $table->foreignId('company_id')->constrained()->cascadeOnDelete();
17
+            $table->foreignId('client_id')->nullable()->constrained('clients')->nullOnDelete();
18
+            $table->foreignId('vendor_id')->nullable()->constrained('vendors')->nullOnDelete();
19
+            $table->string('type'); // invoice, bill, etc.
20
+            $table->string('logo')->nullable();
21
+            $table->string('header')->nullable();
22
+            $table->string('subheader')->nullable();
23
+            $table->string('document_number')->nullable();
24
+            $table->string('order_number')->nullable(); // PO, SO, etc.
25
+            $table->date('date')->nullable();
26
+            $table->date('due_date')->nullable();
27
+            $table->string('status')->default('draft');
28
+            $table->string('currency_code')->nullable();
29
+            $table->integer('subtotal')->default(0);
30
+            $table->integer('tax_total')->default(0);
31
+            $table->integer('discount_total')->default(0);
32
+            $table->integer('total')->default(0);
33
+            $table->integer('amount_paid')->default(0);
34
+            $table->integer('amount_due')->storedAs('total - amount_paid');
35
+            $table->text('terms')->nullable(); // terms, notes
36
+            $table->text('footer')->nullable();
37
+            $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
38
+            $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
16 39
             $table->timestamps();
17 40
         });
18 41
     }

+ 9
- 0
database/migrations/2024_11_13_215818_create_payments_table.php Visa fil

@@ -13,6 +13,15 @@ return new class extends Migration
13 13
     {
14 14
         Schema::create('payments', function (Blueprint $table) {
15 15
             $table->id();
16
+            $table->foreignId('company_id')->constrained()->cascadeOnDelete();
17
+            $table->foreignId('document_id')->constrained()->cascadeOnDelete();
18
+            $table->date('date');
19
+            $table->integer('amount');
20
+            $table->string('payment_method');
21
+            $table->foreignId('bank_account_id')->nullable()->constrained()->nullOnDelete();
22
+            $table->text('notes')->nullable();
23
+            $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
24
+            $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
16 25
             $table->timestamps();
17 26
         });
18 27
     }

+ 11
- 0
database/migrations/2024_11_13_220301_create_document_line_items_table.php Visa fil

@@ -13,6 +13,17 @@ return new class extends Migration
13 13
     {
14 14
         Schema::create('document_line_items', function (Blueprint $table) {
15 15
             $table->id();
16
+            $table->foreignId('company_id')->constrained()->cascadeOnDelete();
17
+            $table->foreignId('document_id')->constrained()->cascadeOnDelete();
18
+            $table->foreignId('offering_id')->nullable()->constrained()->nullOnDelete();
19
+            $table->string('description')->nullable();
20
+            $table->integer('quantity')->default(1);
21
+            $table->integer('unit_price')->default(0);
22
+            $table->integer('total')->default(0);
23
+            $table->integer('tax_total')->default(0);
24
+            $table->integer('discount_total')->default(0);
25
+            $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
26
+            $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
16 27
             $table->timestamps();
17 28
         });
18 29
     }

+ 75
- 75
package-lock.json Visa fil

@@ -541,9 +541,9 @@
541 541
             }
542 542
         },
543 543
         "node_modules/@rollup/rollup-android-arm-eabi": {
544
-            "version": "4.27.3",
545
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.3.tgz",
546
-            "integrity": "sha512-EzxVSkIvCFxUd4Mgm4xR9YXrcp976qVaHnqom/Tgm+vU79k4vV4eYTjmRvGfeoW8m9LVcsAy/lGjcgVegKEhLQ==",
544
+            "version": "4.27.4",
545
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.27.4.tgz",
546
+            "integrity": "sha512-2Y3JT6f5MrQkICUyRVCw4oa0sutfAsgaSsb0Lmmy1Wi2y7X5vT9Euqw4gOsCyy0YfKURBg35nhUKZS4mDcfULw==",
547 547
             "cpu": [
548 548
                 "arm"
549 549
             ],
@@ -555,9 +555,9 @@
555 555
             ]
556 556
         },
557 557
         "node_modules/@rollup/rollup-android-arm64": {
558
-            "version": "4.27.3",
559
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.3.tgz",
560
-            "integrity": "sha512-LJc5pDf1wjlt9o/Giaw9Ofl+k/vLUaYsE2zeQGH85giX2F+wn/Cg8b3c5CDP3qmVmeO5NzwVUzQQxwZvC2eQKw==",
558
+            "version": "4.27.4",
559
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.27.4.tgz",
560
+            "integrity": "sha512-wzKRQXISyi9UdCVRqEd0H4cMpzvHYt1f/C3CoIjES6cG++RHKhrBj2+29nPF0IB5kpy9MS71vs07fvrNGAl/iA==",
561 561
             "cpu": [
562 562
                 "arm64"
563 563
             ],
@@ -569,9 +569,9 @@
569 569
             ]
570 570
         },
571 571
         "node_modules/@rollup/rollup-darwin-arm64": {
572
-            "version": "4.27.3",
573
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.3.tgz",
574
-            "integrity": "sha512-OuRysZ1Mt7wpWJ+aYKblVbJWtVn3Cy52h8nLuNSzTqSesYw1EuN6wKp5NW/4eSre3mp12gqFRXOKTcN3AI3LqA==",
572
+            "version": "4.27.4",
573
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.27.4.tgz",
574
+            "integrity": "sha512-PlNiRQapift4LNS8DPUHuDX/IdXiLjf8mc5vdEmUR0fF/pyy2qWwzdLjB+iZquGr8LuN4LnUoSEvKRwjSVYz3Q==",
575 575
             "cpu": [
576 576
                 "arm64"
577 577
             ],
@@ -583,9 +583,9 @@
583 583
             ]
584 584
         },
585 585
         "node_modules/@rollup/rollup-darwin-x64": {
586
-            "version": "4.27.3",
587
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.3.tgz",
588
-            "integrity": "sha512-xW//zjJMlJs2sOrCmXdB4d0uiilZsOdlGQIC/jjmMWT47lkLLoB1nsNhPUcnoqyi5YR6I4h+FjBpILxbEy8JRg==",
586
+            "version": "4.27.4",
587
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.27.4.tgz",
588
+            "integrity": "sha512-o9bH2dbdgBDJaXWJCDTNDYa171ACUdzpxSZt+u/AAeQ20Nk5x+IhA+zsGmrQtpkLiumRJEYef68gcpn2ooXhSQ==",
589 589
             "cpu": [
590 590
                 "x64"
591 591
             ],
@@ -597,9 +597,9 @@
597 597
             ]
598 598
         },
599 599
         "node_modules/@rollup/rollup-freebsd-arm64": {
600
-            "version": "4.27.3",
601
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.3.tgz",
602
-            "integrity": "sha512-58E0tIcwZ+12nK1WiLzHOD8I0d0kdrY/+o7yFVPRHuVGY3twBwzwDdTIBGRxLmyjciMYl1B/U515GJy+yn46qw==",
600
+            "version": "4.27.4",
601
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.27.4.tgz",
602
+            "integrity": "sha512-NBI2/i2hT9Q+HySSHTBh52da7isru4aAAo6qC3I7QFVsuhxi2gM8t/EI9EVcILiHLj1vfi+VGGPaLOUENn7pmw==",
603 603
             "cpu": [
604 604
                 "arm64"
605 605
             ],
@@ -611,9 +611,9 @@
611 611
             ]
612 612
         },
613 613
         "node_modules/@rollup/rollup-freebsd-x64": {
614
-            "version": "4.27.3",
615
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.3.tgz",
616
-            "integrity": "sha512-78fohrpcVwTLxg1ZzBMlwEimoAJmY6B+5TsyAZ3Vok7YabRBUvjYTsRXPTjGEvv/mfgVBepbW28OlMEz4w8wGA==",
614
+            "version": "4.27.4",
615
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.27.4.tgz",
616
+            "integrity": "sha512-wYcC5ycW2zvqtDYrE7deary2P2UFmSh85PUpAx+dwTCO9uw3sgzD6Gv9n5X4vLaQKsrfTSZZ7Z7uynQozPVvWA==",
617 617
             "cpu": [
618 618
                 "x64"
619 619
             ],
@@ -625,9 +625,9 @@
625 625
             ]
626 626
         },
627 627
         "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
628
-            "version": "4.27.3",
629
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.3.tgz",
630
-            "integrity": "sha512-h2Ay79YFXyQi+QZKo3ISZDyKaVD7uUvukEHTOft7kh00WF9mxAaxZsNs3o/eukbeKuH35jBvQqrT61fzKfAB/Q==",
628
+            "version": "4.27.4",
629
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.27.4.tgz",
630
+            "integrity": "sha512-9OwUnK/xKw6DyRlgx8UizeqRFOfi9mf5TYCw1uolDaJSbUmBxP85DE6T4ouCMoN6pXw8ZoTeZCSEfSaYo+/s1w==",
631 631
             "cpu": [
632 632
                 "arm"
633 633
             ],
@@ -639,9 +639,9 @@
639 639
             ]
640 640
         },
641 641
         "node_modules/@rollup/rollup-linux-arm-musleabihf": {
642
-            "version": "4.27.3",
643
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.3.tgz",
644
-            "integrity": "sha512-Sv2GWmrJfRY57urktVLQ0VKZjNZGogVtASAgosDZ1aUB+ykPxSi3X1nWORL5Jk0sTIIwQiPH7iE3BMi9zGWfkg==",
642
+            "version": "4.27.4",
643
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.27.4.tgz",
644
+            "integrity": "sha512-Vgdo4fpuphS9V24WOV+KwkCVJ72u7idTgQaBoLRD0UxBAWTF9GWurJO9YD9yh00BzbkhpeXtm6na+MvJU7Z73A==",
645 645
             "cpu": [
646 646
                 "arm"
647 647
             ],
@@ -653,9 +653,9 @@
653 653
             ]
654 654
         },
655 655
         "node_modules/@rollup/rollup-linux-arm64-gnu": {
656
-            "version": "4.27.3",
657
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.3.tgz",
658
-            "integrity": "sha512-FPoJBLsPW2bDNWjSrwNuTPUt30VnfM8GPGRoLCYKZpPx0xiIEdFip3dH6CqgoT0RnoGXptaNziM0WlKgBc+OWQ==",
656
+            "version": "4.27.4",
657
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.27.4.tgz",
658
+            "integrity": "sha512-pleyNgyd1kkBkw2kOqlBx+0atfIIkkExOTiifoODo6qKDSpnc6WzUY5RhHdmTdIJXBdSnh6JknnYTtmQyobrVg==",
659 659
             "cpu": [
660 660
                 "arm64"
661 661
             ],
@@ -667,9 +667,9 @@
667 667
             ]
668 668
         },
669 669
         "node_modules/@rollup/rollup-linux-arm64-musl": {
670
-            "version": "4.27.3",
671
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.3.tgz",
672
-            "integrity": "sha512-TKxiOvBorYq4sUpA0JT+Fkh+l+G9DScnG5Dqx7wiiqVMiRSkzTclP35pE6eQQYjP4Gc8yEkJGea6rz4qyWhp3g==",
670
+            "version": "4.27.4",
671
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.27.4.tgz",
672
+            "integrity": "sha512-caluiUXvUuVyCHr5DxL8ohaaFFzPGmgmMvwmqAITMpV/Q+tPoaHZ/PWa3t8B2WyoRcIIuu1hkaW5KkeTDNSnMA==",
673 673
             "cpu": [
674 674
                 "arm64"
675 675
             ],
@@ -681,9 +681,9 @@
681 681
             ]
682 682
         },
683 683
         "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
684
-            "version": "4.27.3",
685
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.3.tgz",
686
-            "integrity": "sha512-v2M/mPvVUKVOKITa0oCFksnQQ/TqGrT+yD0184/cWHIu0LoIuYHwox0Pm3ccXEz8cEQDLk6FPKd1CCm+PlsISw==",
684
+            "version": "4.27.4",
685
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.27.4.tgz",
686
+            "integrity": "sha512-FScrpHrO60hARyHh7s1zHE97u0KlT/RECzCKAdmI+LEoC1eDh/RDji9JgFqyO+wPDb86Oa/sXkily1+oi4FzJQ==",
687 687
             "cpu": [
688 688
                 "ppc64"
689 689
             ],
@@ -695,9 +695,9 @@
695 695
             ]
696 696
         },
697 697
         "node_modules/@rollup/rollup-linux-riscv64-gnu": {
698
-            "version": "4.27.3",
699
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.3.tgz",
700
-            "integrity": "sha512-LdrI4Yocb1a/tFVkzmOE5WyYRgEBOyEhWYJe4gsDWDiwnjYKjNs7PS6SGlTDB7maOHF4kxevsuNBl2iOcj3b4A==",
698
+            "version": "4.27.4",
699
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.27.4.tgz",
700
+            "integrity": "sha512-qyyprhyGb7+RBfMPeww9FlHwKkCXdKHeGgSqmIXw9VSUtvyFZ6WZRtnxgbuz76FK7LyoN8t/eINRbPUcvXB5fw==",
701 701
             "cpu": [
702 702
                 "riscv64"
703 703
             ],
@@ -709,9 +709,9 @@
709 709
             ]
710 710
         },
711 711
         "node_modules/@rollup/rollup-linux-s390x-gnu": {
712
-            "version": "4.27.3",
713
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.3.tgz",
714
-            "integrity": "sha512-d4wVu6SXij/jyiwPvI6C4KxdGzuZOvJ6y9VfrcleHTwo68fl8vZC5ZYHsCVPUi4tndCfMlFniWgwonQ5CUpQcA==",
712
+            "version": "4.27.4",
713
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.27.4.tgz",
714
+            "integrity": "sha512-PFz+y2kb6tbh7m3A7nA9++eInGcDVZUACulf/KzDtovvdTizHpZaJty7Gp0lFwSQcrnebHOqxF1MaKZd7psVRg==",
715 715
             "cpu": [
716 716
                 "s390x"
717 717
             ],
@@ -723,9 +723,9 @@
723 723
             ]
724 724
         },
725 725
         "node_modules/@rollup/rollup-linux-x64-gnu": {
726
-            "version": "4.27.3",
727
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.3.tgz",
728
-            "integrity": "sha512-/6bn6pp1fsCGEY5n3yajmzZQAh+mW4QPItbiWxs69zskBzJuheb3tNynEjL+mKOsUSFK11X4LYF2BwwXnzWleA==",
726
+            "version": "4.27.4",
727
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.27.4.tgz",
728
+            "integrity": "sha512-Ni8mMtfo+o/G7DVtweXXV/Ol2TFf63KYjTtoZ5f078AUgJTmaIJnj4JFU7TK/9SVWTaSJGxPi5zMDgK4w+Ez7Q==",
729 729
             "cpu": [
730 730
                 "x64"
731 731
             ],
@@ -737,9 +737,9 @@
737 737
             ]
738 738
         },
739 739
         "node_modules/@rollup/rollup-linux-x64-musl": {
740
-            "version": "4.27.3",
741
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.3.tgz",
742
-            "integrity": "sha512-nBXOfJds8OzUT1qUreT/en3eyOXd2EH5b0wr2bVB5999qHdGKkzGzIyKYaKj02lXk6wpN71ltLIaQpu58YFBoQ==",
740
+            "version": "4.27.4",
741
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.27.4.tgz",
742
+            "integrity": "sha512-5AeeAF1PB9TUzD+3cROzFTnAJAcVUGLuR8ng0E0WXGkYhp6RD6L+6szYVX+64Rs0r72019KHZS1ka1q+zU/wUw==",
743 743
             "cpu": [
744 744
                 "x64"
745 745
             ],
@@ -751,9 +751,9 @@
751 751
             ]
752 752
         },
753 753
         "node_modules/@rollup/rollup-win32-arm64-msvc": {
754
-            "version": "4.27.3",
755
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.3.tgz",
756
-            "integrity": "sha512-ogfbEVQgIZOz5WPWXF2HVb6En+kWzScuxJo/WdQTqEgeyGkaa2ui5sQav9Zkr7bnNCLK48uxmmK0TySm22eiuw==",
754
+            "version": "4.27.4",
755
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.27.4.tgz",
756
+            "integrity": "sha512-yOpVsA4K5qVwu2CaS3hHxluWIK5HQTjNV4tWjQXluMiiiu4pJj4BN98CvxohNCpcjMeTXk/ZMJBRbgRg8HBB6A==",
757 757
             "cpu": [
758 758
                 "arm64"
759 759
             ],
@@ -765,9 +765,9 @@
765 765
             ]
766 766
         },
767 767
         "node_modules/@rollup/rollup-win32-ia32-msvc": {
768
-            "version": "4.27.3",
769
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.3.tgz",
770
-            "integrity": "sha512-ecE36ZBMLINqiTtSNQ1vzWc5pXLQHlf/oqGp/bSbi7iedcjcNb6QbCBNG73Euyy2C+l/fn8qKWEwxr+0SSfs3w==",
768
+            "version": "4.27.4",
769
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.27.4.tgz",
770
+            "integrity": "sha512-KtwEJOaHAVJlxV92rNYiG9JQwQAdhBlrjNRp7P9L8Cb4Rer3in+0A+IPhJC9y68WAi9H0sX4AiG2NTsVlmqJeQ==",
771 771
             "cpu": [
772 772
                 "ia32"
773 773
             ],
@@ -779,9 +779,9 @@
779 779
             ]
780 780
         },
781 781
         "node_modules/@rollup/rollup-win32-x64-msvc": {
782
-            "version": "4.27.3",
783
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.3.tgz",
784
-            "integrity": "sha512-vliZLrDmYKyaUoMzEbMTg2JkerfBjn03KmAw9CykO0Zzkzoyd7o3iZNam/TpyWNjNT+Cz2iO3P9Smv2wgrR+Eg==",
782
+            "version": "4.27.4",
783
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.27.4.tgz",
784
+            "integrity": "sha512-3j4jx1TppORdTAoBJRd+/wJRGCPC0ETWkXOecJ6PPZLj6SptXkrXcNqdj0oclbKML6FkQltdz7bBA3rUSirZug==",
785 785
             "cpu": [
786 786
                 "x64"
787 787
             ],
@@ -2199,9 +2199,9 @@
2199 2199
             }
2200 2200
         },
2201 2201
         "node_modules/rollup": {
2202
-            "version": "4.27.3",
2203
-            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.3.tgz",
2204
-            "integrity": "sha512-SLsCOnlmGt9VoZ9Ek8yBK8tAdmPHeppkw+Xa7yDlCEhDTvwYei03JlWo1fdc7YTfLZ4tD8riJCUyAgTbszk1fQ==",
2202
+            "version": "4.27.4",
2203
+            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.27.4.tgz",
2204
+            "integrity": "sha512-RLKxqHEMjh/RGLsDxAEsaLO3mWgyoU6x9w6n1ikAzet4B3gI2/3yP6PWY2p9QzRTh6MfEIXB3MwsOY0Iv3vNrw==",
2205 2205
             "dev": true,
2206 2206
             "license": "MIT",
2207 2207
             "dependencies": {
@@ -2215,24 +2215,24 @@
2215 2215
                 "npm": ">=8.0.0"
2216 2216
             },
2217 2217
             "optionalDependencies": {
2218
-                "@rollup/rollup-android-arm-eabi": "4.27.3",
2219
-                "@rollup/rollup-android-arm64": "4.27.3",
2220
-                "@rollup/rollup-darwin-arm64": "4.27.3",
2221
-                "@rollup/rollup-darwin-x64": "4.27.3",
2222
-                "@rollup/rollup-freebsd-arm64": "4.27.3",
2223
-                "@rollup/rollup-freebsd-x64": "4.27.3",
2224
-                "@rollup/rollup-linux-arm-gnueabihf": "4.27.3",
2225
-                "@rollup/rollup-linux-arm-musleabihf": "4.27.3",
2226
-                "@rollup/rollup-linux-arm64-gnu": "4.27.3",
2227
-                "@rollup/rollup-linux-arm64-musl": "4.27.3",
2228
-                "@rollup/rollup-linux-powerpc64le-gnu": "4.27.3",
2229
-                "@rollup/rollup-linux-riscv64-gnu": "4.27.3",
2230
-                "@rollup/rollup-linux-s390x-gnu": "4.27.3",
2231
-                "@rollup/rollup-linux-x64-gnu": "4.27.3",
2232
-                "@rollup/rollup-linux-x64-musl": "4.27.3",
2233
-                "@rollup/rollup-win32-arm64-msvc": "4.27.3",
2234
-                "@rollup/rollup-win32-ia32-msvc": "4.27.3",
2235
-                "@rollup/rollup-win32-x64-msvc": "4.27.3",
2218
+                "@rollup/rollup-android-arm-eabi": "4.27.4",
2219
+                "@rollup/rollup-android-arm64": "4.27.4",
2220
+                "@rollup/rollup-darwin-arm64": "4.27.4",
2221
+                "@rollup/rollup-darwin-x64": "4.27.4",
2222
+                "@rollup/rollup-freebsd-arm64": "4.27.4",
2223
+                "@rollup/rollup-freebsd-x64": "4.27.4",
2224
+                "@rollup/rollup-linux-arm-gnueabihf": "4.27.4",
2225
+                "@rollup/rollup-linux-arm-musleabihf": "4.27.4",
2226
+                "@rollup/rollup-linux-arm64-gnu": "4.27.4",
2227
+                "@rollup/rollup-linux-arm64-musl": "4.27.4",
2228
+                "@rollup/rollup-linux-powerpc64le-gnu": "4.27.4",
2229
+                "@rollup/rollup-linux-riscv64-gnu": "4.27.4",
2230
+                "@rollup/rollup-linux-s390x-gnu": "4.27.4",
2231
+                "@rollup/rollup-linux-x64-gnu": "4.27.4",
2232
+                "@rollup/rollup-linux-x64-musl": "4.27.4",
2233
+                "@rollup/rollup-win32-arm64-msvc": "4.27.4",
2234
+                "@rollup/rollup-win32-ia32-msvc": "4.27.4",
2235
+                "@rollup/rollup-win32-x64-msvc": "4.27.4",
2236 2236
                 "fsevents": "~2.3.2"
2237 2237
             }
2238 2238
         },

+ 5
- 1
resources/data/lang/en.json Visa fil

@@ -207,5 +207,9 @@
207 207
     "Billing Address": "Billing Address",
208 208
     "Shipping Address": "Shipping Address",
209 209
     "Secondary Contacts": "Secondary Contacts",
210
-    "Address Information": "Address Information"
210
+    "Address Information": "Address Information",
211
+    "Invoice Header": "Invoice Header",
212
+    "Invoice Details": "Invoice Details",
213
+    "Footer": "Footer",
214
+    "Invoice Footer": "Invoice Footer"
211 215
 }

+ 8
- 0
resources/views/filament/forms/components/company-info.blade.php Visa fil

@@ -0,0 +1,8 @@
1
+<div class="text-xs text-right">
2
+    <h2 class="text-base font-semibold">{{ $company_name }}</h2>
3
+    @if($company_address && $company_city && $company_state && $company_zip)
4
+        <p>{{ $company_address }}</p>
5
+        <p>{{ $company_city }}, {{ $company_state }} {{ $company_zip }}</p>
6
+        <p>{{ $company_country }}</p>
7
+    @endif
8
+</div>

Laddar…
Avbryt
Spara