mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Bugfix where reset counter date is set but frequency is set to disabled
This commit is contained in:
parent
081d720ce5
commit
f28a26d3f9
@ -479,9 +479,20 @@ trait GeneratesConvertedQuoteCounter
|
||||
$reset_counter_frequency = (int) $client->getSetting('reset_counter_frequency_id');
|
||||
|
||||
if ($reset_counter_frequency == 0) {
|
||||
|
||||
if($client->getSetting('reset_counter_date')){
|
||||
|
||||
$settings = $client->company->settings;
|
||||
$settings->reset_counter_date = "";
|
||||
$client->company->settings = $settings;
|
||||
$client->company->save();
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$timezone = Timezone::find($client->getSetting('timezone_id'));
|
||||
|
||||
$reset_date = Carbon::parse($client->getSetting('reset_counter_date'), $timezone->name);
|
||||
|
@ -519,6 +519,16 @@ trait GeneratesCounter
|
||||
$reset_counter_frequency = (int) $client->getSetting('reset_counter_frequency_id');
|
||||
|
||||
if ($reset_counter_frequency == 0) {
|
||||
|
||||
if($client->getSetting('reset_counter_date')){
|
||||
|
||||
$settings = $client->company->settings;
|
||||
$settings->reset_counter_date = "";
|
||||
$client->company->settings = $settings;
|
||||
$client->company->save();
|
||||
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user