mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Logging around generates counter
This commit is contained in:
parent
d68918b213
commit
3a33be37a0
@ -416,6 +416,7 @@ trait GeneratesCounter
|
|||||||
{
|
{
|
||||||
$check = false;
|
$check = false;
|
||||||
$check_counter = 1;
|
$check_counter = 1;
|
||||||
|
$original_counter = $counter;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
$number = $this->padCounter($counter, $padding);
|
$number = $this->padCounter($counter, $padding);
|
||||||
@ -430,6 +431,12 @@ trait GeneratesCounter
|
|||||||
$check_counter++;
|
$check_counter++;
|
||||||
|
|
||||||
if ($check_counter > 100) {
|
if ($check_counter > 100) {
|
||||||
|
|
||||||
|
nlog("counter error");
|
||||||
|
nlog("original_counter = {$original_counter}");
|
||||||
|
nlog("counter = {$counter}");
|
||||||
|
nlog("returning = {$number}");
|
||||||
|
|
||||||
return $number.'_'.Str::random(5);
|
return $number.'_'.Str::random(5);
|
||||||
}
|
}
|
||||||
} while ($check);
|
} while ($check);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user