mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for conflict
This commit is contained in:
commit
ccdb55223c
@ -238,8 +238,13 @@ class CompanySettings extends BaseSettings
|
||||
public $client_portal_terms = '';
|
||||
public $client_portal_privacy_policy = '';
|
||||
public $client_portal_enable_uploads = false;
|
||||
public $client_portal_allow_under_payment = false;
|
||||
public $client_portal_allow_over_payment = false;
|
||||
|
||||
|
||||
public static $casts = [
|
||||
'client_portal_allow_under_payment' => 'bool',
|
||||
'client_portal_allow_over_payment' => 'bool',
|
||||
'auto_bill' => 'string',
|
||||
'lock_invoices' => 'string',
|
||||
'client_portal_terms' => 'string',
|
||||
|
@ -31,7 +31,6 @@ class MigrationController extends BaseController
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Purge Company
|
||||
|
@ -227,6 +227,14 @@ class Import implements ShouldQueue
|
||||
unset($data['account_id']);
|
||||
}
|
||||
|
||||
if(isset($data['referral_code'])) {
|
||||
$account = $this->company->account;
|
||||
$account->referral_code = $data['referral_code'];
|
||||
$account->save();
|
||||
|
||||
unset($data['referral_code']);
|
||||
}
|
||||
|
||||
$company_repository = new CompanyRepository();
|
||||
$company_repository->save($data, $this->company);
|
||||
|
||||
|
@ -201,6 +201,23 @@ class CompanyGateway extends BaseModel
|
||||
return floatval($this->fee_amount) || floatval($this->fee_percent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the current test mode of the gateway
|
||||
*
|
||||
* @return boolean whether the gateway is in testmode or not.
|
||||
*/
|
||||
public function isTestMode() :bool
|
||||
{
|
||||
$config = $this->getConfig();
|
||||
|
||||
if($this->gateway->provider == 'Stripe' && strpos($config->publishableKey, 'test'))
|
||||
return true;
|
||||
|
||||
if(property_exists($config, 'testMode') && $config->testMode)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Get Publishable Key
|
||||
* Only works for STRIPE and PAYMILL
|
||||
|
@ -14,6 +14,8 @@ class CompanyGatewayObserver
|
||||
*/
|
||||
public function created(CompanyGateway $company_gateway)
|
||||
{
|
||||
|
||||
/* Set company gateway if not exists*/
|
||||
if(!$company_gateway->label){
|
||||
$company_gateway->label = $company_gateway->gateway->name;
|
||||
$company_gateway->save();
|
||||
|
@ -43,6 +43,18 @@ class AddIsPublicToDocumentsTable extends Migration
|
||||
$table->timestamps(6);
|
||||
});
|
||||
|
||||
Schema::table('recurring_invoices', function ($table) {
|
||||
$table->string('auto_bill');
|
||||
});
|
||||
|
||||
// Schema::table('recurring_expenses', function ($table) {
|
||||
// $table->string('auto_bill');
|
||||
// });
|
||||
|
||||
Schema::table('companies', function ($table) {
|
||||
$table->enum('default_auto_bill', ['off', 'always','optin','optout'])->default('off');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user