Andrew Wallo 10 달 전
부모
커밋
4926a072f2

+ 9
- 8
app/Concerns/ManagesLineItems.php 파일 보기

3
 namespace App\Concerns;
3
 namespace App\Concerns;
4
 
4
 
5
 use App\Enums\Accounting\AdjustmentComputation;
5
 use App\Enums\Accounting\AdjustmentComputation;
6
+use App\Enums\Accounting\DocumentDiscountMethod;
6
 use App\Models\Accounting\DocumentLineItem;
7
 use App\Models\Accounting\DocumentLineItem;
7
 use App\Models\Accounting\Invoice;
8
 use App\Models\Accounting\Invoice;
8
 use App\Utilities\Currency\CurrencyConverter;
9
 use App\Utilities\Currency\CurrencyConverter;
49
         }
50
         }
50
     }
51
     }
51
 
52
 
52
-    protected function handleLineItemAdjustments(DocumentLineItem $lineItem, array $itemData, string $discountMethod): void
53
+    protected function handleLineItemAdjustments(DocumentLineItem $lineItem, array $itemData, DocumentDiscountMethod $discountMethod): void
53
     {
54
     {
54
         $adjustmentIds = collect($itemData['salesTaxes'] ?? [])
55
         $adjustmentIds = collect($itemData['salesTaxes'] ?? [])
55
-            ->merge($discountMethod === 'line_items' ? ($itemData['salesDiscounts'] ?? []) : [])
56
+            ->merge($discountMethod->isPerLineItem() ? ($itemData['salesDiscounts'] ?? []) : [])
56
             ->filter()
57
             ->filter()
57
             ->unique();
58
             ->unique();
58
 
59
 
60
         $lineItem->refresh();
61
         $lineItem->refresh();
61
     }
62
     }
62
 
63
 
63
-    protected function updateLineItemTotals(DocumentLineItem $lineItem, string $discountMethod): void
64
+    protected function updateLineItemTotals(DocumentLineItem $lineItem, DocumentDiscountMethod $discountMethod): void
64
     {
65
     {
65
         $lineItem->updateQuietly([
66
         $lineItem->updateQuietly([
66
             'tax_total' => $lineItem->calculateTaxTotal()->getAmount(),
67
             'tax_total' => $lineItem->calculateTaxTotal()->getAmount(),
67
-            'discount_total' => $discountMethod === 'line_items'
68
+            'discount_total' => $discountMethod->isPerLineItem()
68
                 ? $lineItem->calculateDiscountTotal()->getAmount()
69
                 ? $lineItem->calculateDiscountTotal()->getAmount()
69
                 : 0,
70
                 : 0,
70
         ]);
71
         ]);
75
         $subtotalCents = $record->lineItems()->sum('subtotal');
76
         $subtotalCents = $record->lineItems()->sum('subtotal');
76
         $taxTotalCents = $record->lineItems()->sum('tax_total');
77
         $taxTotalCents = $record->lineItems()->sum('tax_total');
77
         $discountTotalCents = $this->calculateDiscountTotal(
78
         $discountTotalCents = $this->calculateDiscountTotal(
78
-            $data['discount_method'],
79
+            DocumentDiscountMethod::parse($data['discount_method']),
79
             AdjustmentComputation::parse($data['discount_computation']),
80
             AdjustmentComputation::parse($data['discount_computation']),
80
             $data['discount_rate'] ?? null,
81
             $data['discount_rate'] ?? null,
81
             $subtotalCents,
82
             $subtotalCents,
93
     }
94
     }
94
 
95
 
95
     protected function calculateDiscountTotal(
96
     protected function calculateDiscountTotal(
96
-        string $discountMethod,
97
+        DocumentDiscountMethod $discountMethod,
97
         ?AdjustmentComputation $discountComputation,
98
         ?AdjustmentComputation $discountComputation,
98
         ?string $discountRate,
99
         ?string $discountRate,
99
         int $subtotalCents,
100
         int $subtotalCents,
100
         Invoice $record
101
         Invoice $record
101
     ): int {
102
     ): int {
102
-        if ($discountMethod === 'line_items') {
103
+        if ($discountMethod->isPerLineItem()) {
103
             return $record->lineItems()->sum('discount_total');
104
             return $record->lineItems()->sum('discount_total');
104
         }
105
         }
105
 
106
 
106
-        if ($discountComputation === AdjustmentComputation::Percentage) {
107
+        if ($discountComputation?->isPercentage()) {
107
             return (int) ($subtotalCents * ((float) $discountRate / 100));
108
             return (int) ($subtotalCents * ((float) $discountRate / 100));
108
         }
109
         }
109
 
110
 

+ 10
- 0
app/Enums/Accounting/AdjustmentComputation.php 파일 보기

16
     {
16
     {
17
         return translate($this->name);
17
         return translate($this->name);
18
     }
18
     }
19
+
20
+    public function isPercentage(): bool
21
+    {
22
+        return $this == self::Percentage;
23
+    }
24
+
25
+    public function isFixed(): bool
26
+    {
27
+        return $this == self::Fixed;
28
+    }
19
 }
29
 }

+ 32
- 0
app/Enums/Accounting/DocumentDiscountMethod.php 파일 보기

1
+<?php
2
+
3
+namespace App\Enums\Accounting;
4
+
5
+use App\Enums\Concerns\ParsesEnum;
6
+use Filament\Support\Contracts\HasLabel;
7
+
8
+enum DocumentDiscountMethod: string implements HasLabel
9
+{
10
+    use ParsesEnum;
11
+
12
+    case PerLineItem = 'per_line_item';
13
+    case PerDocument = 'per_document';
14
+
15
+    public function getLabel(): string
16
+    {
17
+        return match ($this) {
18
+            self::PerLineItem => 'Per Line Item',
19
+            self::PerDocument => 'Per Document',
20
+        };
21
+    }
22
+
23
+    public function isPerLineItem(): bool
24
+    {
25
+        return $this == self::PerLineItem;
26
+    }
27
+
28
+    public function isPerDocument(): bool
29
+    {
30
+        return $this == self::PerDocument;
31
+    }
32
+}

+ 2
- 2
app/Filament/Company/Clusters/Settings/Resources/AdjustmentResource.php 파일 보기

53
                         ToggleButton::make('recoverable')
53
                         ToggleButton::make('recoverable')
54
                             ->label('Recoverable')
54
                             ->label('Recoverable')
55
                             ->default(false)
55
                             ->default(false)
56
-                            ->visible(fn (Forms\Get $get) => AdjustmentCategory::parse($get('category')) === AdjustmentCategory::Tax && AdjustmentType::parse($get('type')) === AdjustmentType::Purchase),
56
+                            ->visible(fn (Forms\Get $get) => AdjustmentCategory::parse($get('category'))->isTax() && AdjustmentType::parse($get('type'))->isPurchase()),
57
                     ])
57
                     ])
58
                     ->columns()
58
                     ->columns()
59
                     ->visibleOn('create'),
59
                     ->visibleOn('create'),
80
                         Forms\Components\DateTimePicker::make('end_date'),
80
                         Forms\Components\DateTimePicker::make('end_date'),
81
                     ])
81
                     ])
82
                     ->columns()
82
                     ->columns()
83
-                    ->visible(fn (Forms\Get $get) => AdjustmentCategory::parse($get('category')) === AdjustmentCategory::Discount),
83
+                    ->visible(fn (Forms\Get $get) => AdjustmentCategory::parse($get('category'))->isDiscount()),
84
             ]);
84
             ]);
85
     }
85
     }
86
 
86
 

+ 10
- 12
app/Filament/Company/Resources/Sales/InvoiceResource.php 파일 보기

3
 namespace App\Filament\Company\Resources\Sales;
3
 namespace App\Filament\Company\Resources\Sales;
4
 
4
 
5
 use App\Collections\Accounting\InvoiceCollection;
5
 use App\Collections\Accounting\InvoiceCollection;
6
+use App\Enums\Accounting\DocumentDiscountMethod;
6
 use App\Enums\Accounting\InvoiceStatus;
7
 use App\Enums\Accounting\InvoiceStatus;
7
 use App\Enums\Accounting\PaymentMethod;
8
 use App\Enums\Accounting\PaymentMethod;
8
 use App\Filament\Company\Resources\Sales\InvoiceResource\Pages;
9
 use App\Filament\Company\Resources\Sales\InvoiceResource\Pages;
129
                                     }),
130
                                     }),
130
                                 Forms\Components\Select::make('discount_method')
131
                                 Forms\Components\Select::make('discount_method')
131
                                     ->label('Discount Method')
132
                                     ->label('Discount Method')
132
-                                    ->options([
133
-                                        'line_items' => 'Per Line Item Discounts',
134
-                                        'invoice' => 'Invoice Level Discount',
135
-                                    ])
133
+                                    ->options(DocumentDiscountMethod::class)
136
                                     ->selectablePlaceholder(false)
134
                                     ->selectablePlaceholder(false)
137
-                                    ->default('line_items')
135
+                                    ->default(DocumentDiscountMethod::PerLineItem)
138
                                     ->afterStateUpdated(function ($state, Forms\Set $set) {
136
                                     ->afterStateUpdated(function ($state, Forms\Set $set) {
139
-                                        $discountMethod = $state;
137
+                                        $discountMethod = DocumentDiscountMethod::parse($state);
140
 
138
 
141
-                                        if ($discountMethod === 'invoice') {
139
+                                        if ($discountMethod->isPerDocument()) {
142
                                             $set('lineItems.*.salesDiscounts', []);
140
                                             $set('lineItems.*.salesDiscounts', []);
143
                                         }
141
                                         }
144
                                     })
142
                                     })
150
                             ->saveRelationshipsUsing(null)
148
                             ->saveRelationshipsUsing(null)
151
                             ->dehydrated(true)
149
                             ->dehydrated(true)
152
                             ->headers(function (Forms\Get $get) {
150
                             ->headers(function (Forms\Get $get) {
153
-                                $hasDiscounts = $get('discount_method') === 'line_items';
151
+                                $hasDiscounts = DocumentDiscountMethod::parse($get('discount_method'))->isPerLineItem();
154
 
152
 
155
                                 $headers = [
153
                                 $headers = [
156
                                     Header::make('Items')->width($hasDiscounts ? '15%' : '20%'),
154
                                     Header::make('Items')->width($hasDiscounts ? '15%' : '20%'),
184
                                             $set('unit_price', $offeringRecord->price);
182
                                             $set('unit_price', $offeringRecord->price);
185
                                             $set('salesTaxes', $offeringRecord->salesTaxes->pluck('id')->toArray());
183
                                             $set('salesTaxes', $offeringRecord->salesTaxes->pluck('id')->toArray());
186
 
184
 
187
-                                            $discountMethod = $get('../../discount_method');
188
-                                            if ($discountMethod === 'line_items') {
185
+                                            $discountMethod = DocumentDiscountMethod::parse($get('../../discount_method'));
186
+                                            if ($discountMethod->isPerLineItem()) {
189
                                                 $set('salesDiscounts', $offeringRecord->salesDiscounts->pluck('id')->toArray());
187
                                                 $set('salesDiscounts', $offeringRecord->salesDiscounts->pluck('id')->toArray());
190
                                             }
188
                                             }
191
                                         }
189
                                         }
217
                                     ->multiple()
215
                                     ->multiple()
218
                                     ->live()
216
                                     ->live()
219
                                     ->hidden(function (Forms\Get $get) {
217
                                     ->hidden(function (Forms\Get $get) {
220
-                                        $discountMethod = $get('../../discount_method');
218
+                                        $discountMethod = DocumentDiscountMethod::parse($get('../../discount_method'));
221
 
219
 
222
-                                        return $discountMethod === 'invoice';
220
+                                        return $discountMethod->isPerDocument();
223
                                     })
221
                                     })
224
                                     ->searchable(),
222
                                     ->searchable(),
225
                                 Forms\Components\Placeholder::make('total')
223
                                 Forms\Components\Placeholder::make('total')

+ 9
- 0
app/Models/Accounting/Bill.php 파일 보기

3
 namespace App\Models\Accounting;
3
 namespace App\Models\Accounting;
4
 
4
 
5
 use App\Casts\MoneyCast;
5
 use App\Casts\MoneyCast;
6
+use App\Casts\RateCast;
6
 use App\Concerns\Blamable;
7
 use App\Concerns\Blamable;
7
 use App\Concerns\CompanyOwned;
8
 use App\Concerns\CompanyOwned;
9
+use App\Enums\Accounting\AdjustmentComputation;
8
 use App\Enums\Accounting\BillStatus;
10
 use App\Enums\Accounting\BillStatus;
11
+use App\Enums\Accounting\DocumentDiscountMethod;
9
 use App\Enums\Accounting\JournalEntryType;
12
 use App\Enums\Accounting\JournalEntryType;
10
 use App\Enums\Accounting\TransactionType;
13
 use App\Enums\Accounting\TransactionType;
11
 use App\Filament\Company\Resources\Purchases\BillResource;
14
 use App\Filament\Company\Resources\Purchases\BillResource;
42
         'paid_at',
45
         'paid_at',
43
         'status',
46
         'status',
44
         'currency_code',
47
         'currency_code',
48
+        'discount_method',
49
+        'discount_computation',
50
+        'discount_rate',
45
         'subtotal',
51
         'subtotal',
46
         'tax_total',
52
         'tax_total',
47
         'discount_total',
53
         'discount_total',
57
         'due_date' => 'date',
63
         'due_date' => 'date',
58
         'paid_at' => 'datetime',
64
         'paid_at' => 'datetime',
59
         'status' => BillStatus::class,
65
         'status' => BillStatus::class,
66
+        'discount_method' => DocumentDiscountMethod::class,
67
+        'discount_computation' => AdjustmentComputation::class,
68
+        'discount_rate' => RateCast::class,
60
         'subtotal' => MoneyCast::class,
69
         'subtotal' => MoneyCast::class,
61
         'tax_total' => MoneyCast::class,
70
         'tax_total' => MoneyCast::class,
62
         'discount_total' => MoneyCast::class,
71
         'discount_total' => MoneyCast::class,

+ 3
- 1
app/Models/Accounting/Invoice.php 파일 보기

8
 use App\Concerns\Blamable;
8
 use App\Concerns\Blamable;
9
 use App\Concerns\CompanyOwned;
9
 use App\Concerns\CompanyOwned;
10
 use App\Enums\Accounting\AdjustmentComputation;
10
 use App\Enums\Accounting\AdjustmentComputation;
11
+use App\Enums\Accounting\DocumentDiscountMethod;
11
 use App\Enums\Accounting\InvoiceStatus;
12
 use App\Enums\Accounting\InvoiceStatus;
12
 use App\Enums\Accounting\JournalEntryType;
13
 use App\Enums\Accounting\JournalEntryType;
13
 use App\Enums\Accounting\TransactionType;
14
 use App\Enums\Accounting\TransactionType;
75
         'paid_at' => 'datetime',
76
         'paid_at' => 'datetime',
76
         'last_sent' => 'datetime',
77
         'last_sent' => 'datetime',
77
         'status' => InvoiceStatus::class,
78
         'status' => InvoiceStatus::class,
79
+        'discount_method' => DocumentDiscountMethod::class,
78
         'discount_computation' => AdjustmentComputation::class,
80
         'discount_computation' => AdjustmentComputation::class,
79
         'discount_rate' => RateCast::class,
81
         'discount_rate' => RateCast::class,
80
         'subtotal' => MoneyCast::class,
82
         'subtotal' => MoneyCast::class,
293
                 ]);
295
                 ]);
294
             }
296
             }
295
 
297
 
296
-            if ($this->discount_method === 'invoice' && $totalLineItemSubtotal > 0) {
298
+            if ($this->discount_method->isPerDocument() && $totalLineItemSubtotal > 0) {
297
                 $lineItemSubtotalCents = (int) $lineItem->getRawOriginal('subtotal');
299
                 $lineItemSubtotalCents = (int) $lineItem->getRawOriginal('subtotal');
298
 
300
 
299
                 if ($index === $this->lineItems->count() - 1) {
301
                 if ($index === $this->lineItems->count() - 1) {

+ 11
- 2
app/Services/ReportService.php 파일 보기

177
 
177
 
178
             $accountTransactions = [];
178
             $accountTransactions = [];
179
             $currentBalance = $account->starting_balance;
179
             $currentBalance = $account->starting_balance;
180
+            $periodDebitTotal = 0;
181
+            $periodCreditTotal = 0;
180
 
182
 
181
             $accountTransactions[] = new AccountTransactionDTO(
183
             $accountTransactions[] = new AccountTransactionDTO(
182
                 id: null,
184
                 id: null,
192
             foreach ($account->journalEntries as $journalEntry) {
194
             foreach ($account->journalEntries as $journalEntry) {
193
                 $transaction = $journalEntry->transaction;
195
                 $transaction = $journalEntry->transaction;
194
                 $signedAmount = $journalEntry->signed_amount;
196
                 $signedAmount = $journalEntry->signed_amount;
197
+                $amount = $journalEntry->getRawOriginal('amount');
198
+
199
+                if ($journalEntry->type->isDebit()) {
200
+                    $periodDebitTotal += $amount;
201
+                } else {
202
+                    $periodCreditTotal += $amount;
203
+                }
195
 
204
 
196
                 if ($account->category->isNormalDebitBalance()) {
205
                 if ($account->category->isNormalDebitBalance()) {
197
                     $currentBalance += $signedAmount;
206
                     $currentBalance += $signedAmount;
219
                 id: null,
228
                 id: null,
220
                 date: 'Totals and Ending Balance',
229
                 date: 'Totals and Ending Balance',
221
                 description: '',
230
                 description: '',
222
-                debit: money($account->total_debit, $defaultCurrency)->format(),
223
-                credit: money($account->total_credit, $defaultCurrency)->format(),
231
+                debit: money($periodDebitTotal, $defaultCurrency)->format(),
232
+                credit: money($periodCreditTotal, $defaultCurrency)->format(),
224
                 balance: money($currentBalance, $defaultCurrency)->format(),
233
                 balance: money($currentBalance, $defaultCurrency)->format(),
225
                 type: null,
234
                 type: null,
226
                 tableAction: null
235
                 tableAction: null

+ 5
- 4
app/View/Models/InvoiceTotalViewModel.php 파일 보기

3
 namespace App\View\Models;
3
 namespace App\View\Models;
4
 
4
 
5
 use App\Enums\Accounting\AdjustmentComputation;
5
 use App\Enums\Accounting\AdjustmentComputation;
6
+use App\Enums\Accounting\DocumentDiscountMethod;
6
 use App\Models\Accounting\Adjustment;
7
 use App\Models\Accounting\Adjustment;
7
 use App\Models\Accounting\Invoice;
8
 use App\Models\Accounting\Invoice;
8
 use App\Utilities\Currency\CurrencyConverter;
9
 use App\Utilities\Currency\CurrencyConverter;
39
         }, 0);
40
         }, 0);
40
 
41
 
41
         // Calculate discount based on method
42
         // Calculate discount based on method
42
-        $discountMethod = $this->data['discount_method'] ?? 'line_items';
43
+        $discountMethod = DocumentDiscountMethod::parse($this->data['discount_method']) ?? DocumentDiscountMethod::PerLineItem;
43
 
44
 
44
-        if ($discountMethod === 'line_items') {
45
+        if ($discountMethod->isPerLineItem()) {
45
             $discountTotal = $lineItems->reduce(function ($carry, $item) {
46
             $discountTotal = $lineItems->reduce(function ($carry, $item) {
46
                 $quantity = max((float) ($item['quantity'] ?? 0), 0);
47
                 $quantity = max((float) ($item['quantity'] ?? 0), 0);
47
                 $unitPrice = max((float) ($item['unit_price'] ?? 0), 0);
48
                 $unitPrice = max((float) ($item['unit_price'] ?? 0), 0);
55
                 return $carry + $discountAmount;
56
                 return $carry + $discountAmount;
56
             }, 0);
57
             }, 0);
57
         } else {
58
         } else {
58
-            $discountComputation = $this->data['discount_computation'] ?? AdjustmentComputation::Percentage;
59
+            $discountComputation = AdjustmentComputation::parse($this->data['discount_computation']) ?? AdjustmentComputation::Percentage;
59
             $discountRate = (float) ($this->data['discount_rate'] ?? 0);
60
             $discountRate = (float) ($this->data['discount_rate'] ?? 0);
60
 
61
 
61
-            if (AdjustmentComputation::parse($discountComputation) === AdjustmentComputation::Percentage) {
62
+            if ($discountComputation->isPercentage()) {
62
                 $discountTotal = $subtotal * ($discountRate / 100);
63
                 $discountTotal = $subtotal * ($discountRate / 100);
63
             } else {
64
             } else {
64
                 $discountTotal = $discountRate;
65
                 $discountTotal = $discountRate;

+ 1
- 1
composer.json 파일 보기

17
         "andrewdwallo/transmatic": "^1.1",
17
         "andrewdwallo/transmatic": "^1.1",
18
         "awcodes/filament-table-repeater": "^3.0",
18
         "awcodes/filament-table-repeater": "^3.0",
19
         "barryvdh/laravel-snappy": "^1.0",
19
         "barryvdh/laravel-snappy": "^1.0",
20
-        "filament/filament": "^3.2.115",
20
+        "filament/filament": "v3.2.129",
21
         "guava/filament-clusters": "^1.1",
21
         "guava/filament-clusters": "^1.1",
22
         "guzzlehttp/guzzle": "^7.8",
22
         "guzzlehttp/guzzle": "^7.8",
23
         "jaocero/radio-deck": "^1.2",
23
         "jaocero/radio-deck": "^1.2",

+ 81
- 81
composer.lock 파일 보기

4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
4
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
5
         "This file is @generated automatically"
5
         "This file is @generated automatically"
6
     ],
6
     ],
7
-    "content-hash": "6f7204f976352f049caf598df4454ace",
7
+    "content-hash": "7301f370a98e2573adf4e6b4e7ab4a8e",
8
     "packages": [
8
     "packages": [
9
         {
9
         {
10
             "name": "akaunting/laravel-money",
10
             "name": "akaunting/laravel-money",
497
         },
497
         },
498
         {
498
         {
499
             "name": "aws/aws-sdk-php",
499
             "name": "aws/aws-sdk-php",
500
-            "version": "3.334.4",
500
+            "version": "3.334.6",
501
             "source": {
501
             "source": {
502
                 "type": "git",
502
                 "type": "git",
503
                 "url": "https://github.com/aws/aws-sdk-php.git",
503
                 "url": "https://github.com/aws/aws-sdk-php.git",
504
-                "reference": "3261e515cfc1bae024bce72be3ea28708461c0a3"
504
+                "reference": "2b0be3aded849d3b7bb0b53ea3295c7cecdeeee7"
505
             },
505
             },
506
             "dist": {
506
             "dist": {
507
                 "type": "zip",
507
                 "type": "zip",
508
-                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3261e515cfc1bae024bce72be3ea28708461c0a3",
509
-                "reference": "3261e515cfc1bae024bce72be3ea28708461c0a3",
508
+                "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2b0be3aded849d3b7bb0b53ea3295c7cecdeeee7",
509
+                "reference": "2b0be3aded849d3b7bb0b53ea3295c7cecdeeee7",
510
                 "shasum": ""
510
                 "shasum": ""
511
             },
511
             },
512
             "require": {
512
             "require": {
589
             "support": {
589
             "support": {
590
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
590
                 "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
591
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
591
                 "issues": "https://github.com/aws/aws-sdk-php/issues",
592
-                "source": "https://github.com/aws/aws-sdk-php/tree/3.334.4"
592
+                "source": "https://github.com/aws/aws-sdk-php/tree/3.334.6"
593
             },
593
             },
594
-            "time": "2024-12-11T19:41:47+00:00"
594
+            "time": "2024-12-13T19:18:29+00:00"
595
         },
595
         },
596
         {
596
         {
597
             "name": "aws/aws-sdk-php-laravel",
597
             "name": "aws/aws-sdk-php-laravel",
624
             "type": "library",
624
             "type": "library",
625
             "extra": {
625
             "extra": {
626
                 "laravel": {
626
                 "laravel": {
627
-                    "providers": [
628
-                        "Aws\\Laravel\\AwsServiceProvider"
629
-                    ],
630
                     "aliases": {
627
                     "aliases": {
631
                         "AWS": "Aws\\Laravel\\AwsFacade"
628
                         "AWS": "Aws\\Laravel\\AwsFacade"
632
-                    }
629
+                    },
630
+                    "providers": [
631
+                        "Aws\\Laravel\\AwsServiceProvider"
632
+                    ]
633
                 }
633
                 }
634
             },
634
             },
635
             "autoload": {
635
             "autoload": {
1662
         },
1662
         },
1663
         {
1663
         {
1664
             "name": "filament/actions",
1664
             "name": "filament/actions",
1665
-            "version": "v3.2.130",
1665
+            "version": "v3.2.129",
1666
             "source": {
1666
             "source": {
1667
                 "type": "git",
1667
                 "type": "git",
1668
                 "url": "https://github.com/filamentphp/actions.git",
1668
                 "url": "https://github.com/filamentphp/actions.git",
1715
         },
1715
         },
1716
         {
1716
         {
1717
             "name": "filament/filament",
1717
             "name": "filament/filament",
1718
-            "version": "v3.2.130",
1718
+            "version": "v3.2.129",
1719
             "source": {
1719
             "source": {
1720
                 "type": "git",
1720
                 "type": "git",
1721
                 "url": "https://github.com/filamentphp/panels.git",
1721
                 "url": "https://github.com/filamentphp/panels.git",
1780
         },
1780
         },
1781
         {
1781
         {
1782
             "name": "filament/forms",
1782
             "name": "filament/forms",
1783
-            "version": "v3.2.130",
1783
+            "version": "v3.2.129",
1784
             "source": {
1784
             "source": {
1785
                 "type": "git",
1785
                 "type": "git",
1786
                 "url": "https://github.com/filamentphp/forms.git",
1786
                 "url": "https://github.com/filamentphp/forms.git",
1836
         },
1836
         },
1837
         {
1837
         {
1838
             "name": "filament/infolists",
1838
             "name": "filament/infolists",
1839
-            "version": "v3.2.130",
1839
+            "version": "v3.2.129",
1840
             "source": {
1840
             "source": {
1841
                 "type": "git",
1841
                 "type": "git",
1842
                 "url": "https://github.com/filamentphp/infolists.git",
1842
                 "url": "https://github.com/filamentphp/infolists.git",
1887
         },
1887
         },
1888
         {
1888
         {
1889
             "name": "filament/notifications",
1889
             "name": "filament/notifications",
1890
-            "version": "v3.2.130",
1890
+            "version": "v3.2.129",
1891
             "source": {
1891
             "source": {
1892
                 "type": "git",
1892
                 "type": "git",
1893
                 "url": "https://github.com/filamentphp/notifications.git",
1893
                 "url": "https://github.com/filamentphp/notifications.git",
1939
         },
1939
         },
1940
         {
1940
         {
1941
             "name": "filament/support",
1941
             "name": "filament/support",
1942
-            "version": "v3.2.130",
1942
+            "version": "v3.2.129",
1943
             "source": {
1943
             "source": {
1944
                 "type": "git",
1944
                 "type": "git",
1945
                 "url": "https://github.com/filamentphp/support.git",
1945
                 "url": "https://github.com/filamentphp/support.git",
1946
-                "reference": "1654851f04733f48faed7235b032b2c5842b5629"
1946
+                "reference": "e8aed9684d5c58ff7dde9517c7f1af44d575d871"
1947
             },
1947
             },
1948
             "dist": {
1948
             "dist": {
1949
                 "type": "zip",
1949
                 "type": "zip",
1950
-                "url": "https://api.github.com/repos/filamentphp/support/zipball/1654851f04733f48faed7235b032b2c5842b5629",
1951
-                "reference": "1654851f04733f48faed7235b032b2c5842b5629",
1950
+                "url": "https://api.github.com/repos/filamentphp/support/zipball/e8aed9684d5c58ff7dde9517c7f1af44d575d871",
1951
+                "reference": "e8aed9684d5c58ff7dde9517c7f1af44d575d871",
1952
                 "shasum": ""
1952
                 "shasum": ""
1953
             },
1953
             },
1954
             "require": {
1954
             "require": {
1959
                 "illuminate/support": "^10.45|^11.0",
1959
                 "illuminate/support": "^10.45|^11.0",
1960
                 "illuminate/view": "^10.45|^11.0",
1960
                 "illuminate/view": "^10.45|^11.0",
1961
                 "kirschbaum-development/eloquent-power-joins": "^3.0|^4.0",
1961
                 "kirschbaum-development/eloquent-power-joins": "^3.0|^4.0",
1962
-                "livewire/livewire": "^3.5",
1962
+                "livewire/livewire": "3.5.12",
1963
                 "php": "^8.1",
1963
                 "php": "^8.1",
1964
                 "ryangjchandler/blade-capture-directive": "^0.2|^0.3|^1.0",
1964
                 "ryangjchandler/blade-capture-directive": "^0.2|^0.3|^1.0",
1965
                 "spatie/color": "^1.5",
1965
                 "spatie/color": "^1.5",
1994
                 "issues": "https://github.com/filamentphp/filament/issues",
1994
                 "issues": "https://github.com/filamentphp/filament/issues",
1995
                 "source": "https://github.com/filamentphp/filament"
1995
                 "source": "https://github.com/filamentphp/filament"
1996
             },
1996
             },
1997
-            "time": "2024-12-11T12:57:14+00:00"
1997
+            "time": "2024-12-11T09:05:54+00:00"
1998
         },
1998
         },
1999
         {
1999
         {
2000
             "name": "filament/tables",
2000
             "name": "filament/tables",
2001
-            "version": "v3.2.130",
2001
+            "version": "v3.2.129",
2002
             "source": {
2002
             "source": {
2003
                 "type": "git",
2003
                 "type": "git",
2004
                 "url": "https://github.com/filamentphp/tables.git",
2004
                 "url": "https://github.com/filamentphp/tables.git",
2005
-                "reference": "d7dcaa4d5f04c7e6fb7b9d457083e6fa588ca600"
2005
+                "reference": "acdec73ae82961654a52a22ed9f53207cfee2ef8"
2006
             },
2006
             },
2007
             "dist": {
2007
             "dist": {
2008
                 "type": "zip",
2008
                 "type": "zip",
2009
-                "url": "https://api.github.com/repos/filamentphp/tables/zipball/d7dcaa4d5f04c7e6fb7b9d457083e6fa588ca600",
2010
-                "reference": "d7dcaa4d5f04c7e6fb7b9d457083e6fa588ca600",
2009
+                "url": "https://api.github.com/repos/filamentphp/tables/zipball/acdec73ae82961654a52a22ed9f53207cfee2ef8",
2010
+                "reference": "acdec73ae82961654a52a22ed9f53207cfee2ef8",
2011
                 "shasum": ""
2011
                 "shasum": ""
2012
             },
2012
             },
2013
             "require": {
2013
             "require": {
2046
                 "issues": "https://github.com/filamentphp/filament/issues",
2046
                 "issues": "https://github.com/filamentphp/filament/issues",
2047
                 "source": "https://github.com/filamentphp/filament"
2047
                 "source": "https://github.com/filamentphp/filament"
2048
             },
2048
             },
2049
-            "time": "2024-12-11T12:57:12+00:00"
2049
+            "time": "2024-12-11T09:05:54+00:00"
2050
         },
2050
         },
2051
         {
2051
         {
2052
             "name": "filament/widgets",
2052
             "name": "filament/widgets",
2053
-            "version": "v3.2.130",
2053
+            "version": "v3.2.129",
2054
             "source": {
2054
             "source": {
2055
                 "type": "git",
2055
                 "type": "git",
2056
                 "url": "https://github.com/filamentphp/widgets.git",
2056
                 "url": "https://github.com/filamentphp/widgets.git",
2980
         },
2980
         },
2981
         {
2981
         {
2982
             "name": "laravel/framework",
2982
             "name": "laravel/framework",
2983
-            "version": "v11.35.0",
2983
+            "version": "v11.35.1",
2984
             "source": {
2984
             "source": {
2985
                 "type": "git",
2985
                 "type": "git",
2986
                 "url": "https://github.com/laravel/framework.git",
2986
                 "url": "https://github.com/laravel/framework.git",
2987
-                "reference": "f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc"
2987
+                "reference": "dcfa130ede1a6fa4343dc113410963e791ad34fb"
2988
             },
2988
             },
2989
             "dist": {
2989
             "dist": {
2990
                 "type": "zip",
2990
                 "type": "zip",
2991
-                "url": "https://api.github.com/repos/laravel/framework/zipball/f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc",
2992
-                "reference": "f1a7aaa3c1235b7a95ccaa58db90e0cd9d8c3fcc",
2991
+                "url": "https://api.github.com/repos/laravel/framework/zipball/dcfa130ede1a6fa4343dc113410963e791ad34fb",
2992
+                "reference": "dcfa130ede1a6fa4343dc113410963e791ad34fb",
2993
                 "shasum": ""
2993
                 "shasum": ""
2994
             },
2994
             },
2995
             "require": {
2995
             "require": {
3191
                 "issues": "https://github.com/laravel/framework/issues",
3191
                 "issues": "https://github.com/laravel/framework/issues",
3192
                 "source": "https://github.com/laravel/framework"
3192
                 "source": "https://github.com/laravel/framework"
3193
             },
3193
             },
3194
-            "time": "2024-12-10T16:09:29+00:00"
3194
+            "time": "2024-12-12T18:25:58+00:00"
3195
         },
3195
         },
3196
         {
3196
         {
3197
             "name": "laravel/prompts",
3197
             "name": "laravel/prompts",
3706
         },
3706
         },
3707
         {
3707
         {
3708
             "name": "league/csv",
3708
             "name": "league/csv",
3709
-            "version": "9.19.0",
3709
+            "version": "9.20.0",
3710
             "source": {
3710
             "source": {
3711
                 "type": "git",
3711
                 "type": "git",
3712
                 "url": "https://github.com/thephpleague/csv.git",
3712
                 "url": "https://github.com/thephpleague/csv.git",
3713
-                "reference": "f81df48a012a9e86d077e74eaff666fd15bfab88"
3713
+                "reference": "553579df208641ada6ffb450b3a151e2fcfa4f31"
3714
             },
3714
             },
3715
             "dist": {
3715
             "dist": {
3716
                 "type": "zip",
3716
                 "type": "zip",
3717
-                "url": "https://api.github.com/repos/thephpleague/csv/zipball/f81df48a012a9e86d077e74eaff666fd15bfab88",
3718
-                "reference": "f81df48a012a9e86d077e74eaff666fd15bfab88",
3717
+                "url": "https://api.github.com/repos/thephpleague/csv/zipball/553579df208641ada6ffb450b3a151e2fcfa4f31",
3718
+                "reference": "553579df208641ada6ffb450b3a151e2fcfa4f31",
3719
                 "shasum": ""
3719
                 "shasum": ""
3720
             },
3720
             },
3721
             "require": {
3721
             "require": {
3789
                     "type": "github"
3789
                     "type": "github"
3790
                 }
3790
                 }
3791
             ],
3791
             ],
3792
-            "time": "2024-12-08T08:09:35+00:00"
3792
+            "time": "2024-12-13T15:49:27+00:00"
3793
         },
3793
         },
3794
         {
3794
         {
3795
             "name": "league/flysystem",
3795
             "name": "league/flysystem",
4231
         },
4231
         },
4232
         {
4232
         {
4233
             "name": "livewire/livewire",
4233
             "name": "livewire/livewire",
4234
-            "version": "v3.5.17",
4234
+            "version": "v3.5.12",
4235
             "source": {
4235
             "source": {
4236
                 "type": "git",
4236
                 "type": "git",
4237
                 "url": "https://github.com/livewire/livewire.git",
4237
                 "url": "https://github.com/livewire/livewire.git",
4238
-                "reference": "7bbf80d93db9b866776bf957ca6229364bca8d87"
4238
+                "reference": "3c8d1f9d7d9098aaea663093ae168f2d5d2ae73d"
4239
             },
4239
             },
4240
             "dist": {
4240
             "dist": {
4241
                 "type": "zip",
4241
                 "type": "zip",
4242
-                "url": "https://api.github.com/repos/livewire/livewire/zipball/7bbf80d93db9b866776bf957ca6229364bca8d87",
4243
-                "reference": "7bbf80d93db9b866776bf957ca6229364bca8d87",
4242
+                "url": "https://api.github.com/repos/livewire/livewire/zipball/3c8d1f9d7d9098aaea663093ae168f2d5d2ae73d",
4243
+                "reference": "3c8d1f9d7d9098aaea663093ae168f2d5d2ae73d",
4244
                 "shasum": ""
4244
                 "shasum": ""
4245
             },
4245
             },
4246
             "require": {
4246
             "require": {
4295
             "description": "A front-end framework for Laravel.",
4295
             "description": "A front-end framework for Laravel.",
4296
             "support": {
4296
             "support": {
4297
                 "issues": "https://github.com/livewire/livewire/issues",
4297
                 "issues": "https://github.com/livewire/livewire/issues",
4298
-                "source": "https://github.com/livewire/livewire/tree/v3.5.17"
4298
+                "source": "https://github.com/livewire/livewire/tree/v3.5.12"
4299
             },
4299
             },
4300
             "funding": [
4300
             "funding": [
4301
                 {
4301
                 {
4303
                     "type": "github"
4303
                     "type": "github"
4304
                 }
4304
                 }
4305
             ],
4305
             ],
4306
-            "time": "2024-12-06T13:41:21+00:00"
4306
+            "time": "2024-10-15T19:35:06+00:00"
4307
         },
4307
         },
4308
         {
4308
         {
4309
             "name": "masterminds/html5",
4309
             "name": "masterminds/html5",
5350
         },
5350
         },
5351
         {
5351
         {
5352
             "name": "phpseclib/phpseclib",
5352
             "name": "phpseclib/phpseclib",
5353
-            "version": "3.0.42",
5353
+            "version": "3.0.43",
5354
             "source": {
5354
             "source": {
5355
                 "type": "git",
5355
                 "type": "git",
5356
                 "url": "https://github.com/phpseclib/phpseclib.git",
5356
                 "url": "https://github.com/phpseclib/phpseclib.git",
5357
-                "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98"
5357
+                "reference": "709ec107af3cb2f385b9617be72af8cf62441d02"
5358
             },
5358
             },
5359
             "dist": {
5359
             "dist": {
5360
                 "type": "zip",
5360
                 "type": "zip",
5361
-                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/db92f1b1987b12b13f248fe76c3a52cadb67bb98",
5362
-                "reference": "db92f1b1987b12b13f248fe76c3a52cadb67bb98",
5361
+                "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/709ec107af3cb2f385b9617be72af8cf62441d02",
5362
+                "reference": "709ec107af3cb2f385b9617be72af8cf62441d02",
5363
                 "shasum": ""
5363
                 "shasum": ""
5364
             },
5364
             },
5365
             "require": {
5365
             "require": {
5440
             ],
5440
             ],
5441
             "support": {
5441
             "support": {
5442
                 "issues": "https://github.com/phpseclib/phpseclib/issues",
5442
                 "issues": "https://github.com/phpseclib/phpseclib/issues",
5443
-                "source": "https://github.com/phpseclib/phpseclib/tree/3.0.42"
5443
+                "source": "https://github.com/phpseclib/phpseclib/tree/3.0.43"
5444
             },
5444
             },
5445
             "funding": [
5445
             "funding": [
5446
                 {
5446
                 {
5456
                     "type": "tidelift"
5456
                     "type": "tidelift"
5457
                 }
5457
                 }
5458
             ],
5458
             ],
5459
-            "time": "2024-09-16T03:06:04+00:00"
5459
+            "time": "2024-12-14T21:12:59+00:00"
5460
         },
5460
         },
5461
         {
5461
         {
5462
             "name": "psr/cache",
5462
             "name": "psr/cache",
9241
     "packages-dev": [
9241
     "packages-dev": [
9242
         {
9242
         {
9243
             "name": "brianium/paratest",
9243
             "name": "brianium/paratest",
9244
-            "version": "v7.6.3",
9244
+            "version": "v7.7.0",
9245
             "source": {
9245
             "source": {
9246
                 "type": "git",
9246
                 "type": "git",
9247
                 "url": "https://github.com/paratestphp/paratest.git",
9247
                 "url": "https://github.com/paratestphp/paratest.git",
9248
-                "reference": "ae3c9f1aeda7daa374c904b35ece8f574f56d176"
9248
+                "reference": "4fb3f73bc5a4c3146bac2850af7dc72435a32daf"
9249
             },
9249
             },
9250
             "dist": {
9250
             "dist": {
9251
                 "type": "zip",
9251
                 "type": "zip",
9252
-                "url": "https://api.github.com/repos/paratestphp/paratest/zipball/ae3c9f1aeda7daa374c904b35ece8f574f56d176",
9253
-                "reference": "ae3c9f1aeda7daa374c904b35ece8f574f56d176",
9252
+                "url": "https://api.github.com/repos/paratestphp/paratest/zipball/4fb3f73bc5a4c3146bac2850af7dc72435a32daf",
9253
+                "reference": "4fb3f73bc5a4c3146bac2850af7dc72435a32daf",
9254
                 "shasum": ""
9254
                 "shasum": ""
9255
             },
9255
             },
9256
             "require": {
9256
             "require": {
9261
                 "fidry/cpu-core-counter": "^1.2.0",
9261
                 "fidry/cpu-core-counter": "^1.2.0",
9262
                 "jean85/pretty-package-versions": "^2.1.0",
9262
                 "jean85/pretty-package-versions": "^2.1.0",
9263
                 "php": "~8.2.0 || ~8.3.0 || ~8.4.0",
9263
                 "php": "~8.2.0 || ~8.3.0 || ~8.4.0",
9264
-                "phpunit/php-code-coverage": "^11.0.7",
9264
+                "phpunit/php-code-coverage": "^11.0.8",
9265
                 "phpunit/php-file-iterator": "^5.1.0",
9265
                 "phpunit/php-file-iterator": "^5.1.0",
9266
                 "phpunit/php-timer": "^7.0.1",
9266
                 "phpunit/php-timer": "^7.0.1",
9267
-                "phpunit/phpunit": "^11.5.0",
9267
+                "phpunit/phpunit": "^11.5.1",
9268
                 "sebastian/environment": "^7.2.0",
9268
                 "sebastian/environment": "^7.2.0",
9269
-                "symfony/console": "^6.4.14 || ^7.2.0",
9269
+                "symfony/console": "^6.4.14 || ^7.2.1",
9270
                 "symfony/process": "^6.4.14 || ^7.2.0"
9270
                 "symfony/process": "^6.4.14 || ^7.2.0"
9271
             },
9271
             },
9272
             "require-dev": {
9272
             "require-dev": {
9318
             ],
9318
             ],
9319
             "support": {
9319
             "support": {
9320
                 "issues": "https://github.com/paratestphp/paratest/issues",
9320
                 "issues": "https://github.com/paratestphp/paratest/issues",
9321
-                "source": "https://github.com/paratestphp/paratest/tree/v7.6.3"
9321
+                "source": "https://github.com/paratestphp/paratest/tree/v7.7.0"
9322
             },
9322
             },
9323
             "funding": [
9323
             "funding": [
9324
                 {
9324
                 {
9330
                     "type": "paypal"
9330
                     "type": "paypal"
9331
                 }
9331
                 }
9332
             ],
9332
             ],
9333
-            "time": "2024-12-10T13:59:28+00:00"
9333
+            "time": "2024-12-11T14:50:44+00:00"
9334
         },
9334
         },
9335
         {
9335
         {
9336
             "name": "fakerphp/faker",
9336
             "name": "fakerphp/faker",
10008
         },
10008
         },
10009
         {
10009
         {
10010
             "name": "pestphp/pest",
10010
             "name": "pestphp/pest",
10011
-            "version": "v3.7.0",
10011
+            "version": "v3.7.1",
10012
             "source": {
10012
             "source": {
10013
                 "type": "git",
10013
                 "type": "git",
10014
                 "url": "https://github.com/pestphp/pest.git",
10014
                 "url": "https://github.com/pestphp/pest.git",
10015
-                "reference": "9688b83a3d7d0acdda21c01b8aeb933ec9fcd556"
10015
+                "reference": "bf3178473dcaa53b0458f21dfdb271306ea62512"
10016
             },
10016
             },
10017
             "dist": {
10017
             "dist": {
10018
                 "type": "zip",
10018
                 "type": "zip",
10019
-                "url": "https://api.github.com/repos/pestphp/pest/zipball/9688b83a3d7d0acdda21c01b8aeb933ec9fcd556",
10020
-                "reference": "9688b83a3d7d0acdda21c01b8aeb933ec9fcd556",
10019
+                "url": "https://api.github.com/repos/pestphp/pest/zipball/bf3178473dcaa53b0458f21dfdb271306ea62512",
10020
+                "reference": "bf3178473dcaa53b0458f21dfdb271306ea62512",
10021
                 "shasum": ""
10021
                 "shasum": ""
10022
             },
10022
             },
10023
             "require": {
10023
             "require": {
10024
-                "brianium/paratest": "^7.6.2",
10024
+                "brianium/paratest": "^7.7.0",
10025
                 "nunomaduro/collision": "^8.5.0",
10025
                 "nunomaduro/collision": "^8.5.0",
10026
                 "nunomaduro/termwind": "^2.3.0",
10026
                 "nunomaduro/termwind": "^2.3.0",
10027
                 "pestphp/pest-plugin": "^3.0.0",
10027
                 "pestphp/pest-plugin": "^3.0.0",
10028
                 "pestphp/pest-plugin-arch": "^3.0.0",
10028
                 "pestphp/pest-plugin-arch": "^3.0.0",
10029
                 "pestphp/pest-plugin-mutate": "^3.0.5",
10029
                 "pestphp/pest-plugin-mutate": "^3.0.5",
10030
                 "php": "^8.2.0",
10030
                 "php": "^8.2.0",
10031
-                "phpunit/phpunit": "^11.5.0"
10031
+                "phpunit/phpunit": "^11.5.1"
10032
             },
10032
             },
10033
             "conflict": {
10033
             "conflict": {
10034
                 "filp/whoops": "<2.16.0",
10034
                 "filp/whoops": "<2.16.0",
10035
-                "phpunit/phpunit": ">11.5.0",
10035
+                "phpunit/phpunit": ">11.5.1",
10036
                 "sebastian/exporter": "<6.0.0",
10036
                 "sebastian/exporter": "<6.0.0",
10037
                 "webmozart/assert": "<1.11.0"
10037
                 "webmozart/assert": "<1.11.0"
10038
             },
10038
             },
10104
             ],
10104
             ],
10105
             "support": {
10105
             "support": {
10106
                 "issues": "https://github.com/pestphp/pest/issues",
10106
                 "issues": "https://github.com/pestphp/pest/issues",
10107
-                "source": "https://github.com/pestphp/pest/tree/v3.7.0"
10107
+                "source": "https://github.com/pestphp/pest/tree/v3.7.1"
10108
             },
10108
             },
10109
             "funding": [
10109
             "funding": [
10110
                 {
10110
                 {
10116
                     "type": "github"
10116
                     "type": "github"
10117
                 }
10117
                 }
10118
             ],
10118
             ],
10119
-            "time": "2024-12-10T11:54:49+00:00"
10119
+            "time": "2024-12-12T11:52:01+00:00"
10120
         },
10120
         },
10121
         {
10121
         {
10122
             "name": "pestphp/pest-plugin",
10122
             "name": "pestphp/pest-plugin",
11061
         },
11061
         },
11062
         {
11062
         {
11063
             "name": "phpunit/phpunit",
11063
             "name": "phpunit/phpunit",
11064
-            "version": "11.5.0",
11064
+            "version": "11.5.1",
11065
             "source": {
11065
             "source": {
11066
                 "type": "git",
11066
                 "type": "git",
11067
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
11067
                 "url": "https://github.com/sebastianbergmann/phpunit.git",
11068
-                "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7"
11068
+                "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a"
11069
             },
11069
             },
11070
             "dist": {
11070
             "dist": {
11071
                 "type": "zip",
11071
                 "type": "zip",
11072
-                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0569902506a6c0878930b87ea79ec3b50ea563f7",
11073
-                "reference": "0569902506a6c0878930b87ea79ec3b50ea563f7",
11072
+                "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
11073
+                "reference": "2b94d4f2450b9869fa64a46fd8a6a41997aef56a",
11074
                 "shasum": ""
11074
                 "shasum": ""
11075
             },
11075
             },
11076
             "require": {
11076
             "require": {
11142
             "support": {
11142
             "support": {
11143
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
11143
                 "issues": "https://github.com/sebastianbergmann/phpunit/issues",
11144
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
11144
                 "security": "https://github.com/sebastianbergmann/phpunit/security/policy",
11145
-                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.0"
11145
+                "source": "https://github.com/sebastianbergmann/phpunit/tree/11.5.1"
11146
             },
11146
             },
11147
             "funding": [
11147
             "funding": [
11148
                 {
11148
                 {
11158
                     "type": "tidelift"
11158
                     "type": "tidelift"
11159
                 }
11159
                 }
11160
             ],
11160
             ],
11161
-            "time": "2024-12-06T05:57:38+00:00"
11161
+            "time": "2024-12-11T10:52:48+00:00"
11162
         },
11162
         },
11163
         {
11163
         {
11164
             "name": "pimple/pimple",
11164
             "name": "pimple/pimple",
11272
         },
11272
         },
11273
         {
11273
         {
11274
             "name": "sebastian/code-unit",
11274
             "name": "sebastian/code-unit",
11275
-            "version": "3.0.1",
11275
+            "version": "3.0.2",
11276
             "source": {
11276
             "source": {
11277
                 "type": "git",
11277
                 "type": "git",
11278
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
11278
                 "url": "https://github.com/sebastianbergmann/code-unit.git",
11279
-                "reference": "6bb7d09d6623567178cf54126afa9c2310114268"
11279
+                "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca"
11280
             },
11280
             },
11281
             "dist": {
11281
             "dist": {
11282
                 "type": "zip",
11282
                 "type": "zip",
11283
-                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/6bb7d09d6623567178cf54126afa9c2310114268",
11284
-                "reference": "6bb7d09d6623567178cf54126afa9c2310114268",
11283
+                "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
11284
+                "reference": "ee88b0cdbe74cf8dd3b54940ff17643c0d6543ca",
11285
                 "shasum": ""
11285
                 "shasum": ""
11286
             },
11286
             },
11287
             "require": {
11287
             "require": {
11288
                 "php": ">=8.2"
11288
                 "php": ">=8.2"
11289
             },
11289
             },
11290
             "require-dev": {
11290
             "require-dev": {
11291
-                "phpunit/phpunit": "^11.0"
11291
+                "phpunit/phpunit": "^11.5"
11292
             },
11292
             },
11293
             "type": "library",
11293
             "type": "library",
11294
             "extra": {
11294
             "extra": {
11317
             "support": {
11317
             "support": {
11318
                 "issues": "https://github.com/sebastianbergmann/code-unit/issues",
11318
                 "issues": "https://github.com/sebastianbergmann/code-unit/issues",
11319
                 "security": "https://github.com/sebastianbergmann/code-unit/security/policy",
11319
                 "security": "https://github.com/sebastianbergmann/code-unit/security/policy",
11320
-                "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.1"
11320
+                "source": "https://github.com/sebastianbergmann/code-unit/tree/3.0.2"
11321
             },
11321
             },
11322
             "funding": [
11322
             "funding": [
11323
                 {
11323
                 {
11325
                     "type": "github"
11325
                     "type": "github"
11326
                 }
11326
                 }
11327
             ],
11327
             ],
11328
-            "time": "2024-07-03T04:44:28+00:00"
11328
+            "time": "2024-12-12T09:59:06+00:00"
11329
         },
11329
         },
11330
         {
11330
         {
11331
             "name": "sebastian/code-unit-reverse-lookup",
11331
             "name": "sebastian/code-unit-reverse-lookup",

+ 3
- 1
database/factories/Accounting/AdjustmentFactory.php 파일 보기

30
     {
30
     {
31
         $startDate = $this->faker->dateTimeBetween('now', '+1 year');
31
         $startDate = $this->faker->dateTimeBetween('now', '+1 year');
32
         $endDate = $this->faker->dateTimeBetween($startDate, Carbon::parse($startDate)->addYear());
32
         $endDate = $this->faker->dateTimeBetween($startDate, Carbon::parse($startDate)->addYear());
33
+
34
+        /** @var AdjustmentComputation $computation */
33
         $computation = $this->faker->randomElement(AdjustmentComputation::class);
35
         $computation = $this->faker->randomElement(AdjustmentComputation::class);
34
 
36
 
35
-        $rate = $computation === AdjustmentComputation::Fixed
37
+        $rate = $computation->isFixed()
36
             ? $this->faker->numberBetween(5, 100) * 100 // $5 - $100 for fixed amounts
38
             ? $this->faker->numberBetween(5, 100) * 100 // $5 - $100 for fixed amounts
37
             : $this->faker->numberBetween(3, 25) * 10000; // 3% - 25% for percentages
39
             : $this->faker->numberBetween(3, 25) * 10000; // 3% - 25% for percentages
38
 
40
 

+ 3
- 0
database/migrations/2024_11_27_221657_create_bills_table.php 파일 보기

22
             $table->timestamp('paid_at')->nullable();
22
             $table->timestamp('paid_at')->nullable();
23
             $table->string('status')->default('unpaid');
23
             $table->string('status')->default('unpaid');
24
             $table->string('currency_code')->nullable();
24
             $table->string('currency_code')->nullable();
25
+            $table->string('discount_method')->default('per_line_item');
26
+            $table->string('discount_computation')->default('percentage');
27
+            $table->integer('discount_rate')->default(0);
25
             $table->integer('subtotal')->default(0);
28
             $table->integer('subtotal')->default(0);
26
             $table->integer('tax_total')->default(0);
29
             $table->integer('tax_total')->default(0);
27
             $table->integer('discount_total')->default(0);
30
             $table->integer('discount_total')->default(0);

+ 1
- 1
database/migrations/2024_11_27_223015_create_invoices_table.php 파일 보기

27
             $table->timestamp('last_sent')->nullable();
27
             $table->timestamp('last_sent')->nullable();
28
             $table->string('status')->default('draft');
28
             $table->string('status')->default('draft');
29
             $table->string('currency_code')->nullable();
29
             $table->string('currency_code')->nullable();
30
-            $table->string('discount_method')->default('line_items');
30
+            $table->string('discount_method')->default('per_line_item');
31
             $table->string('discount_computation')->default('percentage');
31
             $table->string('discount_computation')->default('percentage');
32
             $table->integer('discount_rate')->default(0);
32
             $table->integer('discount_rate')->default(0);
33
             $table->integer('subtotal')->default(0);
33
             $table->integer('subtotal')->default(0);

+ 16
- 16
package-lock.json 파일 보기

1014
             }
1014
             }
1015
         },
1015
         },
1016
         "node_modules/browserslist": {
1016
         "node_modules/browserslist": {
1017
-            "version": "4.24.2",
1018
-            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz",
1019
-            "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==",
1017
+            "version": "4.24.3",
1018
+            "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz",
1019
+            "integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==",
1020
             "dev": true,
1020
             "dev": true,
1021
             "funding": [
1021
             "funding": [
1022
                 {
1022
                 {
1034
             ],
1034
             ],
1035
             "license": "MIT",
1035
             "license": "MIT",
1036
             "dependencies": {
1036
             "dependencies": {
1037
-                "caniuse-lite": "^1.0.30001669",
1038
-                "electron-to-chromium": "^1.5.41",
1039
-                "node-releases": "^2.0.18",
1037
+                "caniuse-lite": "^1.0.30001688",
1038
+                "electron-to-chromium": "^1.5.73",
1039
+                "node-releases": "^2.0.19",
1040
                 "update-browserslist-db": "^1.1.1"
1040
                 "update-browserslist-db": "^1.1.1"
1041
             },
1041
             },
1042
             "bin": {
1042
             "bin": {
1057
             }
1057
             }
1058
         },
1058
         },
1059
         "node_modules/caniuse-lite": {
1059
         "node_modules/caniuse-lite": {
1060
-            "version": "1.0.30001687",
1061
-            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz",
1062
-            "integrity": "sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ==",
1060
+            "version": "1.0.30001688",
1061
+            "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz",
1062
+            "integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==",
1063
             "dev": true,
1063
             "dev": true,
1064
             "funding": [
1064
             "funding": [
1065
                 {
1065
                 {
1487
             }
1487
             }
1488
         },
1488
         },
1489
         "node_modules/is-core-module": {
1489
         "node_modules/is-core-module": {
1490
-            "version": "2.15.1",
1491
-            "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
1492
-            "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
1490
+            "version": "2.16.0",
1491
+            "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.0.tgz",
1492
+            "integrity": "sha512-urTSINYfAYgcbLb0yDQ6egFm6h3Mo1DcF9EkyXSRjjzdHbsulg01qhwWuXdOoUBuTkbQ80KDboXa0vFJ+BDH+g==",
1493
             "dev": true,
1493
             "dev": true,
1494
             "license": "MIT",
1494
             "license": "MIT",
1495
             "dependencies": {
1495
             "dependencies": {
2192
             }
2192
             }
2193
         },
2193
         },
2194
         "node_modules/resolve": {
2194
         "node_modules/resolve": {
2195
-            "version": "1.22.8",
2196
-            "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
2197
-            "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
2195
+            "version": "1.22.9",
2196
+            "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.9.tgz",
2197
+            "integrity": "sha512-QxrmX1DzraFIi9PxdG5VkRfRwIgjwyud+z/iBwfRRrVmHc+P9Q7u2lSSpQ6bjr2gy5lrqIiU9vb6iAeGf2400A==",
2198
             "dev": true,
2198
             "dev": true,
2199
             "license": "MIT",
2199
             "license": "MIT",
2200
             "dependencies": {
2200
             "dependencies": {
2201
-                "is-core-module": "^2.13.0",
2201
+                "is-core-module": "^2.16.0",
2202
                 "path-parse": "^1.0.7",
2202
                 "path-parse": "^1.0.7",
2203
                 "supports-preserve-symlinks-flag": "^1.0.0"
2203
                 "supports-preserve-symlinks-flag": "^1.0.0"
2204
             },
2204
             },

+ 9
- 6
resources/views/filament/forms/components/invoice-totals.blade.php 파일 보기

1
-@use('App\Utilities\Currency\CurrencyAccessor')
2
-
3
 @php
1
 @php
2
+    use App\Enums\Accounting\DocumentDiscountMethod;
3
+    use App\Utilities\Currency\CurrencyAccessor;
4
+    use App\View\Models\InvoiceTotalViewModel;
5
+
4
     $data = $this->form->getRawState();
6
     $data = $this->form->getRawState();
5
-    $viewModel = new \App\View\Models\InvoiceTotalViewModel($this->record, $data);
6
-    extract($viewModel->buildViewData(), \EXTR_SKIP);
7
+    $viewModel = new InvoiceTotalViewModel($this->record, $data);
8
+    extract($viewModel->buildViewData(), EXTR_SKIP);
7
 
9
 
8
-    $isInvoiceLevelDiscount = $data['discount_method'] === 'invoice';
10
+    $discountMethod = DocumentDiscountMethod::parse($data['discount_method']);
11
+    $isPerDocumentDiscount = $discountMethod->isPerDocument();
9
 @endphp
12
 @endphp
10
 
13
 
11
 <div class="totals-summary w-full pr-14">
14
 <div class="totals-summary w-full pr-14">
29
                 <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Taxes:</td>
32
                 <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Taxes:</td>
30
                 <td class="text-sm pl-4 py-2 leading-6">{{ $taxTotal }}</td>
33
                 <td class="text-sm pl-4 py-2 leading-6">{{ $taxTotal }}</td>
31
             </tr>
34
             </tr>
32
-            @if($isInvoiceLevelDiscount)
35
+            @if($isPerDocumentDiscount)
33
                 <tr>
36
                 <tr>
34
                     <td colspan="4" class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white text-right">Discount:</td>
37
                     <td colspan="4" class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white text-right">Discount:</td>
35
                     <td class="text-sm px-4 py-2">
38
                     <td class="text-sm px-4 py-2">

Loading…
취소
저장