mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-17 08:32:51 +01:00
commit
fd1509cc76
90
.travis.yml
90
.travis.yml
@ -1,90 +0,0 @@
|
||||
language: php
|
||||
|
||||
sudo: true
|
||||
|
||||
dist: xenial
|
||||
|
||||
services:
|
||||
- mysql
|
||||
- xvfb
|
||||
|
||||
# Prevent tests from taking more than 50 minutes
|
||||
group: deprecated-2017Q4
|
||||
|
||||
php:
|
||||
# - 7.3
|
||||
- 7.4
|
||||
# - nightly
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libonig-dev
|
||||
chrome: stable
|
||||
hosts:
|
||||
- www.ninja.test
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- vendor
|
||||
- $HOME/.composer/cache
|
||||
|
||||
env:
|
||||
global:
|
||||
- COMPOSER_DISCARD_CHANGES=true
|
||||
- COMPOSER_NO_INTERACTION=1
|
||||
- COMPOSER_DISABLE_XDEBUG_WARN=1
|
||||
|
||||
before_install:
|
||||
# set GitHub token and update composer
|
||||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
|
||||
- composer self-update 1.10.19 && composer -V
|
||||
# - export USE_ZEND_ALLOC=0
|
||||
- rvm use 1.9.3 --install --fuzzy
|
||||
- cp .env.travis .env
|
||||
|
||||
install:
|
||||
# install Composer dependencies
|
||||
# - rm composer.lock
|
||||
# these providers require referencing git commit's which cause Travis to fail
|
||||
# - sed -i '/mollie/d' composer.json
|
||||
# - sed -i '/2checkout/d' composer.json
|
||||
- travis_retry composer install --no-interaction
|
||||
|
||||
before_script:
|
||||
# copy configuration files
|
||||
- php artisan key:generate --no-interaction
|
||||
- sed -i '$a NINJA_DEV=true' .env
|
||||
# create the database and user
|
||||
- mysql -u root -e "create database IF NOT EXISTS ninja01;"
|
||||
- mysql -u root -e "create database IF NOT EXISTS ninja02;"
|
||||
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja01.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
||||
- mysql -u root -e "GRANT ALL PRIVILEGES ON ninja02.* To 'ninja'@'localhost' IDENTIFIED BY 'ninja'; FLUSH PRIVILEGES;"
|
||||
# migrate and seed the database
|
||||
- php artisan migrate --database=db-ninja-01 --seed --no-interaction
|
||||
- php artisan migrate --database=db-ninja-02 --seed --no-interaction
|
||||
- php artisan optimize
|
||||
- npm install
|
||||
- npm run production
|
||||
# migrate and seed the database
|
||||
# Start webserver on ninja.test:8000
|
||||
# export DISPLAY=:99.0
|
||||
# sh -e /etc/init.d/xvfb start
|
||||
# sleep 3
|
||||
# ./vendor/laravel/dusk/bin/chromedriver-linux &
|
||||
- php artisan dusk:chrome-driver 80
|
||||
- php artisan serve &
|
||||
|
||||
script:
|
||||
- php ./vendor/bin/phpunit --debug --verbose --coverage-clover=coverage.xml
|
||||
#- php artisan dusk
|
||||
#- npm test
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
on_failure: change
|
||||
slack:
|
||||
invoiceninja: SLraaKBDvjeRuRtY9o3Yvp1b
|
@ -1 +1 @@
|
||||
5.1.58
|
||||
5.1.59
|
@ -12,6 +12,7 @@
|
||||
namespace App\Events\Product;
|
||||
|
||||
use App\Models\Company;
|
||||
use App\Models\Product;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
|
@ -349,7 +349,7 @@ class MigrationController extends BaseController
|
||||
// StartMigration::dispatch(base_path("storage/app/public/$migration_file"), $user, $fresh_company)->delay(now()->addSeconds(5));
|
||||
nlog("starting migration job");
|
||||
nlog($migration_file);
|
||||
StartMigration::dispatch($migration_file, $user, $fresh_company);
|
||||
StartMigration::dispatch($migration_file, $user, $fresh_company)->onQueue('migration');
|
||||
// } catch (\Exception $e) {
|
||||
// nlog($e->getMessage());
|
||||
// }
|
||||
|
@ -75,7 +75,11 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
if (strlen($this->nmo->settings->reply_to_email) > 1) {
|
||||
|
||||
$reply_to_name = strlen($this->nmo->settings->reply_to_name) > 1 ? $this->nmo->settings->reply_to_name : $this->nmo->company->present()->name();
|
||||
if(property_exists($this->nmo->settings, 'reply_to_name'))
|
||||
$reply_to_name = strlen($this->nmo->settings->reply_to_name) > 3 ? $this->nmo->settings->reply_to_name : $this->nmo->settings->reply_to_email;
|
||||
else
|
||||
$reply_to_name = $this->nmo->settings->reply_to_email;
|
||||
|
||||
$this->nmo->mailable->replyTo($this->nmo->settings->reply_to_email, $reply_to_name);
|
||||
|
||||
}
|
||||
|
@ -85,7 +85,10 @@ class UpdateOrCreateProduct implements ShouldQueue
|
||||
$product->notes = isset($item->notes) ? $item->notes : '';
|
||||
//$product->cost = isset($item->cost) ? $item->cost : 0; //this value shouldn't be updated.
|
||||
$product->price = isset($item->cost) ? $item->cost : 0;
|
||||
|
||||
if(!$product->id)
|
||||
$product->quantity = isset($item->quantity) ? $item->quantity : 0;
|
||||
|
||||
$product->tax_name1 = isset($item->tax_name1) ? $item->tax_name1 : '';
|
||||
$product->tax_rate1 = isset($item->tax_rate1) ? $item->tax_rate1 : 0;
|
||||
$product->tax_name2 = isset($item->tax_name2) ? $item->tax_name2 : '';
|
||||
|
@ -226,8 +226,8 @@ class Import implements ShouldQueue
|
||||
|
||||
//company size check
|
||||
if ($this->company->invoices()->count() > 1000 || $this->company->products()->count() > 1000 || $this->company->clients()->count() > 1000) {
|
||||
$company->is_large = true;
|
||||
$company->save();
|
||||
$this->company->is_large = true;
|
||||
$this->company->save();
|
||||
}
|
||||
|
||||
info('Completed🚀🚀🚀🚀🚀 at '.now());
|
||||
@ -677,6 +677,8 @@ class Import implements ShouldQueue
|
||||
$resource['invitations'][$key]['client_contact_id'] = $this->transformId('client_contacts', $invite['client_contact_id']);
|
||||
$resource['invitations'][$key]['user_id'] = $modified['user_id'];
|
||||
$resource['invitations'][$key]['company_id'] = $this->company->id;
|
||||
$resource['invitations'][$key]['email_status'] = '';
|
||||
|
||||
unset($resource['invitations'][$key]['recurring_invoice_id']);
|
||||
unset($resource['invitations'][$key]['id']);
|
||||
|
||||
@ -741,6 +743,7 @@ class Import implements ShouldQueue
|
||||
$resource['invitations'][$key]['client_contact_id'] = $this->transformId('client_contacts', $invite['client_contact_id']);
|
||||
$resource['invitations'][$key]['user_id'] = $modified['user_id'];
|
||||
$resource['invitations'][$key]['company_id'] = $this->company->id;
|
||||
$resource['invitations'][$key]['email_status'] = '';
|
||||
unset($resource['invitations'][$key]['invoice_id']);
|
||||
unset($resource['invitations'][$key]['id']);
|
||||
}
|
||||
@ -870,6 +873,7 @@ class Import implements ShouldQueue
|
||||
$resource['invitations'][$key]['client_contact_id'] = $this->transformId('client_contacts', $invite['client_contact_id']);
|
||||
$resource['invitations'][$key]['user_id'] = $modified['user_id'];
|
||||
$resource['invitations'][$key]['company_id'] = $this->company->id;
|
||||
$resource['invitations'][$key]['email_status'] = '';
|
||||
unset($resource['invitations'][$key]['invoice_id']);
|
||||
unset($resource['invitations'][$key]['id']);
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ class StartMigration implements ShouldQueue
|
||||
throw new NonExistingMigrationFile('Migration file does not exist, or it is corrupted.');
|
||||
}
|
||||
|
||||
Import::dispatchNow($file, $this->company, $this->user);
|
||||
Import::dispatchNow($file, $this->company, $this->user)->onQueue('migration');
|
||||
|
||||
Storage::deleteDirectory(public_path("storage/migrations/{$filename}"));
|
||||
|
||||
|
@ -54,6 +54,9 @@ class SystemLogger implements ShouldQueue
|
||||
'type_id' => $this->type_id,
|
||||
];
|
||||
|
||||
if(!$this->log)
|
||||
return;
|
||||
|
||||
SystemLog::create($sl);
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class CreditInvitationTransformer extends EntityTransformer
|
||||
'updated_at' => (int) $invitation->updated_at,
|
||||
'archived_at' => (int) $invitation->deleted_at,
|
||||
'created_at' => (int) $invitation->created_at,
|
||||
'email_status' => $invitation->email_status,
|
||||
'email_status' => $invitation->email_status ?: '',
|
||||
'email_error' => (string)$invitation->email_error,
|
||||
];
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class InvoiceInvitationTransformer extends EntityTransformer
|
||||
'updated_at' => (int) $invitation->updated_at,
|
||||
'archived_at' => (int) $invitation->deleted_at,
|
||||
'created_at' => (int) $invitation->created_at,
|
||||
'email_status' => $invitation->email_status,
|
||||
'email_status' => $invitation->email_status ?: '',
|
||||
'email_error' => (string)$invitation->email_error,
|
||||
];
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class QuoteInvitationTransformer extends EntityTransformer
|
||||
'updated_at' => (int) $invitation->updated_at,
|
||||
'archived_at' => (int) $invitation->deleted_at,
|
||||
'created_at' => (int) $invitation->created_at,
|
||||
'email_status' => $invitation->email_status,
|
||||
'email_status' => $invitation->email_status ?: '',
|
||||
'email_error' => (string)$invitation->email_error,
|
||||
];
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class RecurringInvoiceInvitationTransformer extends EntityTransformer
|
||||
'updated_at' => (int) $invitation->updated_at,
|
||||
'archived_at' => (int) $invitation->deleted_at,
|
||||
'created_at' => (int) $invitation->created_at,
|
||||
'email_status' => $invitation->email_status,
|
||||
'email_status' => $invitation->email_status ?: '',
|
||||
'email_error' => (string)$invitation->email_error,
|
||||
];
|
||||
}
|
||||
|
@ -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.58',
|
||||
'app_tag' => '5.1.58-release',
|
||||
'app_version' => '5.1.59',
|
||||
'app_tag' => '5.1.59-release',
|
||||
'minimum_client_version' => '5.0.16',
|
||||
'terms_version' => '1.0.1',
|
||||
'api_secret' => env('API_SECRET', false),
|
||||
|
2
public/flutter_service_worker.js
vendored
2
public/flutter_service_worker.js
vendored
@ -9,7 +9,7 @@ const RESOURCES = {
|
||||
"icons/Icon-192.png": "bb1cf5f6982006952211c7c8404ffbed",
|
||||
"icons/Icon-512.png": "0f9aff01367f0a0c69773d25ca16ef35",
|
||||
"manifest.json": "ce1b79950eb917ea619a0a30da27c6a3",
|
||||
"main.dart.js": "6050162ccfbc10d053ef43789a0d504e",
|
||||
"main.dart.js": "1611483da0db927703a9fdff4a860b7f",
|
||||
"assets/NOTICES": "dcba058006722202a4906fb433998480",
|
||||
"assets/fonts/MaterialIcons-Regular.otf": "1288c9e28052e028aba623321f7826ac",
|
||||
"assets/AssetManifest.json": "659dcf9d1baf3aed3ab1b9c42112bf8f",
|
||||
|
67090
public/main.dart.js
vendored
67090
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
65635
public/main.foss.dart.js
vendored
65635
public/main.foss.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -68,6 +68,10 @@ class GeneratesCounterTest extends TestCase
|
||||
$this->assertEquals($date_formatted."-0001", $invoice_number);
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0002", $invoice_number);
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0003", $invoice_number);
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0004", $invoice_number);
|
||||
|
||||
$settings->reset_counter_date = now($timezone->name)->format('Y-m-d');
|
||||
$settings->reset_counter_frequency_id = RecurringInvoice::FREQUENCY_DAILY;
|
||||
@ -83,6 +87,22 @@ class GeneratesCounterTest extends TestCase
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0001", $invoice_number);
|
||||
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0002", $invoice_number);
|
||||
|
||||
$settings->reset_counter_date = now($timezone->name)->format('Y-m-d');
|
||||
$settings->reset_counter_frequency_id = RecurringInvoice::FREQUENCY_DAILY;
|
||||
$this->company->settings = $settings;
|
||||
$this->company->save();
|
||||
|
||||
$this->travel(5)->days();
|
||||
$date_formatted = now($timezone->name)->format('Ymd');
|
||||
|
||||
$invoice_number = $this->getNextInvoiceNumber($this->client->fresh(), $this->invoice->fresh());
|
||||
$this->assertEquals($date_formatted."-0001", $invoice_number);
|
||||
|
||||
$this->travelBack();
|
||||
|
||||
}
|
||||
|
||||
public function testHasSharedCounter()
|
||||
|
Loading…
Reference in New Issue
Block a user