1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Fixes for ledger service

This commit is contained in:
David Bomba 2021-12-19 13:26:57 +11:00
parent 2cee0bc232
commit 761d19c857
2 changed files with 4 additions and 3 deletions

View File

@ -48,6 +48,7 @@ class StoreInvoiceRequest extends Request
}
$rules['client_id'] = 'bail|required|exists:clients,id,company_id,'.auth()->user()->company()->id;
// $rules['client_id'] = ['required', Rule::exists('clients')->where('company_id', auth()->user()->company()->id)];
$rules['invitations.*.client_contact_id'] = 'distinct';

View File

@ -30,7 +30,7 @@ class LedgerService
// \DB::connection(config('database.default'))->beginTransaction();
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment){
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment, $balance){
$company_ledger = $this->ledger();
@ -61,7 +61,7 @@ class LedgerService
// \DB::connection(config('database.default'))->beginTransaction();
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment){
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment, $balance){
/* Get the last record for the client and set the current balance*/
$company_ledger = $this->ledger();
@ -93,7 +93,7 @@ class LedgerService
// \DB::connection(config('database.default'))->beginTransaction();
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment){
\DB::connection(config('database.default'))->transaction(function () use($notes, $adjustment, $balance){
$company_ledger = $this->ledger();