mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-01 02:14:35 -04:00
Fixes for counter
This commit is contained in:
parent
6ed863acd2
commit
d892e0b6ed
@ -72,8 +72,8 @@ class OneTimeTokenController extends BaseController
|
|||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
'user_id' => auth()->user()->id,
|
'user_id' => auth()->user()->id,
|
||||||
'company_key'=> auth()->company()->company_key,
|
'company_key'=> auth()->user()->company()->company_key,
|
||||||
'context' => $requst->input('context'),
|
'context' => $request->input('context'),
|
||||||
];
|
];
|
||||||
|
|
||||||
Cache::put( $hash, $data, 3600 );
|
Cache::put( $hash, $data, 3600 );
|
||||||
|
@ -422,6 +422,11 @@ trait GeneratesCounter
|
|||||||
*/
|
*/
|
||||||
private function resetCounters(Client $client)
|
private function resetCounters(Client $client)
|
||||||
{
|
{
|
||||||
|
$reset_counter_frequency = (int)$client->getSetting('reset_counter_frequency_id');
|
||||||
|
|
||||||
|
if($reset_counter_frequency == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
$timezone = Timezone::find($client->getSetting('timezone_id'));
|
$timezone = Timezone::find($client->getSetting('timezone_id'));
|
||||||
|
|
||||||
$reset_date = Carbon::parse($client->getSetting('reset_counter_date'), $timezone->name);
|
$reset_date = Carbon::parse($client->getSetting('reset_counter_date'), $timezone->name);
|
||||||
@ -430,7 +435,7 @@ trait GeneratesCounter
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ($client->company->reset_counter_frequency_id) {
|
switch ($reset_counter_frequency) {
|
||||||
case RecurringInvoice::FREQUENCY_DAILY:
|
case RecurringInvoice::FREQUENCY_DAILY:
|
||||||
$reset_date->addDay();
|
$reset_date->addDay();
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user