mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Fixes for generates counter
This commit is contained in:
parent
342cc10bc2
commit
c7a9e2bac7
@ -631,7 +631,7 @@ trait GeneratesConvertedQuoteCounter
|
||||
}
|
||||
|
||||
$search = ['{$year}'];
|
||||
$replace = [date('Y')];
|
||||
$replace = [Carbon::now($entity->company->timezone()->name)->format('Y')];
|
||||
|
||||
$search[] = '{$counter}';
|
||||
$replace[] = $counter;
|
||||
@ -646,8 +646,8 @@ trait GeneratesConvertedQuoteCounter
|
||||
$replace[] = $counter;
|
||||
|
||||
$search[] = '{$year}';
|
||||
$replace[] = date('Y');
|
||||
|
||||
$replace[] = Carbon::now($entity->company->timezone()->name)->format('Y');
|
||||
|
||||
if (strstr($pattern, '{$user_id}') || strstr($pattern, '{$userId}')) {
|
||||
$user_id = $entity->user_id ? $entity->user_id : 0;
|
||||
$search[] = '{$user_id}';
|
||||
|
@ -645,9 +645,6 @@ trait GeneratesCounter
|
||||
$search = [];
|
||||
$replace = [];
|
||||
|
||||
// $search = ['{$year}'];
|
||||
//$replace = [Carbon::now($entity->company->timezone()->name)->format('Y')];
|
||||
|
||||
$search[] = '{$counter}';
|
||||
$replace[] = $counter;
|
||||
|
||||
@ -661,7 +658,7 @@ trait GeneratesCounter
|
||||
$replace[] = $counter;
|
||||
|
||||
$search[] = '{$year}';
|
||||
$replace[] = [Carbon::now($entity->company->timezone()->name)->format('Y')];
|
||||
$replace[] = Carbon::now($entity->company->timezone()->name)->format('Y');
|
||||
|
||||
if (strstr($pattern, '{$user_id}') || strstr($pattern, '{$userId}')) {
|
||||
$user_id = $entity->user_id ? $entity->user_id : 0;
|
||||
|
Loading…
Reference in New Issue
Block a user