1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-16 16:13:20 +01:00
This commit is contained in:
David Bomba 2021-06-01 08:10:30 +10:00
commit 76d4832aed
6 changed files with 23 additions and 6 deletions

View File

@ -1 +1 @@
5.1.68
5.1.69

View File

@ -84,7 +84,7 @@ class ImportJsonController extends BaseController
$file_location = public_path("storage/backups/$filename/backup.json");
if (! file_exists($file_location))
throw new NonExistingMigrationFile('Backup file does not exist, or it is corrupted.');
throw new NonExistingMigrationFile('Backup file does not exist, or is corrupted.');
$data = json_decode(file_get_contents($file_location));

View File

@ -13,6 +13,7 @@ namespace App\Http\ViewComposers;
use App\Utils\Ninja;
use App\Utils\TranslationHelper;
use Illuminate\Support\Facades\App;
use Illuminate\Support\Facades\Lang;
use Illuminate\View\View;

View File

@ -147,11 +147,24 @@ class CompanyImport implements ShouldQueue
$this->backup_file = Cache::get($this->hash);
if ( empty( $this->import_object ) )
if ( empty( $this->backup_file ) )
throw new \Exception('No import data found, has the cache expired?');
$this->backup_file = base64_decode($this->backup_file);
if(array_key_exists('import_settings', $request) && $request['import_settings'] == 'true') {
$this->preFlightChecks()->importSettings();
}
if(array_key_exists('import_data', $request) && $request['import_data'] == 'true') {
$this->preFlightChecks()
->purgeCompanyData()
->importData();
}
}
@ -191,6 +204,7 @@ class CompanyImport implements ShouldQueue
$this->company->tasks()->forceDelete();
$this->company->vendors()->forceDelete();
$this->company->expenses()->forceDelete();
$this->company->subscriptions()->forceDelete();
$this->company->save();
@ -226,6 +240,8 @@ class CompanyImport implements ShouldQueue
}
return $this;
}
private function import_payment_terms()

View File

@ -188,7 +188,7 @@ class PaymentMethod
$fee_label = $gateway->calcGatewayFeeLabel($this->amount, $this->client, $gateway_type_id);
if(!$gateway_type_id){
if(!$gateway_type_id || (GatewayType::CUSTOM == $gateway_type_id)){
$this->payment_urls[] = [
'label' => $gateway->getConfigField('name') . $fee_label,

View File

@ -14,8 +14,8 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', 'invoicing.co'),
'app_version' => '5.1.68',
'app_tag' => '5.1.68-release',
'app_version' => '5.1.69',
'app_tag' => '5.1.69-release',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),