Andrew Wallo 8 months ago
parent
commit
387f027aea
28 changed files with 318 additions and 283 deletions
  1. 1
    1
      app/Contracts/BalanceFormattable.php
  2. 2
    2
      app/DTO/AccountBalanceDTO.php
  3. 2
    2
      app/DTO/AgingBucketDTO.php
  4. 0
    13
      app/DTO/ClientReportDTO.php
  5. 2
    2
      app/DTO/EntityBalanceDTO.php
  6. 2
    1
      app/DTO/EntityReportDTO.php
  7. 1
    1
      app/DTO/ReportDTO.php
  8. 0
    12
      app/DTO/VendorReportDTO.php
  9. 4
    3
      app/Enums/Accounting/BillStatus.php
  10. 9
    1
      app/Enums/Accounting/DocumentEntityType.php
  11. 6
    5
      app/Filament/Company/Pages/Reports.php
  12. 102
    0
      app/Filament/Company/Pages/Reports/BaseEntityBalanceSummaryReportPage.php
  13. 4
    89
      app/Filament/Company/Pages/Reports/ClientBalanceSummary.php
  14. 13
    0
      app/Filament/Company/Pages/Reports/VendorBalanceSummary.php
  15. 1
    1
      app/Filament/Company/Resources/Purchases/BillResource.php
  16. 3
    3
      app/Filament/Company/Resources/Purchases/BillResource/Pages/ListBills.php
  17. 1
    1
      app/Filament/Company/Resources/Purchases/BillResource/Widgets/BillOverview.php
  18. 2
    2
      app/Filament/Company/Resources/Purchases/VendorResource.php
  19. 1
    1
      app/Filament/Company/Resources/Purchases/VendorResource/Widgets/BillOverview.php
  20. 3
    3
      app/Models/Accounting/Bill.php
  21. 1
    1
      app/Services/AccountService.php
  22. 53
    40
      app/Services/ReportService.php
  23. 1
    1
      app/Transformers/AgingReportTransformer.php
  24. 23
    14
      app/Transformers/EntityBalanceSummaryReportTransformer.php
  25. 1
    1
      database/factories/Accounting/BillFactory.php
  26. 1
    1
      database/migrations/2024_11_27_221657_create_bills_table.php
  27. 79
    79
      package-lock.json
  28. 0
    3
      resources/views/filament/company/pages/reports/income-by-customer.blade.php

app/Contracts/MoneyFormattableDTO.php → app/Contracts/BalanceFormattable.php View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 namespace App\Contracts;
4 4
 
5
-interface MoneyFormattableDTO
5
+interface BalanceFormattable
6 6
 {
7 7
     public static function fromArray(array $balances): static;
8 8
 }

+ 2
- 2
app/DTO/AccountBalanceDTO.php View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 namespace App\DTO;
4 4
 
5
-use App\Contracts\MoneyFormattableDTO;
5
+use App\Contracts\BalanceFormattable;
6 6
 
7
-class AccountBalanceDTO implements MoneyFormattableDTO
7
+class AccountBalanceDTO implements BalanceFormattable
8 8
 {
9 9
     public function __construct(
10 10
         public ?string $startingBalance,

+ 2
- 2
app/DTO/AgingBucketDTO.php View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 namespace App\DTO;
4 4
 
5
-use App\Contracts\MoneyFormattableDTO;
5
+use App\Contracts\BalanceFormattable;
6 6
 
7
-readonly class AgingBucketDTO implements MoneyFormattableDTO
7
+readonly class AgingBucketDTO implements BalanceFormattable
8 8
 {
9 9
     /**
10 10
      * @param  array<string, string>  $periods

+ 0
- 13
app/DTO/ClientReportDTO.php View File

@@ -1,13 +0,0 @@
1
-<?php
2
-
3
-namespace App\DTO;
4
-
5
-readonly class ClientReportDTO
6
-{
7
-    public function __construct(
8
-        public string $clientName,
9
-        public string $clientId,
10
-        public ?AgingBucketDTO $aging = null,
11
-        public ?ClientBalanceDTO $balance = null,
12
-    ) {}
13
-}

app/DTO/ClientBalanceDTO.php → app/DTO/EntityBalanceDTO.php View File

@@ -2,9 +2,9 @@
2 2
 
3 3
 namespace App\DTO;
4 4
 
5
-use App\Contracts\MoneyFormattableDTO;
5
+use App\Contracts\BalanceFormattable;
6 6
 
7
-class ClientBalanceDTO implements MoneyFormattableDTO
7
+readonly class EntityBalanceDTO implements BalanceFormattable
8 8
 {
9 9
     public function __construct(
10 10
         public ?string $totalBalance,

+ 2
- 1
app/DTO/EntityReportDTO.php View File

@@ -7,6 +7,7 @@ readonly class EntityReportDTO
7 7
     public function __construct(
8 8
         public string $name,
9 9
         public string $id,
10
-        public AgingBucketDTO $aging,
10
+        public ?AgingBucketDTO $aging = null,
11
+        public ?EntityBalanceDTO $balance = null,
11 12
     ) {}
12 13
 }

+ 1
- 1
app/DTO/ReportDTO.php View File

@@ -13,7 +13,7 @@ class ReportDTO
13 13
         public array $categories,
14 14
         public ?AccountBalanceDTO $overallTotal = null,
15 15
         public ?AgingBucketDTO $agingSummary = null,
16
-        public ?ClientBalanceDTO $clientBalanceTotal = null,
16
+        public ?EntityBalanceDTO $entityBalanceTotal = null,
17 17
         public array $fields = [],
18 18
         public ?string $reportType = null,
19 19
         public ?CashFlowOverviewDTO $overview = null,

+ 0
- 12
app/DTO/VendorReportDTO.php View File

@@ -1,12 +0,0 @@
1
-<?php
2
-
3
-namespace App\DTO;
4
-
5
-readonly class VendorReportDTO
6
-{
7
-    public function __construct(
8
-        public string $vendorName,
9
-        public string $vendorId,
10
-        public AgingBucketDTO $aging,
11
-    ) {}
12
-}

+ 4
- 3
app/Enums/Accounting/BillStatus.php View File

@@ -10,7 +10,7 @@ enum BillStatus: string implements HasColor, HasLabel
10 10
     case Overdue = 'overdue';
11 11
     case Partial = 'partial';
12 12
     case Paid = 'paid';
13
-    case Unpaid = 'unpaid';
13
+    case Open = 'open';
14 14
     case Void = 'void';
15 15
 
16 16
     public function getLabel(): ?string
@@ -21,8 +21,9 @@ enum BillStatus: string implements HasColor, HasLabel
21 21
     public function getColor(): string | array | null
22 22
     {
23 23
         return match ($this) {
24
+            self::Open => 'info',
24 25
             self::Overdue => 'danger',
25
-            self::Partial, self::Unpaid => 'warning',
26
+            self::Partial => 'warning',
26 27
             self::Paid => 'success',
27 28
             self::Void => 'gray',
28 29
         };
@@ -32,7 +33,7 @@ enum BillStatus: string implements HasColor, HasLabel
32 33
     {
33 34
         return [
34 35
             self::Partial,
35
-            self::Unpaid,
36
+            self::Open,
36 37
         ];
37 38
     }
38 39
 }

+ 9
- 1
app/Enums/Accounting/DocumentEntityType.php View File

@@ -14,11 +14,19 @@ enum DocumentEntityType: string implements HasLabel
14 14
         return $this->name;
15 15
     }
16 16
 
17
-    public function getReportTitle(): string
17
+    public function getAgingReportTitle(): string
18 18
     {
19 19
         return match ($this) {
20 20
             self::Client => 'Accounts Receivable Aging',
21 21
             self::Vendor => 'Accounts Payable Aging',
22 22
         };
23 23
     }
24
+
25
+    public function getBalanceSummaryReportTitle(): string
26
+    {
27
+        return match ($this) {
28
+            self::Client => 'Client Balance Summary',
29
+            self::Vendor => 'Vendor Balance Summary',
30
+        };
31
+    }
24 32
 }

+ 6
- 5
app/Filament/Company/Pages/Reports.php View File

@@ -11,6 +11,7 @@ use App\Filament\Company\Pages\Reports\CashFlowStatement;
11 11
 use App\Filament\Company\Pages\Reports\ClientBalanceSummary;
12 12
 use App\Filament\Company\Pages\Reports\IncomeStatement;
13 13
 use App\Filament\Company\Pages\Reports\TrialBalance;
14
+use App\Filament\Company\Pages\Reports\VendorBalanceSummary;
14 15
 use App\Filament\Infolists\Components\ReportEntry;
15 16
 use Filament\Infolists\Components\Section;
16 17
 use Filament\Infolists\Infolist;
@@ -107,13 +108,13 @@ class Reports extends Page
107 108
                             ->icon('heroicon-o-clock')
108 109
                             ->iconColor(Color::Rose)
109 110
                             ->url(AccountsPayableAging::getUrl()),
110
-                        ReportEntry::make('expenses_by_vendor')
111
+                        ReportEntry::make('vendor_balance_summary')
111 112
                             ->hiddenLabel()
112
-                            ->heading('Expenses by Vendor')
113
-                            ->description('Shows expenses incurred with each vendor, helping identify top vendors and opportunities for cost savings.')
114
-                            ->icon('heroicon-o-arrow-trending-down')
113
+                            ->heading('Vendor Balance Summary')
114
+                            ->description('Shows total billed amounts, payments made, and outstanding balances for each vendor, helping track payment obligations and vendor relationships.')
115
+                            ->icon('heroicon-o-banknotes')
115 116
                             ->iconColor(Color::Orange)
116
-                            ->url('#'),
117
+                            ->url(VendorBalanceSummary::getUrl()),
117 118
                     ]),
118 119
                 Section::make('Detailed Reports')
119 120
                     ->aside()

+ 102
- 0
app/Filament/Company/Pages/Reports/BaseEntityBalanceSummaryReportPage.php View File

@@ -0,0 +1,102 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Pages\Reports;
4
+
5
+use App\Contracts\ExportableReport;
6
+use App\DTO\ReportDTO;
7
+use App\Enums\Accounting\DocumentEntityType;
8
+use App\Services\ExportService;
9
+use App\Services\ReportService;
10
+use App\Support\Column;
11
+use App\Transformers\EntityBalanceSummaryReportTransformer;
12
+use Filament\Forms\Form;
13
+use Filament\Support\Enums\Alignment;
14
+use Guava\FilamentClusters\Forms\Cluster;
15
+use Symfony\Component\HttpFoundation\StreamedResponse;
16
+
17
+abstract class BaseEntityBalanceSummaryReportPage extends BaseReportPage
18
+{
19
+    protected static string $view = 'filament.company.pages.reports.detailed-report';
20
+
21
+    protected ReportService $reportService;
22
+
23
+    protected ExportService $exportService;
24
+
25
+    abstract protected function getEntityType(): DocumentEntityType;
26
+
27
+    public function boot(ReportService $reportService, ExportService $exportService): void
28
+    {
29
+        $this->reportService = $reportService;
30
+        $this->exportService = $exportService;
31
+    }
32
+
33
+    public function getTable(): array
34
+    {
35
+        return [
36
+            Column::make('entity_name')
37
+                ->label($this->getEntityType()->getLabel())
38
+                ->alignment(Alignment::Left),
39
+            Column::make('total_balance')
40
+                ->label('Total')
41
+                ->toggleable()
42
+                ->alignment(Alignment::Right),
43
+            Column::make('paid_balance')
44
+                ->label('Paid')
45
+                ->toggleable()
46
+                ->alignment(Alignment::Right),
47
+            Column::make('unpaid_balance')
48
+                ->label('Unpaid')
49
+                ->toggleable()
50
+                ->alignment(Alignment::Right),
51
+        ];
52
+    }
53
+
54
+    public function filtersForm(Form $form): Form
55
+    {
56
+        return $form
57
+            ->inlineLabel()
58
+            ->columns()
59
+            ->schema([
60
+                $this->getDateRangeFormComponent(),
61
+                Cluster::make([
62
+                    $this->getStartDateFormComponent(),
63
+                    $this->getEndDateFormComponent(),
64
+                ])->hiddenLabel(),
65
+            ]);
66
+    }
67
+
68
+    protected function buildReport(array $columns): ReportDTO
69
+    {
70
+        return $this->reportService->buildEntityBalanceSummaryReport(
71
+            startDate: $this->getFormattedStartDate(),
72
+            endDate: $this->getFormattedEndDate(),
73
+            entityType: $this->getEntityType(),
74
+            columns: $columns
75
+        );
76
+    }
77
+
78
+    protected function getTransformer(ReportDTO $reportDTO): ExportableReport
79
+    {
80
+        return new EntityBalanceSummaryReportTransformer($reportDTO, $this->getEntityType());
81
+    }
82
+
83
+    public function exportCSV(): StreamedResponse
84
+    {
85
+        return $this->exportService->exportToCsv(
86
+            $this->company,
87
+            $this->report,
88
+            $this->getFilterState('startDate'),
89
+            $this->getFilterState('endDate')
90
+        );
91
+    }
92
+
93
+    public function exportPDF(): StreamedResponse
94
+    {
95
+        return $this->exportService->exportToPdf(
96
+            $this->company,
97
+            $this->report,
98
+            $this->getFilterState('startDate'),
99
+            $this->getFilterState('endDate')
100
+        );
101
+    }
102
+}

+ 4
- 89
app/Filament/Company/Pages/Reports/ClientBalanceSummary.php View File

@@ -2,97 +2,12 @@
2 2
 
3 3
 namespace App\Filament\Company\Pages\Reports;
4 4
 
5
-use App\Contracts\ExportableReport;
6
-use App\DTO\ReportDTO;
7
-use App\Services\ExportService;
8
-use App\Services\ReportService;
9
-use App\Support\Column;
10
-use App\Transformers\ClientBalanceSummaryReportTransformer;
11
-use Filament\Forms\Form;
12
-use Filament\Support\Enums\Alignment;
13
-use Guava\FilamentClusters\Forms\Cluster;
14
-use Symfony\Component\HttpFoundation\StreamedResponse;
5
+use App\Enums\Accounting\DocumentEntityType;
15 6
 
16
-class ClientBalanceSummary extends BaseReportPage
7
+class ClientBalanceSummary extends BaseEntityBalanceSummaryReportPage
17 8
 {
18
-    protected static string $view = 'filament.company.pages.reports.detailed-report';
19
-
20
-    protected ReportService $reportService;
21
-
22
-    protected ExportService $exportService;
23
-
24
-    public function boot(ReportService $reportService, ExportService $exportService): void
25
-    {
26
-        $this->reportService = $reportService;
27
-        $this->exportService = $exportService;
28
-    }
29
-
30
-    public function getTable(): array
31
-    {
32
-        return [
33
-            Column::make('client_name')
34
-                ->label('Client')
35
-                ->alignment(Alignment::Left),
36
-            Column::make('total_balance')
37
-                ->label('Total')
38
-                ->toggleable()
39
-                ->alignment(Alignment::Right),
40
-            Column::make('paid_balance')
41
-                ->label('Paid')
42
-                ->toggleable()
43
-                ->alignment(Alignment::Right),
44
-            Column::make('unpaid_balance')
45
-                ->label('Unpaid')
46
-                ->toggleable()
47
-                ->alignment(Alignment::Right),
48
-        ];
49
-    }
50
-
51
-    public function filtersForm(Form $form): Form
52
-    {
53
-        return $form
54
-            ->inlineLabel()
55
-            ->columns()
56
-            ->schema([
57
-                $this->getDateRangeFormComponent(),
58
-                Cluster::make([
59
-                    $this->getStartDateFormComponent(),
60
-                    $this->getEndDateFormComponent(),
61
-                ])->hiddenLabel(),
62
-            ]);
63
-    }
64
-
65
-    protected function buildReport(array $columns): ReportDTO
66
-    {
67
-        return $this->reportService->buildClientBalanceSummaryReport(
68
-            $this->getFormattedStartDate(),
69
-            $this->getFormattedEndDate(),
70
-            $columns
71
-        );
72
-    }
73
-
74
-    protected function getTransformer(ReportDTO $reportDTO): ExportableReport
75
-    {
76
-        return new ClientBalanceSummaryReportTransformer($reportDTO);
77
-    }
78
-
79
-    public function exportCSV(): StreamedResponse
80
-    {
81
-        return $this->exportService->exportToCsv(
82
-            $this->company,
83
-            $this->report,
84
-            $this->getFilterState('startDate'),
85
-            $this->getFilterState('endDate')
86
-        );
87
-    }
88
-
89
-    public function exportPDF(): StreamedResponse
9
+    protected function getEntityType(): DocumentEntityType
90 10
     {
91
-        return $this->exportService->exportToPdf(
92
-            $this->company,
93
-            $this->report,
94
-            $this->getFilterState('startDate'),
95
-            $this->getFilterState('endDate')
96
-        );
11
+        return DocumentEntityType::Client;
97 12
     }
98 13
 }

+ 13
- 0
app/Filament/Company/Pages/Reports/VendorBalanceSummary.php View File

@@ -0,0 +1,13 @@
1
+<?php
2
+
3
+namespace App\Filament\Company\Pages\Reports;
4
+
5
+use App\Enums\Accounting\DocumentEntityType;
6
+
7
+class VendorBalanceSummary extends BaseEntityBalanceSummaryReportPage
8
+{
9
+    protected function getEntityType(): DocumentEntityType
10
+    {
11
+        return DocumentEntityType::Vendor;
12
+    }
13
+}

+ 1
- 1
app/Filament/Company/Resources/Purchases/BillResource.php View File

@@ -400,7 +400,7 @@ class BillResource extends Resource
400 400
                             'paid_at',
401 401
                         ])
402 402
                         ->beforeReplicaSaved(function (Bill $replica) {
403
-                            $replica->status = BillStatus::Unpaid;
403
+                            $replica->status = BillStatus::Open;
404 404
                             $replica->bill_number = Bill::getNextDocumentNumber();
405 405
                             $replica->date = now();
406 406
                             $replica->due_date = now()->addDays($replica->company->defaultBill->payment_terms->getDays());

+ 3
- 3
app/Filament/Company/Resources/Purchases/BillResource/Pages/ListBills.php View File

@@ -42,10 +42,10 @@ class ListBills extends ListRecords
42 42
             'all' => Tab::make()
43 43
                 ->label('All'),
44 44
 
45
-            'outstanding' => Tab::make()
46
-                ->label('Outstanding')
45
+            'unpaid' => Tab::make()
46
+                ->label('Unpaid')
47 47
                 ->modifyQueryUsing(function (Builder $query) {
48
-                    $query->outstanding();
48
+                    $query->unpaid();
49 49
                 }),
50 50
 
51 51
             'paid' => Tab::make()

+ 1
- 1
app/Filament/Company/Resources/Purchases/BillResource/Widgets/BillOverview.php View File

@@ -22,7 +22,7 @@ class BillOverview extends EnhancedStatsOverviewWidget
22 22
     protected function getStats(): array
23 23
     {
24 24
         $unpaidBills = $this->getPageTableQuery()
25
-            ->whereIn('status', [BillStatus::Unpaid, BillStatus::Partial, BillStatus::Overdue]);
25
+            ->whereIn('status', [BillStatus::Open, BillStatus::Partial, BillStatus::Overdue]);
26 26
 
27 27
         $amountToPay = $unpaidBills->get()->sumMoneyInDefaultCurrency('amount_due');
28 28
 

+ 2
- 2
app/Filament/Company/Resources/Purchases/VendorResource.php View File

@@ -180,7 +180,7 @@ class VendorResource extends Resource
180 180
                     ->label('Payable balance')
181 181
                     ->getStateUsing(function (Vendor $vendor) {
182 182
                         return $vendor->bills()
183
-                            ->outstanding()
183
+                            ->unpaid()
184 184
                             ->get()
185 185
                             ->sumMoneyInDefaultCurrency('amount_due');
186 186
                     })
@@ -200,7 +200,7 @@ class VendorResource extends Resource
200 200
                     })
201 201
                     ->sortable(query: function (Builder $query, string $direction) {
202 202
                         return $query
203
-                            ->withSum(['bills' => fn (Builder $query) => $query->outstanding()], 'amount_due')
203
+                            ->withSum(['bills' => fn (Builder $query) => $query->unpaid()], 'amount_due')
204 204
                             ->orderBy('bills_sum_amount_due', $direction);
205 205
                     })
206 206
                     ->currency(convert: false)

+ 1
- 1
app/Filament/Company/Resources/Purchases/VendorResource/Widgets/BillOverview.php View File

@@ -16,7 +16,7 @@ class BillOverview extends EnhancedStatsOverviewWidget
16 16
     protected function getStats(): array
17 17
     {
18 18
         $unpaidBills = $this->record->bills()
19
-            ->whereIn('status', [BillStatus::Unpaid, BillStatus::Partial, BillStatus::Overdue]);
19
+            ->whereIn('status', [BillStatus::Open, BillStatus::Partial, BillStatus::Overdue]);
20 20
 
21 21
         $amountToPay = $unpaidBills->get()->sumMoneyInDefaultCurrency('amount_due');
22 22
 

+ 3
- 3
app/Models/Accounting/Bill.php View File

@@ -209,10 +209,10 @@ class Bill extends Document
209 209
         return $this->initialTransaction()->exists();
210 210
     }
211 211
 
212
-    public function scopeOutstanding(Builder $query): Builder
212
+    public function scopeUnpaid(Builder $query): Builder
213 213
     {
214 214
         return $query->whereIn('status', [
215
-            BillStatus::Unpaid,
215
+            BillStatus::Open,
216 216
             BillStatus::Partial,
217 217
             BillStatus::Overdue,
218 218
         ]);
@@ -396,7 +396,7 @@ class Bill extends Document
396 396
             ])
397 397
             ->modal(false)
398 398
             ->beforeReplicaSaved(function (self $original, self $replica) {
399
-                $replica->status = BillStatus::Unpaid;
399
+                $replica->status = BillStatus::Open;
400 400
                 $replica->bill_number = self::getNextDocumentNumber();
401 401
                 $replica->date = now();
402 402
                 $replica->due_date = now()->addDays($original->company->defaultBill->payment_terms->getDays());

+ 1
- 1
app/Services/AccountService.php View File

@@ -403,7 +403,7 @@ class AccountService
403 403
                 DB::raw('DATEDIFF(?, bills.due_date) as days_overdue'),
404 404
             ])
405 405
             ->addBinding([$asOfDate], 'select')
406
-            ->outstanding()
406
+            ->unpaid()
407 407
             ->where('amount_due', '>', 0);
408 408
     }
409 409
 }

+ 53
- 40
app/Services/ReportService.php View File

@@ -3,7 +3,7 @@
3 3
 namespace App\Services;
4 4
 
5 5
 use App\Collections\Accounting\DocumentCollection;
6
-use App\Contracts\MoneyFormattableDTO;
6
+use App\Contracts\BalanceFormattable;
7 7
 use App\DTO\AccountBalanceDTO;
8 8
 use App\DTO\AccountCategoryDTO;
9 9
 use App\DTO\AccountDTO;
@@ -11,12 +11,12 @@ use App\DTO\AccountTransactionDTO;
11 11
 use App\DTO\AccountTypeDTO;
12 12
 use App\DTO\AgingBucketDTO;
13 13
 use App\DTO\CashFlowOverviewDTO;
14
-use App\DTO\ClientBalanceDTO;
15
-use App\DTO\ClientReportDTO;
14
+use App\DTO\EntityBalanceDTO;
16 15
 use App\DTO\EntityReportDTO;
17 16
 use App\DTO\ReportDTO;
18 17
 use App\Enums\Accounting\AccountCategory;
19 18
 use App\Enums\Accounting\AccountType;
19
+use App\Enums\Accounting\BillStatus;
20 20
 use App\Enums\Accounting\DocumentEntityType;
21 21
 use App\Enums\Accounting\InvoiceStatus;
22 22
 use App\Enums\Accounting\TransactionType;
@@ -38,9 +38,9 @@ class ReportService
38 38
     ) {}
39 39
 
40 40
     /**
41
-     * @param  class-string<MoneyFormattableDTO>|null  $dtoClass
41
+     * @param  class-string<BalanceFormattable>|null  $dtoClass
42 42
      */
43
-    public function formatBalances(array $balances, ?string $dtoClass = null, bool $formatZeros = true): MoneyFormattableDTO | array
43
+    public function formatBalances(array $balances, ?string $dtoClass = null, bool $formatZeros = true): BalanceFormattable | array
44 44
     {
45 45
         $dtoClass ??= AccountBalanceDTO::class;
46 46
 
@@ -379,7 +379,7 @@ class ReportService
379 379
         return new ReportDTO(categories: $accountCategories, overallTotal: $formattedReportTotalBalances, fields: $columns, reportType: $trialBalanceType);
380 380
     }
381 381
 
382
-    public function getRetainedEarningsBalances(string $startDate, string $endDate): MoneyFormattableDTO | array
382
+    public function getRetainedEarningsBalances(string $startDate, string $endDate): BalanceFormattable | array
383 383
     {
384 384
         $retainedEarningsAmount = $this->calculateRetainedEarnings($startDate, $endDate)->getAmount();
385 385
 
@@ -522,7 +522,7 @@ class ReportService
522 522
         );
523 523
     }
524 524
 
525
-    private function calculateTotalCashFlows(array $sections, string $startDate): MoneyFormattableDTO | array
525
+    private function calculateTotalCashFlows(array $sections, string $startDate): BalanceFormattable | array
526 526
     {
527 527
         $totalInflow = 0;
528 528
         $totalOutflow = 0;
@@ -907,61 +907,74 @@ class ReportService
907 907
         );
908 908
     }
909 909
 
910
-    public function buildClientBalanceSummaryReport(string $startDate, string $endDate, array $columns = []): ReportDTO
910
+    public function buildEntityBalanceSummaryReport(string $startDate, string $endDate, DocumentEntityType $entityType, array $columns = []): ReportDTO
911 911
     {
912
-        /** @var DocumentCollection<int,DocumentCollection<int,Invoice>> $invoices */
913
-        $invoices = Invoice::query()
914
-            ->whereBetween('date', [$startDate, $endDate])
915
-            ->whereNotIn('status', [
916
-                InvoiceStatus::Draft,
917
-                InvoiceStatus::Void,
918
-            ])
919
-            ->whereNotNull('approved_at')
920
-            ->with(['client:id,name'])
921
-            ->get()
922
-            ->groupBy('client_id');
912
+        $documents = $entityType === DocumentEntityType::Client
913
+            ? Invoice::query()
914
+                ->whereBetween('date', [$startDate, $endDate])
915
+                ->whereNotIn('status', [
916
+                    InvoiceStatus::Draft,
917
+                    InvoiceStatus::Void,
918
+                ])
919
+                ->whereNotNull('approved_at')
920
+                ->with(['client:id,name'])
921
+                ->get()
922
+                ->groupBy('client_id')
923
+            : Bill::query()
924
+                ->whereBetween('date', [$startDate, $endDate])
925
+                ->whereNotIn('status', [
926
+                    BillStatus::Void,
927
+                ])
928
+                ->with(['vendor:id,name'])
929
+                ->get()
930
+                ->groupBy('vendor_id');
923 931
 
924
-        $clients = [];
932
+        $entities = [];
925 933
         $totalBalance = 0;
926 934
         $totalPaidBalance = 0;
927 935
         $totalUnpaidBalance = 0;
928 936
 
929
-        foreach ($invoices as $clientInvoices) {
930
-            $clientTotalBalance = $clientInvoices->sumMoneyInDefaultCurrency('total');
937
+        /** @var DocumentCollection<int,Invoice|Bill> $entityDocuments */
938
+        foreach ($documents as $entityDocuments) {
939
+            $entityTotalBalance = $entityDocuments->sumMoneyInDefaultCurrency('total');
931 940
 
932
-            $clientPaidBalance = $clientInvoices->sumMoneyInDefaultCurrency('amount_paid');
941
+            $entityPaidBalance = $entityDocuments->sumMoneyInDefaultCurrency('amount_paid');
933 942
 
934
-            $clientUnpaidBalance = $clientInvoices->whereNot('status', InvoiceStatus::Overpaid)
935
-                ->sumMoneyInDefaultCurrency('amount_due');
943
+            $entityUnpaidBalance = match ($entityType) {
944
+                DocumentEntityType::Client => $entityDocuments->whereNot('status', InvoiceStatus::Overpaid)
945
+                    ->sumMoneyInDefaultCurrency('amount_due'),
946
+                DocumentEntityType::Vendor => $entityDocuments->whereIn('status', [BillStatus::Open, BillStatus::Partial, BillStatus::Overdue])
947
+                    ->sumMoneyInDefaultCurrency('amount_due'),
948
+            };
936 949
 
937
-            $totalBalance += $clientTotalBalance;
938
-            $totalPaidBalance += $clientPaidBalance;
939
-            $totalUnpaidBalance += $clientUnpaidBalance;
950
+            $totalBalance += $entityTotalBalance;
951
+            $totalPaidBalance += $entityPaidBalance;
952
+            $totalUnpaidBalance += $entityUnpaidBalance;
940 953
 
941 954
             $formattedBalances = $this->formatBalances([
942
-                'total_balance' => $clientTotalBalance,
943
-                'paid_balance' => $clientPaidBalance,
944
-                'unpaid_balance' => $clientUnpaidBalance,
945
-            ], ClientBalanceDTO::class);
955
+                'total_balance' => $entityTotalBalance,
956
+                'paid_balance' => $entityPaidBalance,
957
+                'unpaid_balance' => $entityUnpaidBalance,
958
+            ], EntityBalanceDTO::class);
946 959
 
947
-            $client = $clientInvoices->first()->client;
960
+            $entity = $entityDocuments->first()->{$entityType->value};
948 961
 
949
-            $clients[] = new ClientReportDTO(
950
-                clientName: $client->name,
951
-                clientId: $client->id,
962
+            $entities[] = new EntityReportDTO(
963
+                name: $entity->name,
964
+                id: $entity->id,
952 965
                 balance: $formattedBalances,
953 966
             );
954 967
         }
955 968
 
956
-        $clientBalanceTotal = $this->formatBalances([
969
+        $entityBalanceTotal = $this->formatBalances([
957 970
             'total_balance' => $totalBalance,
958 971
             'paid_balance' => $totalPaidBalance,
959 972
             'unpaid_balance' => $totalUnpaidBalance,
960
-        ], ClientBalanceDTO::class);
973
+        ], EntityBalanceDTO::class);
961 974
 
962 975
         return new ReportDTO(
963
-            categories: ['Clients' => $clients],
964
-            clientBalanceTotal: $clientBalanceTotal,
976
+            categories: ['Entities' => $entities],
977
+            entityBalanceTotal: $entityBalanceTotal,
965 978
             fields: $columns,
966 979
             startDate: Carbon::parse($startDate),
967 980
             endDate: Carbon::parse($endDate),

+ 1
- 1
app/Transformers/AgingReportTransformer.php View File

@@ -18,7 +18,7 @@ class AgingReportTransformer extends BaseReportTransformer
18 18
 
19 19
     public function getTitle(): string
20 20
     {
21
-        return $this->entityType->getReportTitle();
21
+        return $this->entityType->getAgingReportTitle();
22 22
     }
23 23
 
24 24
     /**

app/Transformers/ClientBalanceSummaryReportTransformer.php → app/Transformers/EntityBalanceSummaryReportTransformer.php View File

@@ -2,14 +2,23 @@
2 2
 
3 3
 namespace App\Transformers;
4 4
 
5
-use App\DTO\ClientReportDTO;
5
+use App\DTO\EntityReportDTO;
6 6
 use App\DTO\ReportCategoryDTO;
7
+use App\DTO\ReportDTO;
8
+use App\Enums\Accounting\DocumentEntityType;
7 9
 
8
-class ClientBalanceSummaryReportTransformer extends BaseReportTransformer
10
+class EntityBalanceSummaryReportTransformer extends BaseReportTransformer
9 11
 {
12
+    public function __construct(
13
+        ReportDTO $report,
14
+        private readonly DocumentEntityType $entityType,
15
+    ) {
16
+        parent::__construct($report);
17
+    }
18
+
10 19
     public function getTitle(): string
11 20
     {
12
-        return 'Client Balance Summary';
21
+        return $this->entityType->getBalanceSummaryReportTitle();
13 22
     }
14 23
 
15 24
     /**
@@ -20,18 +29,18 @@ class ClientBalanceSummaryReportTransformer extends BaseReportTransformer
20 29
         $categories = [];
21 30
 
22 31
         foreach ($this->report->categories as $categoryName => $category) {
23
-            $data = array_map(function (ClientReportDTO $client) {
32
+            $data = array_map(function (EntityReportDTO $entity) {
24 33
                 $row = [];
25 34
 
26 35
                 foreach ($this->getColumns() as $column) {
27 36
                     $row[$column->getName()] = match ($column->getName()) {
28
-                        'client_name' => [
29
-                            'name' => $client->clientName,
30
-                            'id' => $client->clientId,
37
+                        'entity_name' => [
38
+                            'name' => $entity->name,
39
+                            'id' => $entity->id,
31 40
                         ],
32
-                        'total_balance' => $client->balance->totalBalance,
33
-                        'paid_balance' => $client->balance->paidBalance,
34
-                        'unpaid_balance' => $client->balance->unpaidBalance,
41
+                        'total_balance' => $entity->balance->totalBalance,
42
+                        'paid_balance' => $entity->balance->paidBalance,
43
+                        'unpaid_balance' => $entity->balance->unpaidBalance,
35 44
                         default => '',
36 45
                     };
37 46
                 }
@@ -55,10 +64,10 @@ class ClientBalanceSummaryReportTransformer extends BaseReportTransformer
55 64
 
56 65
         foreach ($this->getColumns() as $column) {
57 66
             $totals[$column->getName()] = match ($column->getName()) {
58
-                'client_name' => 'Total for all clients',
59
-                'total_balance' => $this->report->clientBalanceTotal->totalBalance,
60
-                'paid_balance' => $this->report->clientBalanceTotal->paidBalance,
61
-                'unpaid_balance' => $this->report->clientBalanceTotal->unpaidBalance,
67
+                'entity_name' => 'Total',
68
+                'total_balance' => $this->report->entityBalanceTotal->totalBalance,
69
+                'paid_balance' => $this->report->entityBalanceTotal->paidBalance,
70
+                'unpaid_balance' => $this->report->entityBalanceTotal->unpaidBalance,
62 71
                 default => '',
63 72
             };
64 73
         }

+ 1
- 1
database/factories/Accounting/BillFactory.php View File

@@ -46,7 +46,7 @@ class BillFactory extends Factory
46 46
             'order_number' => $this->faker->unique()->numerify('PO-#####'),
47 47
             'date' => $billDate,
48 48
             'due_date' => Carbon::parse($billDate)->addDays($dueDays),
49
-            'status' => BillStatus::Unpaid,
49
+            'status' => BillStatus::Open,
50 50
             'currency_code' => 'USD',
51 51
             'notes' => $this->faker->sentence,
52 52
             'created_by' => 1,

+ 1
- 1
database/migrations/2024_11_27_221657_create_bills_table.php View File

@@ -20,7 +20,7 @@ return new class extends Migration
20 20
             $table->date('date')->nullable();
21 21
             $table->date('due_date')->nullable();
22 22
             $table->timestamp('paid_at')->nullable();
23
-            $table->string('status')->default('unpaid');
23
+            $table->string('status')->default('open');
24 24
             $table->string('currency_code')->nullable();
25 25
             $table->string('discount_method')->default('per_line_item');
26 26
             $table->string('discount_computation')->default('percentage');

+ 79
- 79
package-lock.json View File

@@ -575,9 +575,9 @@
575 575
             }
576 576
         },
577 577
         "node_modules/@rollup/rollup-android-arm-eabi": {
578
-            "version": "4.32.1",
579
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.32.1.tgz",
580
-            "integrity": "sha512-/pqA4DmqyCm8u5YIDzIdlLcEmuvxb0v8fZdFhVMszSpDTgbQKdw3/mB3eMUHIbubtJ6F9j+LtmyCnHTEqIHyzA==",
578
+            "version": "4.34.0",
579
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.0.tgz",
580
+            "integrity": "sha512-Eeao7ewDq79jVEsrtWIj5RNqB8p2knlm9fhR6uJ2gqP7UfbLrTrxevudVrEPDM7Wkpn/HpRC2QfazH7MXLz3vQ==",
581 581
             "cpu": [
582 582
                 "arm"
583 583
             ],
@@ -589,9 +589,9 @@
589 589
             ]
590 590
         },
591 591
         "node_modules/@rollup/rollup-android-arm64": {
592
-            "version": "4.32.1",
593
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.32.1.tgz",
594
-            "integrity": "sha512-If3PDskT77q7zgqVqYuj7WG3WC08G1kwXGVFi9Jr8nY6eHucREHkfpX79c0ACAjLj3QIWKPJR7w4i+f5EdLH5Q==",
592
+            "version": "4.34.0",
593
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.0.tgz",
594
+            "integrity": "sha512-yVh0Kf1f0Fq4tWNf6mWcbQBCLDpDrDEl88lzPgKhrgTcDrTtlmun92ywEF9dCjmYO3EFiSuJeeo9cYRxl2FswA==",
595 595
             "cpu": [
596 596
                 "arm64"
597 597
             ],
@@ -603,9 +603,9 @@
603 603
             ]
604 604
         },
605 605
         "node_modules/@rollup/rollup-darwin-arm64": {
606
-            "version": "4.32.1",
607
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.32.1.tgz",
608
-            "integrity": "sha512-zCpKHioQ9KgZToFp5Wvz6zaWbMzYQ2LJHQ+QixDKq52KKrF65ueu6Af4hLlLWHjX1Wf/0G5kSJM9PySW9IrvHA==",
606
+            "version": "4.34.0",
607
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.0.tgz",
608
+            "integrity": "sha512-gCs0ErAZ9s0Osejpc3qahTsqIPUDjSKIyxK/0BGKvL+Tn0n3Kwvj8BrCv7Y5sR1Ypz1K2qz9Ny0VvkVyoXBVUQ==",
609 609
             "cpu": [
610 610
                 "arm64"
611 611
             ],
@@ -617,9 +617,9 @@
617 617
             ]
618 618
         },
619 619
         "node_modules/@rollup/rollup-darwin-x64": {
620
-            "version": "4.32.1",
621
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.32.1.tgz",
622
-            "integrity": "sha512-sFvF+t2+TyUo/ZQqUcifrJIgznx58oFZbdHS9TvHq3xhPVL9nOp+yZ6LKrO9GWTP+6DbFtoyLDbjTpR62Mbr3Q==",
620
+            "version": "4.34.0",
621
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.0.tgz",
622
+            "integrity": "sha512-aIB5Anc8hngk15t3GUkiO4pv42ykXHfmpXGS+CzM9CTyiWyT8HIS5ygRAy7KcFb/wiw4Br+vh1byqcHRTfq2tQ==",
623 623
             "cpu": [
624 624
                 "x64"
625 625
             ],
@@ -631,9 +631,9 @@
631 631
             ]
632 632
         },
633 633
         "node_modules/@rollup/rollup-freebsd-arm64": {
634
-            "version": "4.32.1",
635
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.32.1.tgz",
636
-            "integrity": "sha512-NbOa+7InvMWRcY9RG+B6kKIMD/FsnQPH0MWUvDlQB1iXnF/UcKSudCXZtv4lW+C276g3w5AxPbfry5rSYvyeYA==",
634
+            "version": "4.34.0",
635
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.0.tgz",
636
+            "integrity": "sha512-kpdsUdMlVJMRMaOf/tIvxk8TQdzHhY47imwmASOuMajg/GXpw8GKNd8LNwIHE5Yd1onehNpcUB9jHY6wgw9nHQ==",
637 637
             "cpu": [
638 638
                 "arm64"
639 639
             ],
@@ -645,9 +645,9 @@
645 645
             ]
646 646
         },
647 647
         "node_modules/@rollup/rollup-freebsd-x64": {
648
-            "version": "4.32.1",
649
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.32.1.tgz",
650
-            "integrity": "sha512-JRBRmwvHPXR881j2xjry8HZ86wIPK2CcDw0EXchE1UgU0ubWp9nvlT7cZYKc6bkypBt745b4bglf3+xJ7hXWWw==",
648
+            "version": "4.34.0",
649
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.0.tgz",
650
+            "integrity": "sha512-D0RDyHygOBCQiqookcPevrvgEarN0CttBecG4chOeIYCNtlKHmf5oi5kAVpXV7qs0Xh/WO2RnxeicZPtT50V0g==",
651 651
             "cpu": [
652 652
                 "x64"
653 653
             ],
@@ -659,9 +659,9 @@
659 659
             ]
660 660
         },
661 661
         "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
662
-            "version": "4.32.1",
663
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.32.1.tgz",
664
-            "integrity": "sha512-PKvszb+9o/vVdUzCCjL0sKHukEQV39tD3fepXxYrHE3sTKrRdCydI7uldRLbjLmDA3TFDmh418XH19NOsDRH8g==",
662
+            "version": "4.34.0",
663
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.0.tgz",
664
+            "integrity": "sha512-mCIw8j5LPDXmCOW8mfMZwT6F/Kza03EnSr4wGYEswrEfjTfVsFOxvgYfuRMxTuUF/XmRb9WSMD5GhCWDe2iNrg==",
665 665
             "cpu": [
666 666
                 "arm"
667 667
             ],
@@ -673,9 +673,9 @@
673 673
             ]
674 674
         },
675 675
         "node_modules/@rollup/rollup-linux-arm-musleabihf": {
676
-            "version": "4.32.1",
677
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.32.1.tgz",
678
-            "integrity": "sha512-9WHEMV6Y89eL606ReYowXuGF1Yb2vwfKWKdD1A5h+OYnPZSJvxbEjxTRKPgi7tkP2DSnW0YLab1ooy+i/FQp/Q==",
676
+            "version": "4.34.0",
677
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.0.tgz",
678
+            "integrity": "sha512-AwwldAu4aCJPob7zmjuDUMvvuatgs8B/QiVB0KwkUarAcPB3W+ToOT+18TQwY4z09Al7G0BvCcmLRop5zBLTag==",
679 679
             "cpu": [
680 680
                 "arm"
681 681
             ],
@@ -687,9 +687,9 @@
687 687
             ]
688 688
         },
689 689
         "node_modules/@rollup/rollup-linux-arm64-gnu": {
690
-            "version": "4.32.1",
691
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.32.1.tgz",
692
-            "integrity": "sha512-tZWc9iEt5fGJ1CL2LRPw8OttkCBDs+D8D3oEM8mH8S1ICZCtFJhD7DZ3XMGM8kpqHvhGUTvNUYVDnmkj4BDXnw==",
690
+            "version": "4.34.0",
691
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.0.tgz",
692
+            "integrity": "sha512-e7kDUGVP+xw05pV65ZKb0zulRploU3gTu6qH1qL58PrULDGxULIS0OSDQJLH7WiFnpd3ZKUU4VM3u/Z7Zw+e7Q==",
693 693
             "cpu": [
694 694
                 "arm64"
695 695
             ],
@@ -701,9 +701,9 @@
701 701
             ]
702 702
         },
703 703
         "node_modules/@rollup/rollup-linux-arm64-musl": {
704
-            "version": "4.32.1",
705
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.32.1.tgz",
706
-            "integrity": "sha512-FTYc2YoTWUsBz5GTTgGkRYYJ5NGJIi/rCY4oK/I8aKowx1ToXeoVVbIE4LGAjsauvlhjfl0MYacxClLld1VrOw==",
704
+            "version": "4.34.0",
705
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.0.tgz",
706
+            "integrity": "sha512-SXYJw3zpwHgaBqTXeAZ31qfW/v50wq4HhNVvKFhRr5MnptRX2Af4KebLWR1wpxGJtLgfS2hEPuALRIY3LPAAcA==",
707 707
             "cpu": [
708 708
                 "arm64"
709 709
             ],
@@ -715,9 +715,9 @@
715 715
             ]
716 716
         },
717 717
         "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
718
-            "version": "4.32.1",
719
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.32.1.tgz",
720
-            "integrity": "sha512-F51qLdOtpS6P1zJVRzYM0v6MrBNypyPEN1GfMiz0gPu9jN8ScGaEFIZQwteSsGKg799oR5EaP7+B2jHgL+d+Kw==",
718
+            "version": "4.34.0",
719
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.0.tgz",
720
+            "integrity": "sha512-e5XiCinINCI4RdyU3sFyBH4zzz7LiQRvHqDtRe9Dt8o/8hTBaYpdPimayF00eY2qy5j4PaaWK0azRgUench6WQ==",
721 721
             "cpu": [
722 722
                 "loong64"
723 723
             ],
@@ -729,9 +729,9 @@
729 729
             ]
730 730
         },
731 731
         "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
732
-            "version": "4.32.1",
733
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.32.1.tgz",
734
-            "integrity": "sha512-wO0WkfSppfX4YFm5KhdCCpnpGbtgQNj/tgvYzrVYFKDpven8w2N6Gg5nB6w+wAMO3AIfSTWeTjfVe+uZ23zAlg==",
732
+            "version": "4.34.0",
733
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.0.tgz",
734
+            "integrity": "sha512-3SWN3e0bAsm9ToprLFBSro8nJe6YN+5xmB11N4FfNf92wvLye/+Rh5JGQtKOpwLKt6e61R1RBc9g+luLJsc23A==",
735 735
             "cpu": [
736 736
                 "ppc64"
737 737
             ],
@@ -743,9 +743,9 @@
743 743
             ]
744 744
         },
745 745
         "node_modules/@rollup/rollup-linux-riscv64-gnu": {
746
-            "version": "4.32.1",
747
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.32.1.tgz",
748
-            "integrity": "sha512-iWswS9cIXfJO1MFYtI/4jjlrGb/V58oMu4dYJIKnR5UIwbkzR0PJ09O0PDZT0oJ3LYWXBSWahNf/Mjo6i1E5/g==",
746
+            "version": "4.34.0",
747
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.0.tgz",
748
+            "integrity": "sha512-B1Oqt3GLh7qmhvfnc2WQla4NuHlcxAD5LyueUi5WtMc76ZWY+6qDtQYqnxARx9r+7mDGfamD+8kTJO0pKUJeJA==",
749 749
             "cpu": [
750 750
                 "riscv64"
751 751
             ],
@@ -757,9 +757,9 @@
757 757
             ]
758 758
         },
759 759
         "node_modules/@rollup/rollup-linux-s390x-gnu": {
760
-            "version": "4.32.1",
761
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.32.1.tgz",
762
-            "integrity": "sha512-RKt8NI9tebzmEthMnfVgG3i/XeECkMPS+ibVZjZ6mNekpbbUmkNWuIN2yHsb/mBPyZke4nlI4YqIdFPgKuoyQQ==",
760
+            "version": "4.34.0",
761
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.0.tgz",
762
+            "integrity": "sha512-UfUCo0h/uj48Jq2lnhX0AOhZPSTAq3Eostas+XZ+GGk22pI+Op1Y6cxQ1JkUuKYu2iU+mXj1QjPrZm9nNWV9rg==",
763 763
             "cpu": [
764 764
                 "s390x"
765 765
             ],
@@ -771,9 +771,9 @@
771 771
             ]
772 772
         },
773 773
         "node_modules/@rollup/rollup-linux-x64-gnu": {
774
-            "version": "4.32.1",
775
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.32.1.tgz",
776
-            "integrity": "sha512-WQFLZ9c42ECqEjwg/GHHsouij3pzLXkFdz0UxHa/0OM12LzvX7DzedlY0SIEly2v18YZLRhCRoHZDxbBSWoGYg==",
774
+            "version": "4.34.0",
775
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.0.tgz",
776
+            "integrity": "sha512-chZLTUIPbgcpm+Z7ALmomXW8Zh+wE2icrG+K6nt/HenPLmtwCajhQC5flNSk1Xy5EDMt/QAOz2MhzfOfJOLSiA==",
777 777
             "cpu": [
778 778
                 "x64"
779 779
             ],
@@ -785,9 +785,9 @@
785 785
             ]
786 786
         },
787 787
         "node_modules/@rollup/rollup-linux-x64-musl": {
788
-            "version": "4.32.1",
789
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.32.1.tgz",
790
-            "integrity": "sha512-BLoiyHDOWoS3uccNSADMza6V6vCNiphi94tQlVIL5de+r6r/CCQuNnerf+1g2mnk2b6edp5dk0nhdZ7aEjOBsA==",
788
+            "version": "4.34.0",
789
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.0.tgz",
790
+            "integrity": "sha512-jo0UolK70O28BifvEsFD/8r25shFezl0aUk2t0VJzREWHkq19e+pcLu4kX5HiVXNz5qqkD+aAq04Ct8rkxgbyQ==",
791 791
             "cpu": [
792 792
                 "x64"
793 793
             ],
@@ -799,9 +799,9 @@
799 799
             ]
800 800
         },
801 801
         "node_modules/@rollup/rollup-win32-arm64-msvc": {
802
-            "version": "4.32.1",
803
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.32.1.tgz",
804
-            "integrity": "sha512-w2l3UnlgYTNNU+Z6wOR8YdaioqfEnwPjIsJ66KxKAf0p+AuL2FHeTX6qvM+p/Ue3XPBVNyVSfCrfZiQh7vZHLQ==",
802
+            "version": "4.34.0",
803
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.0.tgz",
804
+            "integrity": "sha512-Vmg0NhAap2S54JojJchiu5An54qa6t/oKT7LmDaWggpIcaiL8WcWHEN6OQrfTdL6mQ2GFyH7j2T5/3YPEDOOGA==",
805 805
             "cpu": [
806 806
                 "arm64"
807 807
             ],
@@ -813,9 +813,9 @@
813 813
             ]
814 814
         },
815 815
         "node_modules/@rollup/rollup-win32-ia32-msvc": {
816
-            "version": "4.32.1",
817
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.32.1.tgz",
818
-            "integrity": "sha512-Am9H+TGLomPGkBnaPWie4F3x+yQ2rr4Bk2jpwy+iV+Gel9jLAu/KqT8k3X4jxFPW6Zf8OMnehyutsd+eHoq1WQ==",
816
+            "version": "4.34.0",
817
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.0.tgz",
818
+            "integrity": "sha512-CV2aqhDDOsABKHKhNcs1SZFryffQf8vK2XrxP6lxC99ELZAdvsDgPklIBfd65R8R+qvOm1SmLaZ/Fdq961+m7A==",
819 819
             "cpu": [
820 820
                 "ia32"
821 821
             ],
@@ -827,9 +827,9 @@
827 827
             ]
828 828
         },
829 829
         "node_modules/@rollup/rollup-win32-x64-msvc": {
830
-            "version": "4.32.1",
831
-            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.32.1.tgz",
832
-            "integrity": "sha512-ar80GhdZb4DgmW3myIS9nRFYcpJRSME8iqWgzH2i44u+IdrzmiXVxeFnExQ5v4JYUSpg94bWjevMG8JHf1Da5Q==",
830
+            "version": "4.34.0",
831
+            "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.0.tgz",
832
+            "integrity": "sha512-g2ASy1QwHP88y5KWvblUolJz9rN+i4ZOsYzkEwcNfaNooxNUXG+ON6F5xFo0NIItpHqxcdAyls05VXpBnludGw==",
833 833
             "cpu": [
834 834
                 "x64"
835 835
             ],
@@ -2242,9 +2242,9 @@
2242 2242
             }
2243 2243
         },
2244 2244
         "node_modules/rollup": {
2245
-            "version": "4.32.1",
2246
-            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.32.1.tgz",
2247
-            "integrity": "sha512-z+aeEsOeEa3mEbS1Tjl6sAZ8NE3+AalQz1RJGj81M+fizusbdDMoEJwdJNHfaB40Scr4qNu+welOfes7maKonA==",
2245
+            "version": "4.34.0",
2246
+            "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.0.tgz",
2247
+            "integrity": "sha512-+4C/cgJ9w6sudisA0nZz0+O7lTP9a3CzNLsoDwaRumM8QHwghUsu6tqHXiTmNUp/rqNiM14++7dkzHDyCRs0Jg==",
2248 2248
             "dev": true,
2249 2249
             "license": "MIT",
2250 2250
             "dependencies": {
@@ -2258,25 +2258,25 @@
2258 2258
                 "npm": ">=8.0.0"
2259 2259
             },
2260 2260
             "optionalDependencies": {
2261
-                "@rollup/rollup-android-arm-eabi": "4.32.1",
2262
-                "@rollup/rollup-android-arm64": "4.32.1",
2263
-                "@rollup/rollup-darwin-arm64": "4.32.1",
2264
-                "@rollup/rollup-darwin-x64": "4.32.1",
2265
-                "@rollup/rollup-freebsd-arm64": "4.32.1",
2266
-                "@rollup/rollup-freebsd-x64": "4.32.1",
2267
-                "@rollup/rollup-linux-arm-gnueabihf": "4.32.1",
2268
-                "@rollup/rollup-linux-arm-musleabihf": "4.32.1",
2269
-                "@rollup/rollup-linux-arm64-gnu": "4.32.1",
2270
-                "@rollup/rollup-linux-arm64-musl": "4.32.1",
2271
-                "@rollup/rollup-linux-loongarch64-gnu": "4.32.1",
2272
-                "@rollup/rollup-linux-powerpc64le-gnu": "4.32.1",
2273
-                "@rollup/rollup-linux-riscv64-gnu": "4.32.1",
2274
-                "@rollup/rollup-linux-s390x-gnu": "4.32.1",
2275
-                "@rollup/rollup-linux-x64-gnu": "4.32.1",
2276
-                "@rollup/rollup-linux-x64-musl": "4.32.1",
2277
-                "@rollup/rollup-win32-arm64-msvc": "4.32.1",
2278
-                "@rollup/rollup-win32-ia32-msvc": "4.32.1",
2279
-                "@rollup/rollup-win32-x64-msvc": "4.32.1",
2261
+                "@rollup/rollup-android-arm-eabi": "4.34.0",
2262
+                "@rollup/rollup-android-arm64": "4.34.0",
2263
+                "@rollup/rollup-darwin-arm64": "4.34.0",
2264
+                "@rollup/rollup-darwin-x64": "4.34.0",
2265
+                "@rollup/rollup-freebsd-arm64": "4.34.0",
2266
+                "@rollup/rollup-freebsd-x64": "4.34.0",
2267
+                "@rollup/rollup-linux-arm-gnueabihf": "4.34.0",
2268
+                "@rollup/rollup-linux-arm-musleabihf": "4.34.0",
2269
+                "@rollup/rollup-linux-arm64-gnu": "4.34.0",
2270
+                "@rollup/rollup-linux-arm64-musl": "4.34.0",
2271
+                "@rollup/rollup-linux-loongarch64-gnu": "4.34.0",
2272
+                "@rollup/rollup-linux-powerpc64le-gnu": "4.34.0",
2273
+                "@rollup/rollup-linux-riscv64-gnu": "4.34.0",
2274
+                "@rollup/rollup-linux-s390x-gnu": "4.34.0",
2275
+                "@rollup/rollup-linux-x64-gnu": "4.34.0",
2276
+                "@rollup/rollup-linux-x64-musl": "4.34.0",
2277
+                "@rollup/rollup-win32-arm64-msvc": "4.34.0",
2278
+                "@rollup/rollup-win32-ia32-msvc": "4.34.0",
2279
+                "@rollup/rollup-win32-x64-msvc": "4.34.0",
2280 2280
                 "fsevents": "~2.3.2"
2281 2281
             }
2282 2282
         },

+ 0
- 3
resources/views/filament/company/pages/reports/income-by-customer.blade.php View File

@@ -1,3 +0,0 @@
1
-<x-filament-panels::page>
2
-
3
-</x-filament-panels::page>

Loading…
Cancel
Save