Merge branch 'v5-develop' into v5-1103-billing-landing-page

This commit is contained in:
Benjamin Beganović 2021-03-17 17:14:55 +01:00 committed by GitHub
commit c320b6bfbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 46241 additions and 46191 deletions

View File

@ -1 +1 @@
5.1.25
5.1.26

View File

@ -165,6 +165,7 @@ class DemoMode extends Command
'account_id' => $account->id,
'email' => 'small@example.com',
'confirmation_code' => $this->createDbHash(config('database.default')),
'email_verified_at' => now(),
]);
}
@ -199,6 +200,7 @@ class DemoMode extends Command
'password' => Hash::make('Password0'),
'account_id' => $account->id,
'confirmation_code' => $this->createDbHash(config('database.default')),
'email_verified_at' => now(),
]);
$company_token = new CompanyToken;

View File

@ -108,6 +108,7 @@ class CompanySettings extends BaseSettings
public $project_number_counter = 1; //@implemented
public $shared_invoice_quote_counter = false; //@implemented
public $shared_invoice_credit_counter = false; //@implemented
public $recurring_number_prefix = 'R'; //@implemented
public $reset_counter_frequency_id = '0'; //@implemented
public $reset_counter_date = ''; //@implemented
@ -262,6 +263,7 @@ class CompanySettings extends BaseSettings
public $hide_empty_columns_on_pdf = false;
public static $casts = [
'shared_invoice_credit_counter' => 'bool',
'reply_to_name' => 'string',
'hide_empty_columns_on_pdf' => 'bool',
'enable_reminder_endless' => 'bool',

View File

@ -304,6 +304,10 @@ class Client extends BaseModel implements HasLocalePreference
return $this->company->settings->{$setting};
}
elseif( property_exists(CompanySettings::defaults(), $setting) ) {
return CompanySettings::defaults()->{$setting};
}
return '';
// throw new \Exception("Settings corrupted", 1);

View File

@ -134,6 +134,9 @@ trait GeneratesCounter
return 'payment_number_counter';
break;
case Credit::class:
if ($this->hasSharedCounter($client))
return 'invoice_number_counter';
return 'credit_number_counter';
break;
case Project::class:
@ -313,7 +316,7 @@ trait GeneratesCounter
*/
public function hasSharedCounter(Client $client) : bool
{
return (bool) $client->getSetting('shared_invoice_quote_counter');
return (bool) $client->getSetting('shared_invoice_quote_counter') || (bool) $client->getSetting('shared_invoice_credit_counter');
}
/**

View File

@ -13,7 +13,7 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.25',
'app_version' => '5.1.26',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),

View File

@ -30,7 +30,7 @@ const RESOURCES = {
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3e722fd57a6db80ee119f0e2c230ccff",
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
"/": "23224b5e03519aaa87594403d54412cf",
"main.dart.js": "57f8c85038156cb9798fe4f15263a6dc",
"main.dart.js": "1edd6ac83b22ed1c401a76cefe7eaa7d",
"version.json": "b7c8971e1ab5b627fd2a4317c52b843e",
"favicon.png": "dca91c54388f52eded692718d5a98b8b"
};

92413
public/main.dart.js vendored

File diff suppressed because one or more lines are too long