mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 12:12:48 +01:00
Laravel 7.x Shift (#40)
* Adopt Laravel coding style The Laravel framework adopts the PSR-2 coding style with some additions. Laravel apps *should* adopt this coding style as well. However, Shift allows you to customize the adopted coding style by adding your own [PHP CS Fixer][1] `.php_cs` config to your project. You may use [Shift's .php_cs][2] file as a base. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 * Shift bindings PHP 5.5.9+ adds the new static `class` property which provides the fully qualified class name. This is preferred over using class name strings as these references are checked by the parser. * Shift core files * Shift to Throwable * Add laravel/ui dependency * Unindent vendor mail templates * Shift config files * Default config files In an effort to make upgrading the constantly changing config files easier, Shift defaulted them so you can review the commit diff for changes. Moving forward, you should use ENV variables or create a separate config file to allow the core config files to remain automatically upgradeable. * Shift Laravel dependencies * Shift cleanup * Upgrade to Laravel 7 Co-authored-by: Laravel Shift <shift@laravelshift.com>
This commit is contained in:
parent
08de7be767
commit
ba75a44eb8
@ -16,7 +16,7 @@ DB_PASSWORD=ninja
|
||||
DB_CONNECTION=db-ninja-01
|
||||
DB_DATABASE1=db-ninja-01
|
||||
DB_DATABASE2=db-ninja-02
|
||||
MAIL_DRIVER=log
|
||||
MAIL_MAILER=log
|
||||
MAIL_PORT=587
|
||||
MAIL_ENCRYPTION=tls
|
||||
MAIL_HOST=
|
||||
|
@ -33,7 +33,7 @@ REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_DRIVER=smtp
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=smtp.mailtrap.io
|
||||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=null
|
||||
|
@ -14,7 +14,7 @@ DB_CONNECTION=db-ninja-01
|
||||
DB_DATABASE1=ninja01
|
||||
DB_DATABASE2=ninja02
|
||||
|
||||
MAIL_DRIVER=log
|
||||
MAIL_MAILER=log
|
||||
TRAVIS=true
|
||||
API_SECRET=password
|
||||
TEST_USERNAME=user@example.com
|
||||
|
@ -76,7 +76,6 @@ class CheckData extends Command
|
||||
config(['database.default' => $database]);
|
||||
}
|
||||
|
||||
|
||||
$this->checkInvoiceBalances();
|
||||
$this->checkInvoicePayments();
|
||||
$this->checkPaidToDates();
|
||||
@ -100,7 +99,7 @@ class CheckData extends Command
|
||||
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
||||
$message->to($errorEmail)
|
||||
->from(config('ninja.error_email'))
|
||||
->subject("Check-Data: " . strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE) . " [{$database}]");
|
||||
->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
|
||||
});
|
||||
} elseif (! $this->isValid) {
|
||||
throw new Exception("Check data failed!!\n".$this->log);
|
||||
@ -285,42 +284,33 @@ class CheckData extends Command
|
||||
|
||||
private function checkInvoiceBalances()
|
||||
{
|
||||
|
||||
$wrong_balances = 0;
|
||||
$wrong_paid_to_dates = 0;
|
||||
|
||||
foreach(Client::cursor() as $client)
|
||||
{
|
||||
foreach (Client::cursor() as $client) {
|
||||
$invoice_balance = $client->invoices->where('is_deleted', false)->where('status_id', '>', 1)->sum('balance');
|
||||
|
||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||
|
||||
if($ledger && number_format($invoice_balance, 4) != number_format($client->balance, 4))
|
||||
{
|
||||
if ($ledger && number_format($invoice_balance, 4) != number_format($client->balance, 4)) {
|
||||
$wrong_balances++;
|
||||
$this->logMessage($client->present()->name . " - " . $client->id . " - balances do not match Invoice Balance = {$invoice_balance} Client Balance = {$client->balance} Ledger Balance = {$ledger->balance}");
|
||||
$this->logMessage($client->present()->name.' - '.$client->id." - balances do not match Invoice Balance = {$invoice_balance} Client Balance = {$client->balance} Ledger Balance = {$ledger->balance}");
|
||||
|
||||
$this->isValid = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->logMessage("{$wrong_balances} clients with incorrect balances");
|
||||
|
||||
}
|
||||
|
||||
private function checkPaidToDates()
|
||||
{
|
||||
|
||||
$wrong_paid_to_dates = 0;
|
||||
|
||||
Client::withTrashed()->cursor()->each(function ($client) use ($wrong_paid_to_dates) {
|
||||
|
||||
$total_invoice_payments = 0;
|
||||
|
||||
foreach($client->invoices as $invoice)
|
||||
{
|
||||
foreach ($client->invoices as $invoice) {
|
||||
$total_amount = $invoice->payments->sum('pivot.amount');
|
||||
$total_refund = $invoice->payments->sum('pivot.refunded');
|
||||
|
||||
@ -330,16 +320,13 @@ class CheckData extends Command
|
||||
if (round($total_invoice_payments, 2) != round($client->paid_to_date, 2)) {
|
||||
$wrong_paid_to_dates++;
|
||||
|
||||
$this->logMessage($client->present()->name . " - " . $client->id . " - Paid to date does not match Client Paid To Date = {$client->paid_to_date} - Invoice Payments = {$total_invoice_payments}");
|
||||
$this->logMessage($client->present()->name.' - '.$client->id." - Paid to date does not match Client Paid To Date = {$client->paid_to_date} - Invoice Payments = {$total_invoice_payments}");
|
||||
|
||||
$this->isValid = false;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid to dates");
|
||||
|
||||
}
|
||||
|
||||
private function checkInvoicePayments()
|
||||
@ -350,9 +337,7 @@ class CheckData extends Command
|
||||
//todo reversing an invoice breaks the check data at this point;
|
||||
|
||||
Client::cursor()->each(function ($client) use ($wrong_balances) {
|
||||
|
||||
$client->invoices->where('is_deleted', false)->each(function ($invoice) use ($wrong_balances, $client) {
|
||||
|
||||
$total_amount = $invoice->payments->sum('pivot.amount');
|
||||
$total_refund = $invoice->payments->sum('pivot.refunded');
|
||||
$total_credit = $invoice->credits->sum('amount');
|
||||
@ -362,14 +347,11 @@ class CheckData extends Command
|
||||
if ($total_paid != ($invoice->amount - $invoice->balance - $total_credit)) {
|
||||
$wrong_balances++;
|
||||
|
||||
$this->logMessage($client->present()->name . " - " . $client->id . " - balances do not match Invoice Amount = {$invoice->amount} - Invoice Balance = {$invoice->balance} Total paid = {$total_paid}");
|
||||
$this->logMessage($client->present()->name.' - '.$client->id." - balances do not match Invoice Amount = {$invoice->amount} - Invoice Balance = {$invoice->balance} Total paid = {$total_paid}");
|
||||
|
||||
$this->isValid = false;
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$this->logMessage("{$wrong_balances} clients with incorrect invoice balances");
|
||||
@ -377,42 +359,33 @@ class CheckData extends Command
|
||||
|
||||
private function checkClientBalances()
|
||||
{
|
||||
|
||||
$wrong_balances = 0;
|
||||
$wrong_paid_to_dates = 0;
|
||||
|
||||
foreach(Client::cursor() as $client)
|
||||
{
|
||||
foreach (Client::cursor() as $client) {
|
||||
$invoice_balance = $client->invoices->sum('balance');
|
||||
$invoice_amounts = $client->invoices->sum('amount') - $invoice_balance;
|
||||
|
||||
$credit_amounts = 0;
|
||||
|
||||
foreach($client->invoices as $invoice)
|
||||
{
|
||||
foreach ($client->invoices as $invoice) {
|
||||
$credit_amounts += $invoice->credits->sum('amount');
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/*To handle invoice reversals, we need to "ADD BACK" the credit amounts here*/
|
||||
$client_paid_to_date = $client->paid_to_date + $credit_amounts;
|
||||
|
||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
||||
|
||||
if($ledger && (string)$invoice_amounts != (string)$client_paid_to_date)
|
||||
{
|
||||
|
||||
if ($ledger && (string) $invoice_amounts != (string) $client_paid_to_date) {
|
||||
$wrong_paid_to_dates++;
|
||||
$this->logMessage($client->present()->name . " - " . $client->id . " - client paid to dates do not match {$invoice_amounts} - " .rtrim($client_paid_to_date, "0"));
|
||||
$this->logMessage($client->present()->name.' - '.$client->id." - client paid to dates do not match {$invoice_amounts} - ".rtrim($client_paid_to_date, '0'));
|
||||
|
||||
$this->isValid = false;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid_to_dates");
|
||||
|
||||
}
|
||||
|
||||
private function checkLogoFiles()
|
||||
@ -460,7 +433,6 @@ class CheckData extends Command
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
private function checkCompanyData()
|
||||
{
|
||||
$tables = [
|
||||
@ -498,28 +470,23 @@ class CheckData extends Command
|
||||
if ($records->count()) {
|
||||
$this->isValid = false;
|
||||
$this->logMessage($records->count()." {$table} records with incorrect {$entityType} company id");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// foreach(User::cursor() as $user) {
|
||||
|
||||
// $records = Company::where('account_id',)
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
public function pluralizeEntityType($type)
|
||||
{
|
||||
|
||||
if ($type === 'company') {
|
||||
return 'companies';
|
||||
}
|
||||
|
||||
return $type.'s';
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -81,7 +81,6 @@ class CreateTestData extends Command
|
||||
$this->createLargeAccount();
|
||||
}
|
||||
|
||||
|
||||
private function createSmallAccount()
|
||||
{
|
||||
$this->info('Creating Small Account and Company');
|
||||
@ -92,7 +91,6 @@ class CreateTestData extends Command
|
||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||
]);
|
||||
|
||||
|
||||
$account->default_company_id = $company->id;
|
||||
$account->save();
|
||||
|
||||
@ -102,7 +100,7 @@ class CreateTestData extends Command
|
||||
$user = factory(\App\Models\User::class)->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => 'small@example.com',
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -135,13 +133,12 @@ class CreateTestData extends Command
|
||||
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$z = $x + 1;
|
||||
$this->info("Creating client # ".$z);
|
||||
$this->info('Creating client # '.$z);
|
||||
|
||||
$this->createClient($company, $user);
|
||||
}
|
||||
|
||||
for($x=0; $x<$this->count; $x++)
|
||||
{
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating invoice for client #'.$client->id);
|
||||
@ -177,7 +174,6 @@ class CreateTestData extends Command
|
||||
$this->info('creating project for client #'.$client->id);
|
||||
$this->createProject($client);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function createMediumAccount()
|
||||
@ -199,7 +195,7 @@ class CreateTestData extends Command
|
||||
$user = factory(\App\Models\User::class)->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => 'medium@example.com',
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -222,7 +218,6 @@ class CreateTestData extends Command
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
|
||||
factory(\App\Models\Product::class, 50)->create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id,
|
||||
@ -234,13 +229,12 @@ class CreateTestData extends Command
|
||||
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$z = $x + 1;
|
||||
$this->info("Creating client # ".$z);
|
||||
$this->info('Creating client # '.$z);
|
||||
|
||||
$this->createClient($company, $user);
|
||||
}
|
||||
|
||||
for($x=0; $x<$this->count*100; $x++)
|
||||
{
|
||||
for ($x = 0; $x < $this->count * 100; $x++) {
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating invoice for client #'.$client->id);
|
||||
@ -298,7 +292,7 @@ class CreateTestData extends Command
|
||||
$user = factory(\App\Models\User::class)->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => 'large@example.com',
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -321,7 +315,6 @@ class CreateTestData extends Command
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
|
||||
factory(\App\Models\Product::class, 15000)->create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id,
|
||||
@ -331,16 +324,14 @@ class CreateTestData extends Command
|
||||
|
||||
$this->info('Creating '.$this->count.' clients');
|
||||
|
||||
|
||||
for ($x = 0; $x < $this->count * 500; $x++) {
|
||||
$z = $x + 1;
|
||||
$this->info("Creating client # ".$z);
|
||||
$this->info('Creating client # '.$z);
|
||||
|
||||
$this->createClient($company, $user);
|
||||
}
|
||||
|
||||
for($x=0; $x<$this->count; $x++)
|
||||
{
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating invoice for client #'.$client->id);
|
||||
@ -386,20 +377,20 @@ class CreateTestData extends Command
|
||||
// });
|
||||
$client = factory(\App\Models\Client::class)->create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id
|
||||
'company_id' => $company->id,
|
||||
]);
|
||||
|
||||
factory(\App\Models\ClientContact::class, 1)->create([
|
||||
'user_id' => $user->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $company->id,
|
||||
'is_primary' => 1
|
||||
'is_primary' => 1,
|
||||
]);
|
||||
|
||||
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
||||
'user_id' => $user->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $company->id
|
||||
'company_id' => $company->id,
|
||||
]);
|
||||
|
||||
$client->id_number = $this->getNextClientNumber($client);
|
||||
@ -412,7 +403,6 @@ class CreateTestData extends Command
|
||||
|
||||
$client->country_id = $country->id;
|
||||
$client->save();
|
||||
|
||||
}
|
||||
|
||||
private function createExpense($client)
|
||||
@ -420,7 +410,7 @@ class CreateTestData extends Command
|
||||
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
||||
'user_id' => $client->user->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $client->company->id
|
||||
'company_id' => $client->company->id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -428,22 +418,21 @@ class CreateTestData extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Vendor::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company->id
|
||||
'company_id' => $client->company->id,
|
||||
]);
|
||||
|
||||
|
||||
factory(\App\Models\VendorContact::class, 1)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'vendor_id' => $vendor->id,
|
||||
'company_id' => $client->company->id,
|
||||
'is_primary' => 1
|
||||
'is_primary' => 1,
|
||||
]);
|
||||
|
||||
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
||||
'user_id' => $client->user->id,
|
||||
'vendor_id' => $vendor->id,
|
||||
'company_id' => $client->company->id,
|
||||
'is_primary' => 0
|
||||
'is_primary' => 0,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -451,7 +440,7 @@ class CreateTestData extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Task::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company->id
|
||||
'company_id' => $client->company->id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -459,7 +448,7 @@ class CreateTestData extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Project::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company->id
|
||||
'company_id' => $client->company->id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -511,9 +500,7 @@ class CreateTestData extends Command
|
||||
$this->invoice_repo->markSent($invoice);
|
||||
|
||||
if (rand(0, 1)) {
|
||||
|
||||
$invoice = $invoice->service()->markPaid()->save();
|
||||
|
||||
}
|
||||
//@todo this slow things down, but gives us PDFs of the invoices for inspection whilst debugging.
|
||||
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
||||
@ -643,8 +630,6 @@ class CreateTestData extends Command
|
||||
$item->custom_value3 = $product->custom_value3;
|
||||
$item->custom_value4 = $product->custom_value4;
|
||||
|
||||
|
||||
|
||||
$line_items[] = $item;
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,8 @@ use Carbon\Carbon;
|
||||
use Composer\Composer;
|
||||
use Composer\Console\Application;
|
||||
use Composer\Factory;
|
||||
use Composer\IO\NullIO;
|
||||
use Composer\Installer;
|
||||
use Composer\IO\NullIO;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
@ -94,25 +94,20 @@ class DemoMode extends Command
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->info("Migrating");
|
||||
$this->info('Migrating');
|
||||
Artisan::call('migrate:fresh --force');
|
||||
|
||||
$this->info("Seeding");
|
||||
$this->info('Seeding');
|
||||
Artisan::call('db:seed --force');
|
||||
|
||||
$this->info("Seeding Random Data");
|
||||
$this->info('Seeding Random Data');
|
||||
$this->createSmallAccount();
|
||||
|
||||
VersionCheck::dispatchNow();
|
||||
|
||||
CompanySizeCheck::dispatchNow();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private function createSmallAccount()
|
||||
{
|
||||
$faker = \Faker\Factory::create();
|
||||
@ -127,7 +122,7 @@ class DemoMode extends Command
|
||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||
'enabled_modules' => 32767,
|
||||
'company_key' => 'KEY',
|
||||
'enable_shop_api' => true
|
||||
'enable_shop_api' => true,
|
||||
]);
|
||||
|
||||
$settings = $company->settings;
|
||||
@ -154,7 +149,7 @@ class DemoMode extends Command
|
||||
$user = factory(\App\Models\User::class)->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => 'small@example.com',
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -181,12 +176,11 @@ class DemoMode extends Command
|
||||
$u2 = User::where('email', 'demo@invoiceninja.com')->first();
|
||||
|
||||
if (! $u2) {
|
||||
|
||||
$u2 = factory(\App\Models\User::class)->create([
|
||||
'email' => 'demo@invoiceninja.com',
|
||||
'password' => Hash::make('demo'),
|
||||
'account_id' => $account->id,
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
|
||||
$company_token = new CompanyToken;
|
||||
@ -217,14 +211,12 @@ class DemoMode extends Command
|
||||
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$z = $x + 1;
|
||||
$this->info("Creating client # ".$z);
|
||||
$this->info('Creating client # '.$z);
|
||||
|
||||
$this->createClient($company, $user, $u2->id);
|
||||
|
||||
}
|
||||
|
||||
for($x=0; $x<$this->count; $x++)
|
||||
{
|
||||
for ($x = 0; $x < $this->count; $x++) {
|
||||
$client = $company->clients->random();
|
||||
|
||||
$this->info('creating entities for client #'.$client->id);
|
||||
@ -268,7 +260,6 @@ class DemoMode extends Command
|
||||
|
||||
// $this->info("creating project for client #".$client->id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function createClient($company, $user, $assigned_user_id = null)
|
||||
@ -279,20 +270,20 @@ class DemoMode extends Command
|
||||
// });
|
||||
$client = factory(\App\Models\Client::class)->create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id
|
||||
'company_id' => $company->id,
|
||||
]);
|
||||
|
||||
factory(\App\Models\ClientContact::class)->create([
|
||||
'user_id' => $user->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $company->id,
|
||||
'is_primary' => 1
|
||||
'is_primary' => 1,
|
||||
]);
|
||||
|
||||
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
||||
'user_id' => $user->id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $company->id
|
||||
'company_id' => $company->id,
|
||||
]);
|
||||
|
||||
$client->id_number = $this->getNextClientNumber($client);
|
||||
@ -301,12 +292,12 @@ class DemoMode extends Command
|
||||
$settings->currency_id = (string) rand(1, 3);
|
||||
$client->settings = $settings;
|
||||
|
||||
if(rand(0,1))
|
||||
if (rand(0, 1)) {
|
||||
$client->assigned_user_id = $assigned_user_id;
|
||||
}
|
||||
|
||||
$client->country_id = array_rand([36, 392, 840, 124, 276, 826]);
|
||||
$client->save();
|
||||
|
||||
}
|
||||
|
||||
private function createExpense($client)
|
||||
@ -314,7 +305,7 @@ class DemoMode extends Command
|
||||
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
||||
'user_id' => $client->user_id,
|
||||
'client_id' => $client->id,
|
||||
'company_id' => $client->company_id
|
||||
'company_id' => $client->company_id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -322,22 +313,21 @@ class DemoMode extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Vendor::class)->create([
|
||||
'user_id' => $client->user_id,
|
||||
'company_id' => $client->company_id
|
||||
'company_id' => $client->company_id,
|
||||
]);
|
||||
|
||||
|
||||
factory(\App\Models\VendorContact::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'vendor_id' => $vendor->id,
|
||||
'company_id' => $client->company_id,
|
||||
'is_primary' => 1
|
||||
'is_primary' => 1,
|
||||
]);
|
||||
|
||||
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
||||
'user_id' => $client->user->id,
|
||||
'vendor_id' => $vendor->id,
|
||||
'company_id' => $client->company_id,
|
||||
'is_primary' => 0
|
||||
'is_primary' => 0,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -345,7 +335,7 @@ class DemoMode extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Task::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company_id
|
||||
'company_id' => $client->company_id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -353,7 +343,7 @@ class DemoMode extends Command
|
||||
{
|
||||
$vendor = factory(\App\Models\Project::class)->create([
|
||||
'user_id' => $client->user->id,
|
||||
'company_id' => $client->company_id
|
||||
'company_id' => $client->company_id,
|
||||
]);
|
||||
}
|
||||
|
||||
@ -368,10 +358,11 @@ class DemoMode extends Command
|
||||
$invoice = InvoiceFactory::create($client->company->id, $client->user->id); //stub the company and user_id
|
||||
$invoice->client_id = $client->id;
|
||||
|
||||
if((bool)rand(0,1))
|
||||
if ((bool) rand(0, 1)) {
|
||||
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||
else
|
||||
} else {
|
||||
$dateable = Carbon::now()->addDays(rand(0, 90));
|
||||
}
|
||||
|
||||
$invoice->date = $dateable;
|
||||
|
||||
@ -403,8 +394,9 @@ class DemoMode extends Command
|
||||
|
||||
$invoice = $invoice_calc->getInvoice();
|
||||
|
||||
if(rand(0,1))
|
||||
if (rand(0, 1)) {
|
||||
$invoice->assigned_user_id = $assigned_user_id;
|
||||
}
|
||||
|
||||
$invoice->save();
|
||||
$invoice->service()->createInvitations()->markSent();
|
||||
@ -412,7 +404,6 @@ class DemoMode extends Command
|
||||
$this->invoice_repo->markSent($invoice);
|
||||
|
||||
if ((bool) rand(0, 2)) {
|
||||
|
||||
$invoice = $invoice->service()->markPaid()->save();
|
||||
|
||||
$invoice->payments->each(function ($payment) {
|
||||
@ -435,10 +426,11 @@ class DemoMode extends Command
|
||||
|
||||
$credit = factory(\App\Models\Credit::class)->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
|
||||
|
||||
if((bool)rand(0,1))
|
||||
if ((bool) rand(0, 1)) {
|
||||
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||
else
|
||||
} else {
|
||||
$dateable = Carbon::now()->addDays(rand(0, 90));
|
||||
}
|
||||
|
||||
$credit->date = $dateable;
|
||||
|
||||
@ -467,8 +459,9 @@ class DemoMode extends Command
|
||||
|
||||
$credit = $invoice_calc->getCredit();
|
||||
|
||||
if(rand(0,1))
|
||||
if (rand(0, 1)) {
|
||||
$credit->assigned_user_id = $assigned_user_id;
|
||||
}
|
||||
|
||||
$credit->save();
|
||||
$credit->service()->markSent()->save();
|
||||
@ -477,7 +470,6 @@ class DemoMode extends Command
|
||||
|
||||
private function createQuote($client, $assigned_user_id = null)
|
||||
{
|
||||
|
||||
$faker = \Faker\Factory::create();
|
||||
|
||||
$quote = factory(\App\Models\Quote::class)->create(['user_id' => $client->user->id, 'company_id' => $client->company_id, 'client_id' => $client->id]);
|
||||
@ -485,8 +477,7 @@ class DemoMode extends Command
|
||||
if ((bool) rand(0, 1)) {
|
||||
$dateable = Carbon::now()->subDays(rand(1, 30));
|
||||
$dateable_due = $dateable->addDays(rand(1, 30));
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
$dateable = Carbon::now()->addDays(rand(1, 30));
|
||||
$dateable_due = $dateable->addDays(rand(-10, 30));
|
||||
}
|
||||
@ -523,8 +514,9 @@ class DemoMode extends Command
|
||||
|
||||
$quote = $quote_calc->getQuote();
|
||||
|
||||
if(rand(0,1))
|
||||
if (rand(0, 1)) {
|
||||
$quote->assigned_user_id = $assigned_user_id;
|
||||
}
|
||||
|
||||
$quote->save();
|
||||
|
||||
@ -566,8 +558,6 @@ class DemoMode extends Command
|
||||
$item->custom_value3 = $product->custom_value3;
|
||||
$item->custom_value4 = $product->custom_value4;
|
||||
|
||||
|
||||
|
||||
$line_items[] = $item;
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ImportMigrations extends Command
|
||||
$user = factory(\App\Models\User::class)->create([
|
||||
'account_id' => $account->id,
|
||||
'email' => $this->faker->email,
|
||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
||||
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||
]);
|
||||
|
||||
$company_token = CompanyToken::create([
|
||||
|
@ -3,17 +3,16 @@
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use Composer\Composer;
|
||||
use Composer\Console\Application;
|
||||
use Composer\Factory;
|
||||
use Composer\IO\NullIO;
|
||||
use Composer\Installer;
|
||||
use Composer\IO\NullIO;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Composer\Console\Application;
|
||||
|
||||
class PostUpdate extends Command
|
||||
{
|
||||
|
||||
protected $name = 'ninja:post-update';
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
@ -38,7 +37,7 @@ class PostUpdate extends Command
|
||||
{
|
||||
set_time_limit(0);
|
||||
|
||||
info("running post update");
|
||||
info('running post update');
|
||||
|
||||
try {
|
||||
Artisan::call('migrate', ['--force' => true]);
|
||||
@ -52,26 +51,27 @@ class PostUpdate extends Command
|
||||
\Log::error("I wasn't able to optimize.");
|
||||
}
|
||||
|
||||
|
||||
$composer_data = array(
|
||||
$composer_data = [
|
||||
'url' => 'https://getcomposer.org/composer.phar',
|
||||
'dir' => __DIR__.'/.code',
|
||||
'bin' => __DIR__.'/.code/composer.phar',
|
||||
'json' => __DIR__.'/.code/composer.json',
|
||||
'conf' => array(
|
||||
"autoload" => array(
|
||||
"psr-4" => array(
|
||||
"" => "local/"
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
'conf' => [
|
||||
'autoload' => [
|
||||
'psr-4' => [
|
||||
'' => 'local/',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
if(!is_dir($composer_data['dir']))
|
||||
if (! is_dir($composer_data['dir'])) {
|
||||
mkdir($composer_data['dir'], 0777, true);
|
||||
}
|
||||
|
||||
if(!is_dir("{$composer_data['dir']}/local"))
|
||||
if (! is_dir("{$composer_data['dir']}/local")) {
|
||||
mkdir("{$composer_data['dir']}/local", 0777, true);
|
||||
}
|
||||
|
||||
copy($composer_data['url'], $composer_data['bin']);
|
||||
require_once "phar://{$composer_data['bin']}/src/bootstrap.php";
|
||||
@ -80,21 +80,20 @@ class PostUpdate extends Command
|
||||
file_put_contents($composer_data['json'], $conf_json);
|
||||
chdir($composer_data['dir']);
|
||||
putenv("COMPOSER_HOME={$composer_data['dir']}");
|
||||
putenv("OSTYPE=OS400");
|
||||
putenv('OSTYPE=OS400');
|
||||
$app = new \Composer\Console\Application();
|
||||
|
||||
$factory = new \Composer\Factory();
|
||||
$output = $factory->createOutput();
|
||||
|
||||
$input = new \Symfony\Component\Console\Input\ArrayInput(array(
|
||||
$input = new \Symfony\Component\Console\Input\ArrayInput([
|
||||
'command' => 'install',
|
||||
));
|
||||
]);
|
||||
$input->setInteractive(false);
|
||||
echo "<pre>";
|
||||
echo '<pre>';
|
||||
$cmdret = $app->doRun($input, $output);
|
||||
echo "end!";
|
||||
echo 'end!';
|
||||
|
||||
\Log::error(print_r($cmdret, 1));
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ class SendTestEmails extends Command
|
||||
|
||||
$user = User::whereEmail('user@example.com')->first();
|
||||
|
||||
|
||||
if (! $user) {
|
||||
$account = factory(\App\Models\Account::class)->create();
|
||||
|
||||
@ -82,8 +81,6 @@ class SendTestEmails extends Command
|
||||
'last_name' => 'Doe',
|
||||
]);
|
||||
|
||||
|
||||
|
||||
$company = factory(\App\Models\Company::class)->create([
|
||||
'account_id' => $account->id,
|
||||
]);
|
||||
@ -103,11 +100,8 @@ class SendTestEmails extends Command
|
||||
$account = $company->account;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$client = Client::all()->first();
|
||||
|
||||
|
||||
if (! $client) {
|
||||
$client = ClientFactory::create($company->id, $user->id);
|
||||
$client->save();
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -37,13 +37,11 @@ class CreateTestCreditJob implements ShouldQueue
|
||||
|
||||
protected $client;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
@ -96,7 +94,6 @@ class CreateTestCreditJob implements ShouldQueue
|
||||
event(new CreateCreditInvitation($credit, $credit->company, Ninja::eventVars()));
|
||||
}
|
||||
|
||||
|
||||
private function buildLineItems($count = 1)
|
||||
{
|
||||
$line_items = [];
|
||||
@ -131,8 +128,6 @@ class CreateTestCreditJob implements ShouldQueue
|
||||
$item->custom_value3 = $product->custom_value3;
|
||||
$item->custom_value4 = $product->custom_value4;
|
||||
|
||||
|
||||
|
||||
$line_items[] = $item;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -36,13 +36,11 @@ class CreateTestInvoiceJob implements ShouldQueue
|
||||
|
||||
protected $client;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
@ -97,7 +95,6 @@ class CreateTestInvoiceJob implements ShouldQueue
|
||||
|
||||
//$this->invoice_repo->markSent($invoice);
|
||||
|
||||
|
||||
if (rand(0, 1)) {
|
||||
$payment = PaymentFactory::create($this->client->company->id, $this->client->user->id);
|
||||
$payment->date = $dateable;
|
||||
@ -121,7 +118,6 @@ class CreateTestInvoiceJob implements ShouldQueue
|
||||
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
||||
}
|
||||
|
||||
|
||||
private function buildLineItems($count = 1)
|
||||
{
|
||||
$line_items = [];
|
||||
@ -156,8 +152,6 @@ class CreateTestInvoiceJob implements ShouldQueue
|
||||
$item->custom_value3 = $product->custom_value3;
|
||||
$item->custom_value4 = $product->custom_value4;
|
||||
|
||||
|
||||
|
||||
$line_items[] = $item;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -36,13 +36,11 @@ class CreateTestQuoteJob implements ShouldQueue
|
||||
|
||||
protected $client;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new job instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
|
||||
public function __construct(Client $client)
|
||||
{
|
||||
$this->client = $client;
|
||||
@ -89,8 +87,6 @@ class CreateTestQuoteJob implements ShouldQueue
|
||||
CreateQuoteInvitations::dispatch($quote, $quote->company);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private function buildLineItems($count = 1)
|
||||
{
|
||||
$line_items = [];
|
||||
@ -125,8 +121,6 @@ class CreateTestQuoteJob implements ShouldQueue
|
||||
$item->custom_value3 = $product->custom_value3;
|
||||
$item->custom_value4 = $product->custom_value4;
|
||||
|
||||
|
||||
|
||||
$line_items[] = $item;
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -4,9 +4,8 @@ namespace App\DataMapper\Analytics;
|
||||
|
||||
class LoginFailure
|
||||
{
|
||||
|
||||
/**
|
||||
* The type of Sample
|
||||
* The type of Sample.
|
||||
*
|
||||
* Monotonically incrementing counter
|
||||
*
|
||||
@ -17,13 +16,13 @@ class LoginFailure
|
||||
public $type = 'counter';
|
||||
|
||||
/**
|
||||
* The name of the counter
|
||||
* The name of the counter.
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'login.failure';
|
||||
|
||||
/**
|
||||
* The datetime of the counter measurement
|
||||
* The datetime of the counter measurement.
|
||||
*
|
||||
* date("Y-m-d H:i:s")
|
||||
*
|
||||
@ -33,10 +32,9 @@ class LoginFailure
|
||||
|
||||
/**
|
||||
* The increment amount... should always be
|
||||
* set to 0
|
||||
* set to 0.
|
||||
*
|
||||
* @var integer
|
||||
* @var int
|
||||
*/
|
||||
public $metric = 0;
|
||||
|
||||
}
|
@ -4,9 +4,8 @@ namespace App\DataMapper\Analytics;
|
||||
|
||||
class LoginSuccess
|
||||
{
|
||||
|
||||
/**
|
||||
* The type of Sample
|
||||
* The type of Sample.
|
||||
*
|
||||
* Monotonically incrementing counter
|
||||
*
|
||||
@ -17,13 +16,13 @@ class LoginSuccess
|
||||
public $type = 'counter';
|
||||
|
||||
/**
|
||||
* The name of the counter
|
||||
* The name of the counter.
|
||||
* @var string
|
||||
*/
|
||||
public $name = 'login.success';
|
||||
|
||||
/**
|
||||
* The datetime of the counter measurement
|
||||
* The datetime of the counter measurement.
|
||||
*
|
||||
* date("Y-m-d H:i:s")
|
||||
*
|
||||
@ -33,10 +32,9 @@ class LoginSuccess
|
||||
|
||||
/**
|
||||
* The increment amount... should always be
|
||||
* set to 0
|
||||
* set to 0.
|
||||
*
|
||||
* @var integer
|
||||
* @var int
|
||||
*/
|
||||
public $metric = 0;
|
||||
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -12,7 +12,7 @@
|
||||
namespace App\DataMapper;
|
||||
|
||||
/**
|
||||
* ClientSettings
|
||||
* ClientSettings.
|
||||
*/
|
||||
class BaseSettings
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,7 @@ use App\Models\Client;
|
||||
use App\Utils\TranslationHelper;
|
||||
|
||||
/**
|
||||
* ClientSettings
|
||||
* ClientSettings.
|
||||
*
|
||||
* Client settings are built as a superset of Company Settings
|
||||
*
|
||||
@ -25,13 +25,11 @@ use App\Utils\TranslationHelper;
|
||||
*
|
||||
* Client settings are passed down to the entity level where they can be further customized and then saved
|
||||
* into the settings column of the entity, so there is no need to create additional entity level settings handlers.
|
||||
*
|
||||
*/
|
||||
class ClientSettings extends BaseSettings
|
||||
{
|
||||
|
||||
/**
|
||||
* Settings which which are unique to client settings
|
||||
* Settings which which are unique to client settings.
|
||||
*/
|
||||
public $industry_id;
|
||||
public $size_id;
|
||||
@ -44,7 +42,7 @@ class ClientSettings extends BaseSettings
|
||||
/**
|
||||
* Cast object values and return entire class
|
||||
* prevents missing properties from not being returned
|
||||
* and always ensure an up to date class is returned
|
||||
* and always ensure an up to date class is returned.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
@ -54,11 +52,9 @@ class ClientSettings extends BaseSettings
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Default Client Settings scaffold
|
||||
* Default Client Settings scaffold.
|
||||
*
|
||||
* @return \stdClass
|
||||
*
|
||||
*/
|
||||
public static function defaults() : \stdClass
|
||||
{
|
||||
@ -71,9 +67,8 @@ class ClientSettings extends BaseSettings
|
||||
return self::setCasts($data, self::$casts);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Merges settings from Company to Client
|
||||
* Merges settings from Company to Client.
|
||||
*
|
||||
* @param \stdClass $company_settings
|
||||
* @param \stdClass $client_settings
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -15,9 +15,8 @@ use App\DataMapper\CompanySettings;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* CompanySettings
|
||||
* CompanySettings.
|
||||
*/
|
||||
|
||||
class CompanySettings extends BaseSettings
|
||||
{
|
||||
use MakesHash;
|
||||
@ -56,7 +55,7 @@ class CompanySettings extends BaseSettings
|
||||
|
||||
public $default_task_rate = 0;
|
||||
|
||||
public $payment_terms = "";
|
||||
public $payment_terms = '';
|
||||
public $send_reminders = false;
|
||||
|
||||
public $custom_message_dashboard = '';
|
||||
@ -241,7 +240,6 @@ class CompanySettings extends BaseSettings
|
||||
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',
|
||||
@ -414,7 +412,6 @@ class CompanySettings extends BaseSettings
|
||||
'client_portal_enable_uploads' => 'bool',
|
||||
];
|
||||
|
||||
|
||||
public static $free_plan_casts = [
|
||||
'currency_id' => 'string',
|
||||
'company_gateway_ids' => 'string',
|
||||
@ -453,7 +450,7 @@ class CompanySettings extends BaseSettings
|
||||
|
||||
/**
|
||||
* Array of variables which
|
||||
* cannot be modified client side
|
||||
* cannot be modified client side.
|
||||
*/
|
||||
public static $protected_fields = [
|
||||
// 'credit_number_counter',
|
||||
@ -470,7 +467,7 @@ class CompanySettings extends BaseSettings
|
||||
/**
|
||||
* Cast object values and return entire class
|
||||
* prevents missing properties from not being returned
|
||||
* and always ensure an up to date class is returned
|
||||
* and always ensure an up to date class is returned.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
@ -480,14 +477,14 @@ class CompanySettings extends BaseSettings
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides class defaults on init
|
||||
* Provides class defaults on init.
|
||||
* @return object
|
||||
*/
|
||||
public static function defaults():\stdClass
|
||||
{
|
||||
$config = json_decode(config('ninja.settings'));
|
||||
|
||||
$data = (object) get_class_vars(CompanySettings::class);
|
||||
$data = (object) get_class_vars(self::class);
|
||||
|
||||
unset($data->casts);
|
||||
unset($data->protected_fields);
|
||||
@ -516,7 +513,7 @@ class CompanySettings extends BaseSettings
|
||||
*/
|
||||
public static function setProperties($settings):\stdClass
|
||||
{
|
||||
$company_settings = (object) get_class_vars(CompanySettings::class);
|
||||
$company_settings = (object) get_class_vars(self::class);
|
||||
|
||||
foreach ($company_settings as $key => $value) {
|
||||
if (! property_exists($settings, $key)) {
|
||||
@ -614,7 +611,7 @@ class CompanySettings extends BaseSettings
|
||||
'$custom_surcharge3',
|
||||
'$custom_surcharge4',
|
||||
'$paid_to_date',
|
||||
'$client.balance'
|
||||
'$client.balance',
|
||||
],
|
||||
];
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -15,12 +15,10 @@ use App\Models\Client;
|
||||
use App\Models\User;
|
||||
|
||||
/**
|
||||
* Class DefaultSettings
|
||||
* @package App\DataMapper
|
||||
* Class DefaultSettings.
|
||||
*/
|
||||
class DefaultSettings extends BaseSettings
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -12,7 +12,7 @@
|
||||
namespace App\DataMapper;
|
||||
|
||||
/**
|
||||
* EmailSpooledForSend
|
||||
* EmailSpooledForSend.
|
||||
*
|
||||
* Stubbed class used to store the meta data
|
||||
* for an email that was unable to be sent
|
||||
@ -21,7 +21,6 @@ namespace App\DataMapper;
|
||||
* - Quota exceeded
|
||||
* - SMTP issues
|
||||
* - Upstream connectivity
|
||||
*
|
||||
*/
|
||||
class EmailSpooledForSend
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -120,9 +120,9 @@ class EmailTemplateDefaults
|
||||
]);
|
||||
|
||||
$invoice_message = '<p>'.self::transformText('invoice_message').'</p><br><br><p>$view_link</p>';
|
||||
|
||||
return $invoice_message;
|
||||
//return $converter->convertToHtml($invoice_message);
|
||||
|
||||
}
|
||||
|
||||
public static function emailQuoteSubject()
|
||||
@ -214,9 +214,8 @@ class EmailTemplateDefaults
|
||||
return Parsedown::instance()->line('Statement Templates needs texts record!');
|
||||
}
|
||||
|
||||
|
||||
private static function transformText($string)
|
||||
{
|
||||
return str_replace(":", "$", ctrans('texts.'.$string));
|
||||
return str_replace(':', '$', ctrans('texts.'.$string));
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -15,9 +15,8 @@ use App\DataMapper\CompanySettings;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* FreeCompanySettings
|
||||
* FreeCompanySettings.
|
||||
*/
|
||||
|
||||
class FreeCompanySettings extends BaseSettings
|
||||
{
|
||||
use MakesHash;
|
||||
@ -45,7 +44,7 @@ class FreeCompanySettings extends BaseSettings
|
||||
public $military_time = false;
|
||||
public $payment_number_pattern = '';
|
||||
public $payment_number_counter = 1;
|
||||
public $payment_terms = "";
|
||||
public $payment_terms = '';
|
||||
public $payment_type_id = '0';
|
||||
public $portal_design_id = '1';
|
||||
public $quote_design_id = 'VolejRejNm';
|
||||
@ -68,7 +67,6 @@ class FreeCompanySettings extends BaseSettings
|
||||
public $vendor_number_pattern = '';
|
||||
public $vendor_number_counter = 1;
|
||||
|
||||
|
||||
/* Company Meta data that we can use to build sub companies*/
|
||||
|
||||
public $address1 = '';
|
||||
@ -85,7 +83,6 @@ class FreeCompanySettings extends BaseSettings
|
||||
public $vat_number = '';
|
||||
public $website = '';
|
||||
|
||||
|
||||
public static $casts = [
|
||||
'portal_design_id' => 'string',
|
||||
'currency_id' => 'string',
|
||||
@ -141,7 +138,7 @@ class FreeCompanySettings extends BaseSettings
|
||||
/**
|
||||
* Cast object values and return entire class
|
||||
* prevents missing properties from not being returned
|
||||
* and always ensure an up to date class is returned
|
||||
* and always ensure an up to date class is returned.
|
||||
*
|
||||
* @return \stdClass
|
||||
*/
|
||||
@ -150,7 +147,7 @@ class FreeCompanySettings extends BaseSettings
|
||||
}
|
||||
|
||||
/**
|
||||
* Provides class defaults on init
|
||||
* Provides class defaults on init.
|
||||
* @return object
|
||||
*/
|
||||
public static function defaults():\stdClass
|
||||
@ -174,6 +171,4 @@ class FreeCompanySettings extends BaseSettings
|
||||
|
||||
return self::setCasts($data, self::$casts);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Clean extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -39,7 +38,6 @@ class Clean extends AbstractDesign
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="px-12 my-10">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -20,7 +20,6 @@ class Creative extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -42,7 +41,6 @@ $custom_css
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="m-12">
|
||||
@ -114,7 +112,6 @@ $custom_css
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
public function product()
|
||||
{
|
||||
return '';
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -64,10 +64,10 @@ class Designer
|
||||
|
||||
/**
|
||||
* Returns the design
|
||||
* formatted HTML
|
||||
* formatted HTML.
|
||||
* @return string The HTML design built
|
||||
*/
|
||||
public function build():Designer
|
||||
public function build():self
|
||||
{
|
||||
$this->setHtml()
|
||||
->exportVariables()
|
||||
@ -104,8 +104,7 @@ class Designer
|
||||
<div class="flex items-center justify-between m-12">
|
||||
%s <!-- Placeholder for signature -->
|
||||
%s <!-- Placehoder for Invoice Ninja logo -->
|
||||
</div>'
|
||||
;
|
||||
</div>';
|
||||
|
||||
$signature = '<img class="h-40" src="$contact.signature" />';
|
||||
$logo = '<div></div>';
|
||||
@ -178,7 +177,6 @@ class Designer
|
||||
$this->exported_variables['$entity_details'] = $this->processVariables($this->input_variables['invoice_details'], $this->quoteDetails($company));
|
||||
}
|
||||
|
||||
|
||||
$this->exported_variables['$product_table_header'] = $this->entity->buildTableHeader($this->input_variables['product_columns']);
|
||||
$this->exported_variables['$product_table_body'] = $this->entity->buildTableBody($this->input_variables['product_columns'], $this->design->product, '$product');
|
||||
$this->exported_variables['$task_table_header'] = $this->entity->buildTableHeader($this->input_variables['task_columns']);
|
||||
@ -191,6 +189,7 @@ class Designer
|
||||
if (strlen($this->exported_variables['$product_table_body']) == 0) {
|
||||
$this->exported_variables['$product_table_header'] = '';
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@ -214,7 +213,7 @@ class Designer
|
||||
foreach (array_keys($input_variables) as $value) {
|
||||
if (array_key_exists($value, $variables)) {
|
||||
//$tmp = str_replace("</span>", "_label</span>", $variables[$value]);
|
||||
$tmp = strtr($variables[$value], "</span>", "_label</span>");
|
||||
$tmp = strtr($variables[$value], '</span>', '_label</span>');
|
||||
$output .= $tmp;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Elegant extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -39,7 +38,6 @@ class Elegant extends AbstractDesign
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="m-10">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Hipster extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -40,7 +39,6 @@ $custom_css
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="px-12 py-16">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Modern extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -36,7 +35,6 @@ $custom_css
|
||||
<body>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Photo extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -43,8 +42,6 @@ $custom_css
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="px-16 py-10">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Plain extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -17,7 +17,6 @@ class Playful extends AbstractDesign
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public function includes()
|
||||
{
|
||||
return '<title>$number</title>
|
||||
@ -39,7 +38,6 @@ $custom_css
|
||||
</style>';
|
||||
}
|
||||
|
||||
|
||||
public function header()
|
||||
{
|
||||
return '<div class="my-12 mx-16">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -12,16 +12,15 @@
|
||||
namespace App\Events\Account;
|
||||
|
||||
use Illuminate\Broadcasting\Channel;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Broadcasting\PresenceChannel;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||
use Illuminate\Broadcasting\PresenceChannel;
|
||||
use Illuminate\Broadcasting\PrivateChannel;
|
||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||
use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class AccountCreated
|
||||
* @package App\Events\Account
|
||||
* Class AccountCreated.
|
||||
*/
|
||||
class AccountCreated
|
||||
{
|
||||
@ -35,6 +34,7 @@ class AccountCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -47,7 +47,6 @@ class ClientWasArchived
|
||||
$this->client = $client;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -41,6 +41,5 @@ class ClientWasCreated
|
||||
$this->client = $client;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -40,6 +40,5 @@ class ClientWasDeleted
|
||||
$this->client = $client;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -40,6 +40,5 @@ class ClientWasRestored
|
||||
$this->client = $client;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -40,6 +40,5 @@ class ClientWasUpdated
|
||||
$this->client = $client;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -21,21 +21,21 @@ use Illuminate\Foundation\Events\Dispatchable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class UserLoggedIn
|
||||
* @package App\Events\User
|
||||
* Class UserLoggedIn.
|
||||
*/
|
||||
class ContactLoggedIn
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
/**
|
||||
* @var $client_contact
|
||||
* @var
|
||||
*/
|
||||
public $client_contact;
|
||||
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -9,7 +9,6 @@
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
|
||||
namespace App\Events\Credit;
|
||||
|
||||
use App\Models\Company;
|
||||
@ -27,6 +26,7 @@ class CreditWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -9,7 +9,6 @@
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
|
||||
namespace App\Events\Credit;
|
||||
|
||||
use App\Models\Company;
|
||||
@ -27,6 +26,7 @@ class CreditWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -9,7 +9,6 @@
|
||||
* @license https://opensource.org/licenses/AAL
|
||||
*/
|
||||
|
||||
|
||||
namespace App\Events\Credit;
|
||||
|
||||
use App\Models\Company;
|
||||
@ -27,6 +26,7 @@ class CreditWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -25,6 +25,7 @@ class CreditWasEmailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -29,6 +29,7 @@ class CreditWasMarkedSent
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -40,6 +40,5 @@ class CreditWasRestored
|
||||
$this->credit = $credit;
|
||||
$this->company = $company;
|
||||
$this->event_vars = $event_vars;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -26,6 +26,7 @@ class CreditWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -36,6 +36,7 @@ class DesignWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class DesignWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class DesignWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
@ -53,5 +54,4 @@ class DesignWasDeleted
|
||||
{
|
||||
return new PrivateChannel('channel-name');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class DesignWasRestored
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class DesignWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
@ -43,6 +44,7 @@ class DesignWasUpdated
|
||||
|
||||
$this->event_vars = $event_vars;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the channels the event should broadcast on.
|
||||
*
|
||||
@ -52,5 +54,4 @@ class DesignWasUpdated
|
||||
{
|
||||
return new PrivateChannel('channel-name');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class ExpenseWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class ExpenseWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class ExpenseWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class ExpenseWasRestored
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class ExpenseWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasCancelled
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasEmailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -35,6 +35,7 @@ class InvoiceWasEmailedAndFailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasMarkedSent
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasPaid
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -32,6 +32,7 @@ class InvoiceWasRestored
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasReversed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -32,6 +32,7 @@ class InvoiceWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class InvoiceWasViewed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -31,6 +31,7 @@ class InvitationWasViewed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -33,6 +33,7 @@ class MethodDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class PaymentCompleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentFailed
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentFailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentWasArchived
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -30,6 +30,7 @@ class PaymentWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentWasDeleted
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentWasEmailed
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentWasEmailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -31,6 +31,7 @@ class PaymentWasEmailedAndFailed
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* PaymentWasEmailedAndFailed constructor.
|
||||
* @param Payment $payment
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -32,6 +32,7 @@ class PaymentWasRefunded
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -29,6 +29,7 @@ class PaymentWasRestored
|
||||
public $fromDeleted;
|
||||
public $company;
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentWasUpdated
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -22,7 +22,6 @@ class PaymentWasVoided
|
||||
{
|
||||
use SerializesModels;
|
||||
|
||||
|
||||
/**
|
||||
* @var Payment
|
||||
*/
|
||||
@ -31,6 +30,7 @@ class PaymentWasVoided
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -26,6 +26,7 @@ class ProductWasArchived
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -29,12 +29,13 @@ class ProductWasCreated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct(Product $product, $input = null, Company $company, array $event_vars)
|
||||
public function __construct(Product $product, $input, Company $company, array $event_vars)
|
||||
{
|
||||
$this->product = $product;
|
||||
$this->input = $input;
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -27,6 +27,7 @@ class ProductWasDeleted
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Invoice Ninja (https://invoiceninja.com)
|
||||
* Invoice Ninja (https://invoiceninja.com).
|
||||
*
|
||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||
*
|
||||
@ -26,6 +26,7 @@ class ProductWasUpdated
|
||||
public $company;
|
||||
|
||||
public $event_vars;
|
||||
|
||||
/**
|
||||
* Create a new event instance.
|
||||
*
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user