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:
parent
2cee0bc232
commit
761d19c857
@ -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';
|
||||
|
||||
|
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user