feat(client): add journals relation and improve transaction ledger handling

- Add journals relation to Client model via Branch
- Update branch selection in JournalsRelationManager to use code instead of name
- Improve tax, withholding, and cash account ledger queries by adding client_id filter and amount checks
- Add missing import for GenerateVoucher command in ExpensesRelationManager
- Label 'Normal Balance' column in AccountsRelationManager
This commit is contained in:
Jp
2026-02-09 22:16:10 +08:00
parent 207f4c1609
commit 1548e178bc
5 changed files with 34 additions and 16 deletions

View File

@@ -35,7 +35,7 @@ class JournalsRelationManager extends RelationManager
->schema([
Select::make('branch_id')
->label('Branch')
->options(fn () => Branch::where('client_id', $this->getOwnerRecord()->id)->pluck('name', 'id'))
->options(fn () => Branch::where('client_id', $this->getOwnerRecord()->id)->pluck('code', 'id'))
->required()
->default(fn () => Branch::where('client_id', $this->getOwnerRecord()->id)->first()?->id),