refactor: streamline sales and expenses management in client resource

- Move create/edit logic from relation managers to dedicated resource pages
- Add transaction handling with proper rollback in sale create/update
- Fix expense transaction creation by using correct array access
- Set default client from query parameter in sale/expense forms
- Exclude 'type' field from balance creation to prevent errors
This commit is contained in:
Jp
2026-02-10 15:05:36 +08:00
parent 0e4da559d6
commit 0131193b8d
8 changed files with 123 additions and 426 deletions

View File

@@ -15,7 +15,7 @@ class CreateBalanceAction extends BaseAction
public function __invoke(Data $payload, Closure $next)
{
$this->createBalanceCommand->execute($payload->balanceDTO->except('amount')->toArray());
$this->createBalanceCommand->execute($payload->balanceDTO->except('amount', 'type')->toArray());
return $next($payload);
}