minor fixes + additional logging

This commit is contained in:
David Bomba 2022-09-12 13:03:39 +10:00
parent ab2d529923
commit 9dd06fae34
2 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,7 @@ class MarkPaid extends AbstractService
\DB::connection(config('database.default'))->transaction(function () { \DB::connection(config('database.default'))->transaction(function () {
$this->invoice = Invoice::where('id', $this->invoice->id)->lockForUpdate()->first(); $this->invoice = Invoice::withTrashed()->where('id', $this->invoice->id)->lockForUpdate()->first();
$this->payable_balance = $this->invoice->balance; $this->payable_balance = $this->invoice->balance;

View File

@ -435,6 +435,7 @@ trait GeneratesCounter
if ($check_counter > 100) { if ($check_counter > 100) {
nlog("counter error"); nlog("counter error");
nlog("check counter = {$check_counter}");
nlog("original_counter = {$original_counter}"); nlog("original_counter = {$original_counter}");
nlog("entity company = {$entity->company_id}"); nlog("entity company = {$entity->company_id}");
nlog("counter = {$counter}"); nlog("counter = {$counter}");