mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 13:14:31 -04: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_CONNECTION=db-ninja-01
|
||||||
DB_DATABASE1=db-ninja-01
|
DB_DATABASE1=db-ninja-01
|
||||||
DB_DATABASE2=db-ninja-02
|
DB_DATABASE2=db-ninja-02
|
||||||
MAIL_DRIVER=log
|
MAIL_MAILER=log
|
||||||
MAIL_PORT=587
|
MAIL_PORT=587
|
||||||
MAIL_ENCRYPTION=tls
|
MAIL_ENCRYPTION=tls
|
||||||
MAIL_HOST=
|
MAIL_HOST=
|
||||||
|
@ -33,7 +33,7 @@ REDIS_HOST=127.0.0.1
|
|||||||
REDIS_PASSWORD=null
|
REDIS_PASSWORD=null
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_DRIVER=smtp
|
MAIL_MAILER=smtp
|
||||||
MAIL_HOST=smtp.mailtrap.io
|
MAIL_HOST=smtp.mailtrap.io
|
||||||
MAIL_PORT=2525
|
MAIL_PORT=2525
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
|
@ -14,7 +14,7 @@ DB_CONNECTION=db-ninja-01
|
|||||||
DB_DATABASE1=ninja01
|
DB_DATABASE1=ninja01
|
||||||
DB_DATABASE2=ninja02
|
DB_DATABASE2=ninja02
|
||||||
|
|
||||||
MAIL_DRIVER=log
|
MAIL_MAILER=log
|
||||||
TRAVIS=true
|
TRAVIS=true
|
||||||
API_SECRET=password
|
API_SECRET=password
|
||||||
TEST_USERNAME=user@example.com
|
TEST_USERNAME=user@example.com
|
||||||
|
@ -70,13 +70,12 @@ class CheckData extends Command
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$this->logMessage(date('Y-m-d h:i:s') . ' Running CheckData...');
|
$this->logMessage(date('Y-m-d h:i:s').' Running CheckData...');
|
||||||
|
|
||||||
if ($database = $this->option('database')) {
|
if ($database = $this->option('database')) {
|
||||||
config(['database.default' => $database]);
|
config(['database.default' => $database]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$this->checkInvoiceBalances();
|
$this->checkInvoiceBalances();
|
||||||
$this->checkInvoicePayments();
|
$this->checkInvoicePayments();
|
||||||
$this->checkPaidToDates();
|
$this->checkPaidToDates();
|
||||||
@ -93,25 +92,25 @@ class CheckData extends Command
|
|||||||
$this->checkFailedJobs();
|
$this->checkFailedJobs();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage('Done: ' . strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE));
|
$this->logMessage('Done: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE));
|
||||||
$errorEmail = config('ninja.error_email');
|
$errorEmail = config('ninja.error_email');
|
||||||
|
|
||||||
if ($errorEmail) {
|
if ($errorEmail) {
|
||||||
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
Mail::raw($this->log, function ($message) use ($errorEmail, $database) {
|
||||||
$message->to($errorEmail)
|
$message->to($errorEmail)
|
||||||
->from(config('ninja.error_email'))
|
->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) {
|
} elseif (! $this->isValid) {
|
||||||
throw new Exception("Check data failed!!\n" . $this->log);
|
throw new Exception("Check data failed!!\n".$this->log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function logMessage($str)
|
private function logMessage($str)
|
||||||
{
|
{
|
||||||
$str = date('Y-m-d h:i:s') . ' ' . $str;
|
$str = date('Y-m-d h:i:s').' '.$str;
|
||||||
$this->info($str);
|
$this->info($str);
|
||||||
$this->log .= $str . "\n";
|
$this->log .= $str."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkOAuth()
|
private function checkOAuth()
|
||||||
@ -123,7 +122,7 @@ class CheckData extends Command
|
|||||||
->havingRaw('count(users.id) > 1')
|
->havingRaw('count(users.id) > 1')
|
||||||
->get(['users.oauth_user_id']);
|
->get(['users.oauth_user_id']);
|
||||||
|
|
||||||
$this->logMessage($users->count() . ' users with duplicate oauth ids');
|
$this->logMessage($users->count().' users with duplicate oauth ids');
|
||||||
|
|
||||||
if ($users->count() > 0) {
|
if ($users->count() > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
@ -132,7 +131,7 @@ class CheckData extends Command
|
|||||||
if ($this->option('fix') == 'true') {
|
if ($this->option('fix') == 'true') {
|
||||||
foreach ($users as $user) {
|
foreach ($users as $user) {
|
||||||
$first = true;
|
$first = true;
|
||||||
$this->logMessage('checking ' . $user->oauth_user_id);
|
$this->logMessage('checking '.$user->oauth_user_id);
|
||||||
$matches = DB::table('users')
|
$matches = DB::table('users')
|
||||||
->where('oauth_user_id', '=', $user->oauth_user_id)
|
->where('oauth_user_id', '=', $user->oauth_user_id)
|
||||||
->orderBy('id')
|
->orderBy('id')
|
||||||
@ -140,11 +139,11 @@ class CheckData extends Command
|
|||||||
|
|
||||||
foreach ($matches as $match) {
|
foreach ($matches as $match) {
|
||||||
if ($first) {
|
if ($first) {
|
||||||
$this->logMessage('skipping ' . $match->id);
|
$this->logMessage('skipping '.$match->id);
|
||||||
$first = false;
|
$first = false;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$this->logMessage('updating ' . $match->id);
|
$this->logMessage('updating '.$match->id);
|
||||||
|
|
||||||
DB::table('users')
|
DB::table('users')
|
||||||
->where('id', '=', $match->id)
|
->where('id', '=', $match->id)
|
||||||
@ -165,7 +164,7 @@ class CheckData extends Command
|
|||||||
->whereNull('contact_key')
|
->whereNull('contact_key')
|
||||||
->orderBy('id')
|
->orderBy('id')
|
||||||
->get(['id']);
|
->get(['id']);
|
||||||
$this->logMessage($contacts->count() . ' contacts without a contact_key');
|
$this->logMessage($contacts->count().' contacts without a contact_key');
|
||||||
|
|
||||||
if ($contacts->count() > 0) {
|
if ($contacts->count() > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
@ -184,7 +183,7 @@ class CheckData extends Command
|
|||||||
|
|
||||||
// check for missing contacts
|
// check for missing contacts
|
||||||
$clients = DB::table('clients')
|
$clients = DB::table('clients')
|
||||||
->leftJoin('client_contacts', function($join) {
|
->leftJoin('client_contacts', function ($join) {
|
||||||
$join->on('client_contacts.client_id', '=', 'clients.id')
|
$join->on('client_contacts.client_id', '=', 'clients.id')
|
||||||
->whereNull('client_contacts.deleted_at');
|
->whereNull('client_contacts.deleted_at');
|
||||||
})
|
})
|
||||||
@ -196,7 +195,7 @@ class CheckData extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$clients = $clients->get(['clients.id', 'clients.user_id', 'clients.company_id']);
|
$clients = $clients->get(['clients.id', 'clients.user_id', 'clients.company_id']);
|
||||||
$this->logMessage($clients->count() . ' clients without any contacts');
|
$this->logMessage($clients->count().' clients without any contacts');
|
||||||
|
|
||||||
if ($clients->count() > 0) {
|
if ($clients->count() > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
@ -217,7 +216,7 @@ class CheckData extends Command
|
|||||||
|
|
||||||
// check for more than one primary contact
|
// check for more than one primary contact
|
||||||
$clients = DB::table('clients')
|
$clients = DB::table('clients')
|
||||||
->leftJoin('client_contacts', function($join) {
|
->leftJoin('client_contacts', function ($join) {
|
||||||
$join->on('client_contacts.client_id', '=', 'clients.id')
|
$join->on('client_contacts.client_id', '=', 'clients.id')
|
||||||
->where('client_contacts.is_primary', '=', true)
|
->where('client_contacts.is_primary', '=', true)
|
||||||
->whereNull('client_contacts.deleted_at');
|
->whereNull('client_contacts.deleted_at');
|
||||||
@ -230,7 +229,7 @@ class CheckData extends Command
|
|||||||
}
|
}
|
||||||
|
|
||||||
$clients = $clients->get(['clients.id', DB::raw('count(client_contacts.id)')]);
|
$clients = $clients->get(['clients.id', DB::raw('count(client_contacts.id)')]);
|
||||||
$this->logMessage($clients->count() . ' clients without a single primary contact');
|
$this->logMessage($clients->count().' clients without a single primary contact');
|
||||||
|
|
||||||
if ($clients->count() > 0) {
|
if ($clients->count() > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
@ -250,7 +249,7 @@ class CheckData extends Command
|
|||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage($count . ' failed jobs');
|
$this->logMessage($count.' failed jobs');
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkInvitations()
|
private function checkInvitations()
|
||||||
@ -264,7 +263,7 @@ class CheckData extends Command
|
|||||||
->havingRaw('count(invoice_invitations.id) = 0')
|
->havingRaw('count(invoice_invitations.id) = 0')
|
||||||
->get(['invoices.id', 'invoices.user_id', 'invoices.company_id', 'invoices.client_id']);
|
->get(['invoices.id', 'invoices.user_id', 'invoices.company_id', 'invoices.client_id']);
|
||||||
|
|
||||||
$this->logMessage($invoices->count() . ' invoices without any invitations');
|
$this->logMessage($invoices->count().' invoices without any invitations');
|
||||||
|
|
||||||
if ($invoices->count() > 0) {
|
if ($invoices->count() > 0) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
@ -285,61 +284,49 @@ class CheckData extends Command
|
|||||||
|
|
||||||
private function checkInvoiceBalances()
|
private function checkInvoiceBalances()
|
||||||
{
|
{
|
||||||
|
|
||||||
$wrong_balances = 0;
|
$wrong_balances = 0;
|
||||||
$wrong_paid_to_dates = 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');
|
$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();
|
$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++;
|
$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->isValid = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage("{$wrong_balances} clients with incorrect balances");
|
$this->logMessage("{$wrong_balances} clients with incorrect balances");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkPaidToDates()
|
private function checkPaidToDates()
|
||||||
{
|
{
|
||||||
|
|
||||||
$wrong_paid_to_dates = 0;
|
$wrong_paid_to_dates = 0;
|
||||||
|
|
||||||
Client::withTrashed()->cursor()->each(function ($client) use($wrong_paid_to_dates){
|
Client::withTrashed()->cursor()->each(function ($client) use ($wrong_paid_to_dates) {
|
||||||
|
|
||||||
$total_invoice_payments = 0;
|
$total_invoice_payments = 0;
|
||||||
|
|
||||||
foreach($client->invoices as $invoice)
|
foreach ($client->invoices as $invoice) {
|
||||||
{
|
|
||||||
$total_amount = $invoice->payments->sum('pivot.amount');
|
$total_amount = $invoice->payments->sum('pivot.amount');
|
||||||
$total_refund = $invoice->payments->sum('pivot.refunded');
|
$total_refund = $invoice->payments->sum('pivot.refunded');
|
||||||
|
|
||||||
$total_invoice_payments += ($total_amount - $total_refund);
|
$total_invoice_payments += ($total_amount - $total_refund);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(round($total_invoice_payments,2) != round($client->paid_to_date,2)) {
|
if (round($total_invoice_payments, 2) != round($client->paid_to_date, 2)) {
|
||||||
$wrong_paid_to_dates++;
|
$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->isValid = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid to dates");
|
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid to dates");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkInvoicePayments()
|
private function checkInvoicePayments()
|
||||||
@ -349,27 +336,22 @@ class CheckData extends Command
|
|||||||
|
|
||||||
//todo reversing an invoice breaks the check data at this point;
|
//todo reversing an invoice breaks the check data at this point;
|
||||||
|
|
||||||
Client::cursor()->each(function ($client) use($wrong_balances){
|
Client::cursor()->each(function ($client) use ($wrong_balances) {
|
||||||
|
$client->invoices->where('is_deleted', false)->each(function ($invoice) use ($wrong_balances, $client) {
|
||||||
$client->invoices->where('is_deleted', false)->each(function ($invoice) use($wrong_balances, $client){
|
|
||||||
|
|
||||||
$total_amount = $invoice->payments->sum('pivot.amount');
|
$total_amount = $invoice->payments->sum('pivot.amount');
|
||||||
$total_refund = $invoice->payments->sum('pivot.refunded');
|
$total_refund = $invoice->payments->sum('pivot.refunded');
|
||||||
$total_credit = $invoice->credits->sum('amount');
|
$total_credit = $invoice->credits->sum('amount');
|
||||||
|
|
||||||
$total_paid = $total_amount - $total_refund;
|
$total_paid = $total_amount - $total_refund;
|
||||||
|
|
||||||
if($total_paid != ($invoice->amount - $invoice->balance - $total_credit)) {
|
if ($total_paid != ($invoice->amount - $invoice->balance - $total_credit)) {
|
||||||
$wrong_balances++;
|
$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->isValid = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->logMessage("{$wrong_balances} clients with incorrect invoice balances");
|
$this->logMessage("{$wrong_balances} clients with incorrect invoice balances");
|
||||||
@ -377,42 +359,33 @@ class CheckData extends Command
|
|||||||
|
|
||||||
private function checkClientBalances()
|
private function checkClientBalances()
|
||||||
{
|
{
|
||||||
|
|
||||||
$wrong_balances = 0;
|
$wrong_balances = 0;
|
||||||
$wrong_paid_to_dates = 0;
|
$wrong_paid_to_dates = 0;
|
||||||
|
|
||||||
foreach(Client::cursor() as $client)
|
foreach (Client::cursor() as $client) {
|
||||||
{
|
|
||||||
$invoice_balance = $client->invoices->sum('balance');
|
$invoice_balance = $client->invoices->sum('balance');
|
||||||
$invoice_amounts = $client->invoices->sum('amount') - $invoice_balance;
|
$invoice_amounts = $client->invoices->sum('amount') - $invoice_balance;
|
||||||
|
|
||||||
$credit_amounts = 0;
|
$credit_amounts = 0;
|
||||||
|
|
||||||
foreach($client->invoices as $invoice)
|
foreach ($client->invoices as $invoice) {
|
||||||
{
|
|
||||||
$credit_amounts += $invoice->credits->sum('amount');
|
$credit_amounts += $invoice->credits->sum('amount');
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/*To handle invoice reversals, we need to "ADD BACK" the credit amounts here*/
|
/*To handle invoice reversals, we need to "ADD BACK" the credit amounts here*/
|
||||||
$client_paid_to_date = $client->paid_to_date + $credit_amounts;
|
$client_paid_to_date = $client->paid_to_date + $credit_amounts;
|
||||||
|
|
||||||
$ledger = CompanyLedger::where('client_id', $client->id)->orderBy('id', 'DESC')->first();
|
$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++;
|
$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->isValid = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid_to_dates");
|
$this->logMessage("{$wrong_paid_to_dates} clients with incorrect paid_to_dates");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function checkLogoFiles()
|
private function checkLogoFiles()
|
||||||
@ -460,7 +433,6 @@ class CheckData extends Command
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function checkCompanyData()
|
private function checkCompanyData()
|
||||||
{
|
{
|
||||||
$tables = [
|
$tables = [
|
||||||
@ -497,29 +469,24 @@ class CheckData extends Command
|
|||||||
|
|
||||||
if ($records->count()) {
|
if ($records->count()) {
|
||||||
$this->isValid = false;
|
$this->isValid = false;
|
||||||
$this->logMessage($records->count() . " {$table} records with incorrect {$entityType} company id");
|
$this->logMessage($records->count()." {$table} records with incorrect {$entityType} company id");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// foreach(User::cursor() as $user) {
|
// foreach(User::cursor() as $user) {
|
||||||
|
|
||||||
// $records = Company::where('account_id',)
|
// $records = Company::where('account_id',)
|
||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function pluralizeEntityType($type)
|
public function pluralizeEntityType($type)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($type === 'company') {
|
if ($type === 'company') {
|
||||||
return 'companies';
|
return 'companies';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $type . 's';
|
return $type.'s';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,6 @@ class CreateTestData extends Command
|
|||||||
$this->createLargeAccount();
|
$this->createLargeAccount();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function createSmallAccount()
|
private function createSmallAccount()
|
||||||
{
|
{
|
||||||
$this->info('Creating Small Account and Company');
|
$this->info('Creating Small Account and Company');
|
||||||
@ -92,17 +91,16 @@ class CreateTestData extends Command
|
|||||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
$account->default_company_id = $company->id;
|
$account->default_company_id = $company->id;
|
||||||
$account->save();
|
$account->save();
|
||||||
|
|
||||||
$user = User::whereEmail('small@example.com')->first();
|
$user = User::whereEmail('small@example.com')->first();
|
||||||
|
|
||||||
if (!$user) {
|
if (! $user) {
|
||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => 'small@example.com',
|
'email' => 'small@example.com',
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,17 +129,16 @@ class CreateTestData extends Command
|
|||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->info('Creating '.$this->count. ' clients');
|
$this->info('Creating '.$this->count.' clients');
|
||||||
|
|
||||||
for ($x=0; $x<$this->count; $x++) {
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
$z = $x+1;
|
$z = $x + 1;
|
||||||
$this->info("Creating client # ".$z);
|
$this->info('Creating client # '.$z);
|
||||||
|
|
||||||
$this->createClient($company, $user);
|
$this->createClient($company, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($x=0; $x<$this->count; $x++)
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
{
|
|
||||||
$client = $company->clients->random();
|
$client = $company->clients->random();
|
||||||
|
|
||||||
$this->info('creating invoice for client #'.$client->id);
|
$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->info('creating project for client #'.$client->id);
|
||||||
$this->createProject($client);
|
$this->createProject($client);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createMediumAccount()
|
private function createMediumAccount()
|
||||||
@ -195,11 +191,11 @@ class CreateTestData extends Command
|
|||||||
|
|
||||||
$user = User::whereEmail('medium@example.com')->first();
|
$user = User::whereEmail('medium@example.com')->first();
|
||||||
|
|
||||||
if (!$user) {
|
if (! $user) {
|
||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => 'medium@example.com',
|
'email' => 'medium@example.com',
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,25 +218,23 @@ class CreateTestData extends Command
|
|||||||
'settings' => null,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
factory(\App\Models\Product::class, 50)->create([
|
factory(\App\Models\Product::class, 50)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->count = $this->count*10;
|
$this->count = $this->count * 10;
|
||||||
|
|
||||||
$this->info('Creating '.$this->count. ' clients');
|
$this->info('Creating '.$this->count.' clients');
|
||||||
|
|
||||||
for ($x=0; $x<$this->count; $x++) {
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
$z = $x+1;
|
$z = $x + 1;
|
||||||
$this->info("Creating client # ".$z);
|
$this->info('Creating client # '.$z);
|
||||||
|
|
||||||
$this->createClient($company, $user);
|
$this->createClient($company, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($x=0; $x<$this->count*100; $x++)
|
for ($x = 0; $x < $this->count * 100; $x++) {
|
||||||
{
|
|
||||||
$client = $company->clients->random();
|
$client = $company->clients->random();
|
||||||
|
|
||||||
$this->info('creating invoice for client #'.$client->id);
|
$this->info('creating invoice for client #'.$client->id);
|
||||||
@ -294,11 +288,11 @@ class CreateTestData extends Command
|
|||||||
|
|
||||||
$user = User::whereEmail('large@example.com')->first();
|
$user = User::whereEmail('large@example.com')->first();
|
||||||
|
|
||||||
if (!$user) {
|
if (! $user) {
|
||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => 'large@example.com',
|
'email' => 'large@example.com',
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -321,26 +315,23 @@ class CreateTestData extends Command
|
|||||||
'settings' => null,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
factory(\App\Models\Product::class, 15000)->create([
|
factory(\App\Models\Product::class, 15000)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->count = $this->count*100;
|
$this->count = $this->count * 100;
|
||||||
|
|
||||||
$this->info('Creating '.$this->count. ' clients');
|
$this->info('Creating '.$this->count.' clients');
|
||||||
|
|
||||||
|
for ($x = 0; $x < $this->count * 500; $x++) {
|
||||||
for ($x=0; $x<$this->count*500; $x++) {
|
$z = $x + 1;
|
||||||
$z = $x+1;
|
$this->info('Creating client # '.$z);
|
||||||
$this->info("Creating client # ".$z);
|
|
||||||
|
|
||||||
$this->createClient($company, $user);
|
$this->createClient($company, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
for($x=0; $x<$this->count; $x++)
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
{
|
|
||||||
$client = $company->clients->random();
|
$client = $company->clients->random();
|
||||||
|
|
||||||
$this->info('creating invoice for client #'.$client->id);
|
$this->info('creating invoice for client #'.$client->id);
|
||||||
@ -386,33 +377,32 @@ class CreateTestData extends Command
|
|||||||
// });
|
// });
|
||||||
$client = factory(\App\Models\Client::class)->create([
|
$client = factory(\App\Models\Client::class)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class, 1)->create([
|
factory(\App\Models\ClientContact::class, 1)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'is_primary' => 1
|
'is_primary' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$client->id_number = $this->getNextClientNumber($client);
|
$client->id_number = $this->getNextClientNumber($client);
|
||||||
|
|
||||||
$settings = $client->settings;
|
$settings = $client->settings;
|
||||||
$settings->currency_id = (string)rand(1,79);
|
$settings->currency_id = (string) rand(1, 79);
|
||||||
$client->settings = $settings;
|
$client->settings = $settings;
|
||||||
|
|
||||||
$country = Country::all()->random();
|
$country = Country::all()->random();
|
||||||
|
|
||||||
$client->country_id = $country->id;
|
$client->country_id = $country->id;
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createExpense($client)
|
private function createExpense($client)
|
||||||
@ -420,7 +410,7 @@ class CreateTestData extends Command
|
|||||||
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'client_id' => $client->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([
|
$vendor = factory(\App\Models\Vendor::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'company_id' => $client->company->id
|
'company_id' => $client->company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
factory(\App\Models\VendorContact::class, 1)->create([
|
factory(\App\Models\VendorContact::class, 1)->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'vendor_id' => $vendor->id,
|
'vendor_id' => $vendor->id,
|
||||||
'company_id' => $client->company->id,
|
'company_id' => $client->company->id,
|
||||||
'is_primary' => 1
|
'is_primary' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'vendor_id' => $vendor->id,
|
'vendor_id' => $vendor->id,
|
||||||
'company_id' => $client->company->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([
|
$vendor = factory(\App\Models\Task::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'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([
|
$vendor = factory(\App\Models\Project::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'company_id' => $client->company->id
|
'company_id' => $client->company->id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -471,7 +460,7 @@ class CreateTestData extends Command
|
|||||||
|
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
|
|
||||||
$invoice = InvoiceFactory::create($client->company->id, $client->user->id);//stub the company and user_id
|
$invoice = InvoiceFactory::create($client->company->id, $client->user->id); //stub the company and user_id
|
||||||
$invoice->client_id = $client->id;
|
$invoice->client_id = $client->id;
|
||||||
// $invoice->date = $faker->date();
|
// $invoice->date = $faker->date();
|
||||||
$dateable = Carbon::now()->subDays(rand(0, 90));
|
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||||
@ -511,9 +500,7 @@ class CreateTestData extends Command
|
|||||||
$this->invoice_repo->markSent($invoice);
|
$this->invoice_repo->markSent($invoice);
|
||||||
|
|
||||||
if (rand(0, 1)) {
|
if (rand(0, 1)) {
|
||||||
|
|
||||||
$invoice = $invoice->service()->markPaid()->save();
|
$invoice = $invoice->service()->markPaid()->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
//@todo this slow things down, but gives us PDFs of the invoices for inspection whilst debugging.
|
//@todo this slow things down, but gives us PDFs of the invoices for inspection whilst debugging.
|
||||||
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
||||||
@ -572,7 +559,7 @@ class CreateTestData extends Command
|
|||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
|
|
||||||
//$quote = QuoteFactory::create($client->company->id, $client->user->id);//stub the company and user_id
|
//$quote = QuoteFactory::create($client->company->id, $client->user->id);//stub the company and user_id
|
||||||
$quote =factory(\App\Models\Quote::class)->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
|
$quote = factory(\App\Models\Quote::class)->create(['user_id' => $client->user->id, 'company_id' => $client->company->id, 'client_id' => $client->id]);
|
||||||
$quote->date = $faker->date();
|
$quote->date = $faker->date();
|
||||||
$quote->client_id = $client->id;
|
$quote->client_id = $client->id;
|
||||||
|
|
||||||
@ -613,7 +600,7 @@ class CreateTestData extends Command
|
|||||||
{
|
{
|
||||||
$line_items = [];
|
$line_items = [];
|
||||||
|
|
||||||
for ($x=0; $x<$count; $x++) {
|
for ($x = 0; $x < $count; $x++) {
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->quantity = 1;
|
$item->quantity = 1;
|
||||||
//$item->cost = 10;
|
//$item->cost = 10;
|
||||||
@ -635,7 +622,7 @@ class CreateTestData extends Command
|
|||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::all()->random();
|
||||||
|
|
||||||
$item->cost = (float)$product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
$item->notes = $product->notes;
|
$item->notes = $product->notes;
|
||||||
$item->custom_value1 = $product->custom_value1;
|
$item->custom_value1 = $product->custom_value1;
|
||||||
@ -643,8 +630,6 @@ class CreateTestData extends Command
|
|||||||
$item->custom_value3 = $product->custom_value3;
|
$item->custom_value3 = $product->custom_value3;
|
||||||
$item->custom_value4 = $product->custom_value4;
|
$item->custom_value4 = $product->custom_value4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$line_items[] = $item;
|
$line_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,8 @@ use Carbon\Carbon;
|
|||||||
use Composer\Composer;
|
use Composer\Composer;
|
||||||
use Composer\Console\Application;
|
use Composer\Console\Application;
|
||||||
use Composer\Factory;
|
use Composer\Factory;
|
||||||
use Composer\IO\NullIO;
|
|
||||||
use Composer\Installer;
|
use Composer\Installer;
|
||||||
|
use Composer\IO\NullIO;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Illuminate\Support\Facades\Cache;
|
use Illuminate\Support\Facades\Cache;
|
||||||
@ -94,25 +94,20 @@ class DemoMode extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->info('Migrating');
|
||||||
$this->info("Migrating");
|
|
||||||
Artisan::call('migrate:fresh --force');
|
Artisan::call('migrate:fresh --force');
|
||||||
|
|
||||||
$this->info("Seeding");
|
$this->info('Seeding');
|
||||||
Artisan::call('db:seed --force');
|
Artisan::call('db:seed --force');
|
||||||
|
|
||||||
$this->info("Seeding Random Data");
|
$this->info('Seeding Random Data');
|
||||||
$this->createSmallAccount();
|
$this->createSmallAccount();
|
||||||
|
|
||||||
VersionCheck::dispatchNow();
|
VersionCheck::dispatchNow();
|
||||||
|
|
||||||
CompanySizeCheck::dispatchNow();
|
CompanySizeCheck::dispatchNow();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private function createSmallAccount()
|
private function createSmallAccount()
|
||||||
{
|
{
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
@ -127,7 +122,7 @@ class DemoMode extends Command
|
|||||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||||
'enabled_modules' => 32767,
|
'enabled_modules' => 32767,
|
||||||
'company_key' => 'KEY',
|
'company_key' => 'KEY',
|
||||||
'enable_shop_api' => true
|
'enable_shop_api' => true,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$settings = $company->settings;
|
$settings = $company->settings;
|
||||||
@ -139,8 +134,8 @@ class DemoMode extends Command
|
|||||||
$settings->state = $faker->state;
|
$settings->state = $faker->state;
|
||||||
$settings->postal_code = $faker->postcode;
|
$settings->postal_code = $faker->postcode;
|
||||||
$settings->website = $faker->url;
|
$settings->website = $faker->url;
|
||||||
$settings->vat_number = (string)$faker->numberBetween(123456789, 987654321);
|
$settings->vat_number = (string) $faker->numberBetween(123456789, 987654321);
|
||||||
$settings->phone = (string)$faker->phoneNumber;
|
$settings->phone = (string) $faker->phoneNumber;
|
||||||
|
|
||||||
$company->settings = $settings;
|
$company->settings = $settings;
|
||||||
$company->save();
|
$company->save();
|
||||||
@ -150,11 +145,11 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$user = User::whereEmail('small@example.com')->first();
|
$user = User::whereEmail('small@example.com')->first();
|
||||||
|
|
||||||
if (!$user) {
|
if (! $user) {
|
||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => 'small@example.com',
|
'email' => 'small@example.com',
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,13 +175,12 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$u2 = User::where('email', 'demo@invoiceninja.com')->first();
|
$u2 = User::where('email', 'demo@invoiceninja.com')->first();
|
||||||
|
|
||||||
if(!$u2){
|
if (! $u2) {
|
||||||
|
|
||||||
$u2 = factory(\App\Models\User::class)->create([
|
$u2 = factory(\App\Models\User::class)->create([
|
||||||
'email' => 'demo@invoiceninja.com',
|
'email' => 'demo@invoiceninja.com',
|
||||||
'password' => Hash::make('demo'),
|
'password' => Hash::make('demo'),
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$company_token = new CompanyToken;
|
$company_token = new CompanyToken;
|
||||||
@ -213,18 +207,16 @@ class DemoMode extends Command
|
|||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->info('Creating '.$this->count. ' clients');
|
$this->info('Creating '.$this->count.' clients');
|
||||||
|
|
||||||
for ($x=0; $x<$this->count; $x++) {
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
$z = $x+1;
|
$z = $x + 1;
|
||||||
$this->info("Creating client # ".$z);
|
$this->info('Creating client # '.$z);
|
||||||
|
|
||||||
$this->createClient($company, $user, $u2->id);
|
$this->createClient($company, $user, $u2->id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for($x=0; $x<$this->count; $x++)
|
for ($x = 0; $x < $this->count; $x++) {
|
||||||
{
|
|
||||||
$client = $company->clients->random();
|
$client = $company->clients->random();
|
||||||
|
|
||||||
$this->info('creating entities for client #'.$client->id);
|
$this->info('creating entities for client #'.$client->id);
|
||||||
@ -268,7 +260,6 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
// $this->info("creating project for client #".$client->id);
|
// $this->info("creating project for client #".$client->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createClient($company, $user, $assigned_user_id = null)
|
private function createClient($company, $user, $assigned_user_id = null)
|
||||||
@ -279,34 +270,34 @@ class DemoMode extends Command
|
|||||||
// });
|
// });
|
||||||
$client = factory(\App\Models\Client::class)->create([
|
$client = factory(\App\Models\Client::class)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class)->create([
|
factory(\App\Models\ClientContact::class)->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'company_id' => $company->id,
|
'company_id' => $company->id,
|
||||||
'is_primary' => 1
|
'is_primary' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
factory(\App\Models\ClientContact::class, rand(1, 5))->create([
|
||||||
'user_id' => $user->id,
|
'user_id' => $user->id,
|
||||||
'client_id' => $client->id,
|
'client_id' => $client->id,
|
||||||
'company_id' => $company->id
|
'company_id' => $company->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$client->id_number = $this->getNextClientNumber($client);
|
$client->id_number = $this->getNextClientNumber($client);
|
||||||
|
|
||||||
$settings = $client->settings;
|
$settings = $client->settings;
|
||||||
$settings->currency_id = (string)rand(1,3);
|
$settings->currency_id = (string) rand(1, 3);
|
||||||
$client->settings = $settings;
|
$client->settings = $settings;
|
||||||
|
|
||||||
if(rand(0,1))
|
if (rand(0, 1)) {
|
||||||
$client->assigned_user_id = $assigned_user_id;
|
$client->assigned_user_id = $assigned_user_id;
|
||||||
|
}
|
||||||
|
|
||||||
$client->country_id = array_rand([36,392,840,124,276,826]);
|
$client->country_id = array_rand([36, 392, 840, 124, 276, 826]);
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createExpense($client)
|
private function createExpense($client)
|
||||||
@ -314,7 +305,7 @@ class DemoMode extends Command
|
|||||||
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
factory(\App\Models\Expense::class, rand(1, 5))->create([
|
||||||
'user_id' => $client->user_id,
|
'user_id' => $client->user_id,
|
||||||
'client_id' => $client->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([
|
$vendor = factory(\App\Models\Vendor::class)->create([
|
||||||
'user_id' => $client->user_id,
|
'user_id' => $client->user_id,
|
||||||
'company_id' => $client->company_id
|
'company_id' => $client->company_id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
factory(\App\Models\VendorContact::class)->create([
|
factory(\App\Models\VendorContact::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'vendor_id' => $vendor->id,
|
'vendor_id' => $vendor->id,
|
||||||
'company_id' => $client->company_id,
|
'company_id' => $client->company_id,
|
||||||
'is_primary' => 1
|
'is_primary' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
factory(\App\Models\VendorContact::class, rand(1, 5))->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'vendor_id' => $vendor->id,
|
'vendor_id' => $vendor->id,
|
||||||
'company_id' => $client->company_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([
|
$vendor = factory(\App\Models\Task::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'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([
|
$vendor = factory(\App\Models\Project::class)->create([
|
||||||
'user_id' => $client->user->id,
|
'user_id' => $client->user->id,
|
||||||
'company_id' => $client->company_id
|
'company_id' => $client->company_id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,13 +355,14 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
|
|
||||||
$invoice = InvoiceFactory::create($client->company->id, $client->user->id);//stub the company and user_id
|
$invoice = InvoiceFactory::create($client->company->id, $client->user->id); //stub the company and user_id
|
||||||
$invoice->client_id = $client->id;
|
$invoice->client_id = $client->id;
|
||||||
|
|
||||||
if((bool)rand(0,1))
|
if ((bool) rand(0, 1)) {
|
||||||
$dateable = Carbon::now()->subDays(rand(0, 90));
|
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||||
else
|
} else {
|
||||||
$dateable = Carbon::now()->addDays(rand(0, 90));
|
$dateable = Carbon::now()->addDays(rand(0, 90));
|
||||||
|
}
|
||||||
|
|
||||||
$invoice->date = $dateable;
|
$invoice->date = $dateable;
|
||||||
|
|
||||||
@ -403,20 +394,20 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$invoice = $invoice_calc->getInvoice();
|
$invoice = $invoice_calc->getInvoice();
|
||||||
|
|
||||||
if(rand(0,1))
|
if (rand(0, 1)) {
|
||||||
$invoice->assigned_user_id = $assigned_user_id;
|
$invoice->assigned_user_id = $assigned_user_id;
|
||||||
|
}
|
||||||
|
|
||||||
$invoice->save();
|
$invoice->save();
|
||||||
$invoice->service()->createInvitations()->markSent();
|
$invoice->service()->createInvitations()->markSent();
|
||||||
|
|
||||||
$this->invoice_repo->markSent($invoice);
|
$this->invoice_repo->markSent($invoice);
|
||||||
|
|
||||||
if ((bool)rand(0, 2)) {
|
if ((bool) rand(0, 2)) {
|
||||||
|
|
||||||
$invoice = $invoice->service()->markPaid()->save();
|
$invoice = $invoice->service()->markPaid()->save();
|
||||||
|
|
||||||
$invoice->payments->each(function ($payment){
|
$invoice->payments->each(function ($payment) {
|
||||||
$payment->date = now()->addDays(rand(-30,30));
|
$payment->date = now()->addDays(rand(-30, 30));
|
||||||
$payment->save();
|
$payment->save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -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]);
|
$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));
|
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||||
else
|
} else {
|
||||||
$dateable = Carbon::now()->addDays(rand(0, 90));
|
$dateable = Carbon::now()->addDays(rand(0, 90));
|
||||||
|
}
|
||||||
|
|
||||||
$credit->date = $dateable;
|
$credit->date = $dateable;
|
||||||
|
|
||||||
@ -467,8 +459,9 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$credit = $invoice_calc->getCredit();
|
$credit = $invoice_calc->getCredit();
|
||||||
|
|
||||||
if(rand(0,1))
|
if (rand(0, 1)) {
|
||||||
$credit->assigned_user_id = $assigned_user_id;
|
$credit->assigned_user_id = $assigned_user_id;
|
||||||
|
}
|
||||||
|
|
||||||
$credit->save();
|
$credit->save();
|
||||||
$credit->service()->markSent()->save();
|
$credit->service()->markSent()->save();
|
||||||
@ -477,16 +470,14 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
private function createQuote($client, $assigned_user_id = null)
|
private function createQuote($client, $assigned_user_id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
$faker = \Faker\Factory::create();
|
$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]);
|
$quote = factory(\App\Models\Quote::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(1, 30));
|
$dateable = Carbon::now()->subDays(rand(1, 30));
|
||||||
$dateable_due = $dateable->addDays(rand(1, 30));
|
$dateable_due = $dateable->addDays(rand(1, 30));
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
$dateable = Carbon::now()->addDays(rand(1, 30));
|
$dateable = Carbon::now()->addDays(rand(1, 30));
|
||||||
$dateable_due = $dateable->addDays(rand(-10, 30));
|
$dateable_due = $dateable->addDays(rand(-10, 30));
|
||||||
}
|
}
|
||||||
@ -523,8 +514,9 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$quote = $quote_calc->getQuote();
|
$quote = $quote_calc->getQuote();
|
||||||
|
|
||||||
if(rand(0,1))
|
if (rand(0, 1)) {
|
||||||
$quote->assigned_user_id = $assigned_user_id;
|
$quote->assigned_user_id = $assigned_user_id;
|
||||||
|
}
|
||||||
|
|
||||||
$quote->save();
|
$quote->save();
|
||||||
|
|
||||||
@ -536,7 +528,7 @@ class DemoMode extends Command
|
|||||||
{
|
{
|
||||||
$line_items = [];
|
$line_items = [];
|
||||||
|
|
||||||
for ($x=0; $x<$count; $x++) {
|
for ($x = 0; $x < $count; $x++) {
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->quantity = 1;
|
$item->quantity = 1;
|
||||||
//$item->cost = 10;
|
//$item->cost = 10;
|
||||||
@ -558,7 +550,7 @@ class DemoMode extends Command
|
|||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::all()->random();
|
||||||
|
|
||||||
$item->cost = (float)$product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
$item->notes = $product->notes;
|
$item->notes = $product->notes;
|
||||||
$item->custom_value1 = $product->custom_value1;
|
$item->custom_value1 = $product->custom_value1;
|
||||||
@ -566,8 +558,6 @@ class DemoMode extends Command
|
|||||||
$item->custom_value3 = $product->custom_value3;
|
$item->custom_value3 = $product->custom_value3;
|
||||||
$item->custom_value4 = $product->custom_value4;
|
$item->custom_value4 = $product->custom_value4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$line_items[] = $item;
|
$line_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class ImportMigrations extends Command
|
|||||||
|
|
||||||
foreach ($directory as $file) {
|
foreach ($directory as $file) {
|
||||||
if ($file->getExtension() === 'zip') {
|
if ($file->getExtension() === 'zip') {
|
||||||
$this->info('Started processing: ' . $file->getBasename() . ' at ' . now());
|
$this->info('Started processing: '.$file->getBasename().' at '.now());
|
||||||
StartMigration::dispatch($file->getRealPath(), $this->getUser(), $this->getUser()->companies()->first());
|
StartMigration::dispatch($file->getRealPath(), $this->getUser(), $this->getUser()->companies()->first());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ class ImportMigrations extends Command
|
|||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'email' => $this->faker->email,
|
'email' => $this->faker->email,
|
||||||
'confirmation_code' => $this->createDbHash(config('database.default'))
|
'confirmation_code' => $this->createDbHash(config('database.default')),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$company_token = CompanyToken::create([
|
$company_token = CompanyToken::create([
|
||||||
@ -107,7 +107,7 @@ class ImportMigrations extends Command
|
|||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(!$account->default_company_id){
|
if (! $account->default_company_id) {
|
||||||
$account->default_company_id = $company->id;
|
$account->default_company_id = $company->id;
|
||||||
$account->save();
|
$account->save();
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,16 @@
|
|||||||
namespace App\Console\Commands;
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
use Composer\Composer;
|
use Composer\Composer;
|
||||||
|
use Composer\Console\Application;
|
||||||
use Composer\Factory;
|
use Composer\Factory;
|
||||||
use Composer\IO\NullIO;
|
|
||||||
use Composer\Installer;
|
use Composer\Installer;
|
||||||
|
use Composer\IO\NullIO;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\Artisan;
|
use Illuminate\Support\Facades\Artisan;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
use Composer\Console\Application;
|
|
||||||
|
|
||||||
class PostUpdate extends Command
|
class PostUpdate extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $name = 'ninja:post-update';
|
protected $name = 'ninja:post-update';
|
||||||
/**
|
/**
|
||||||
* The name and signature of the console command.
|
* The name and signature of the console command.
|
||||||
@ -38,10 +37,10 @@ class PostUpdate extends Command
|
|||||||
{
|
{
|
||||||
set_time_limit(0);
|
set_time_limit(0);
|
||||||
|
|
||||||
info("running post update");
|
info('running post update');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Artisan::call('migrate',['--force' => true]);
|
Artisan::call('migrate', ['--force' => true]);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
\Log::error("I wasn't able to migrate the data.");
|
\Log::error("I wasn't able to migrate the data.");
|
||||||
}
|
}
|
||||||
@ -52,49 +51,49 @@ class PostUpdate extends Command
|
|||||||
\Log::error("I wasn't able to optimize.");
|
\Log::error("I wasn't able to optimize.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$composer_data = [
|
||||||
$composer_data = array(
|
|
||||||
'url' => 'https://getcomposer.org/composer.phar',
|
'url' => 'https://getcomposer.org/composer.phar',
|
||||||
'dir' => __DIR__.'/.code',
|
'dir' => __DIR__.'/.code',
|
||||||
'bin' => __DIR__.'/.code/composer.phar',
|
'bin' => __DIR__.'/.code/composer.phar',
|
||||||
'json' => __DIR__.'/.code/composer.json',
|
'json' => __DIR__.'/.code/composer.json',
|
||||||
'conf' => array(
|
'conf' => [
|
||||||
"autoload" => array(
|
'autoload' => [
|
||||||
"psr-4" => array(
|
'psr-4' => [
|
||||||
"" => "local/"
|
'' => 'local/',
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
)
|
],
|
||||||
);
|
];
|
||||||
|
|
||||||
if(!is_dir($composer_data['dir']))
|
if (! is_dir($composer_data['dir'])) {
|
||||||
mkdir($composer_data['dir'],0777,true);
|
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);
|
mkdir("{$composer_data['dir']}/local", 0777, true);
|
||||||
|
}
|
||||||
|
|
||||||
copy($composer_data['url'],$composer_data['bin']);
|
copy($composer_data['url'], $composer_data['bin']);
|
||||||
require_once "phar://{$composer_data['bin']}/src/bootstrap.php";
|
require_once "phar://{$composer_data['bin']}/src/bootstrap.php";
|
||||||
|
|
||||||
$conf_json = json_encode($composer_data['conf'],JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES|JSON_UNESCAPED_UNICODE);
|
$conf_json = json_encode($composer_data['conf'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
|
||||||
file_put_contents($composer_data['json'],$conf_json);
|
file_put_contents($composer_data['json'], $conf_json);
|
||||||
chdir($composer_data['dir']);
|
chdir($composer_data['dir']);
|
||||||
putenv("COMPOSER_HOME={$composer_data['dir']}");
|
putenv("COMPOSER_HOME={$composer_data['dir']}");
|
||||||
putenv("OSTYPE=OS400");
|
putenv('OSTYPE=OS400');
|
||||||
$app = new \Composer\Console\Application();
|
$app = new \Composer\Console\Application();
|
||||||
|
|
||||||
$factory = new \Composer\Factory();
|
$factory = new \Composer\Factory();
|
||||||
$output = $factory->createOutput();
|
$output = $factory->createOutput();
|
||||||
|
|
||||||
$input = new \Symfony\Component\Console\Input\ArrayInput(array(
|
$input = new \Symfony\Component\Console\Input\ArrayInput([
|
||||||
'command' => 'install',
|
'command' => 'install',
|
||||||
));
|
]);
|
||||||
$input->setInteractive(false);
|
$input->setInteractive(false);
|
||||||
echo "<pre>";
|
echo '<pre>';
|
||||||
$cmdret = $app->doRun($input,$output);
|
$cmdret = $app->doRun($input, $output);
|
||||||
echo "end!";
|
echo 'end!';
|
||||||
|
|
||||||
\Log::error(print_r($cmdret,1));
|
|
||||||
|
|
||||||
|
\Log::error(print_r($cmdret, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,7 @@ class SendTestEmails extends Command
|
|||||||
|
|
||||||
$user = User::whereEmail('user@example.com')->first();
|
$user = User::whereEmail('user@example.com')->first();
|
||||||
|
|
||||||
|
if (! $user) {
|
||||||
if (!$user) {
|
|
||||||
$account = factory(\App\Models\Account::class)->create();
|
$account = factory(\App\Models\Account::class)->create();
|
||||||
|
|
||||||
$user = factory(\App\Models\User::class)->create([
|
$user = factory(\App\Models\User::class)->create([
|
||||||
@ -82,8 +81,6 @@ class SendTestEmails extends Command
|
|||||||
'last_name' => 'Doe',
|
'last_name' => 'Doe',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$company = factory(\App\Models\Company::class)->create([
|
$company = factory(\App\Models\Company::class)->create([
|
||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
]);
|
]);
|
||||||
@ -103,12 +100,9 @@ class SendTestEmails extends Command
|
|||||||
$account = $company->account;
|
$account = $company->account;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$client = Client::all()->first();
|
$client = Client::all()->first();
|
||||||
|
|
||||||
|
if (! $client) {
|
||||||
if (!$client) {
|
|
||||||
$client = ClientFactory::create($company->id, $user->id);
|
$client = ClientFactory::create($company->id, $user->id);
|
||||||
$client->save();
|
$client->save();
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -37,13 +37,11 @@ class CreateTestCreditJob implements ShouldQueue
|
|||||||
|
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct(Client $client)
|
public function __construct(Client $client)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
@ -96,12 +94,11 @@ class CreateTestCreditJob implements ShouldQueue
|
|||||||
event(new CreateCreditInvitation($credit, $credit->company, Ninja::eventVars()));
|
event(new CreateCreditInvitation($credit, $credit->company, Ninja::eventVars()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function buildLineItems($count = 1)
|
private function buildLineItems($count = 1)
|
||||||
{
|
{
|
||||||
$line_items = [];
|
$line_items = [];
|
||||||
|
|
||||||
for ($x=0; $x<$count; $x++) {
|
for ($x = 0; $x < $count; $x++) {
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->quantity = 1;
|
$item->quantity = 1;
|
||||||
//$item->cost = 10;
|
//$item->cost = 10;
|
||||||
@ -123,7 +120,7 @@ class CreateTestCreditJob implements ShouldQueue
|
|||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::all()->random();
|
||||||
|
|
||||||
$item->cost = (float)$product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
$item->notes = $product->notes;
|
$item->notes = $product->notes;
|
||||||
$item->custom_value1 = $product->custom_value1;
|
$item->custom_value1 = $product->custom_value1;
|
||||||
@ -131,8 +128,6 @@ class CreateTestCreditJob implements ShouldQueue
|
|||||||
$item->custom_value3 = $product->custom_value3;
|
$item->custom_value3 = $product->custom_value3;
|
||||||
$item->custom_value4 = $product->custom_value4;
|
$item->custom_value4 = $product->custom_value4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$line_items[] = $item;
|
$line_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -36,13 +36,11 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
|
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct(Client $client)
|
public function __construct(Client $client)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
@ -57,7 +55,7 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
{
|
{
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
|
|
||||||
$invoice = InvoiceFactory::create($this->client->company->id, $this->client->user->id);//stub the company and user_id
|
$invoice = InvoiceFactory::create($this->client->company->id, $this->client->user->id); //stub the company and user_id
|
||||||
$invoice->client_id = $this->client->id;
|
$invoice->client_id = $this->client->id;
|
||||||
// $invoice->date = $faker->date();
|
// $invoice->date = $faker->date();
|
||||||
$dateable = Carbon::now()->subDays(rand(0, 90));
|
$dateable = Carbon::now()->subDays(rand(0, 90));
|
||||||
@ -97,7 +95,6 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
|
|
||||||
//$this->invoice_repo->markSent($invoice);
|
//$this->invoice_repo->markSent($invoice);
|
||||||
|
|
||||||
|
|
||||||
if (rand(0, 1)) {
|
if (rand(0, 1)) {
|
||||||
$payment = PaymentFactory::create($this->client->company->id, $this->client->user->id);
|
$payment = PaymentFactory::create($this->client->company->id, $this->client->user->id);
|
||||||
$payment->date = $dateable;
|
$payment->date = $dateable;
|
||||||
@ -121,12 +118,11 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
event(new InvoiceWasCreated($invoice, $invoice->company, Ninja::eventVars()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private function buildLineItems($count = 1)
|
private function buildLineItems($count = 1)
|
||||||
{
|
{
|
||||||
$line_items = [];
|
$line_items = [];
|
||||||
|
|
||||||
for ($x=0; $x<$count; $x++) {
|
for ($x = 0; $x < $count; $x++) {
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->quantity = 1;
|
$item->quantity = 1;
|
||||||
//$item->cost = 10;
|
//$item->cost = 10;
|
||||||
@ -148,7 +144,7 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::all()->random();
|
||||||
|
|
||||||
$item->cost = (float)$product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
$item->notes = $product->notes;
|
$item->notes = $product->notes;
|
||||||
$item->custom_value1 = $product->custom_value1;
|
$item->custom_value1 = $product->custom_value1;
|
||||||
@ -156,8 +152,6 @@ class CreateTestInvoiceJob implements ShouldQueue
|
|||||||
$item->custom_value3 = $product->custom_value3;
|
$item->custom_value3 = $product->custom_value3;
|
||||||
$item->custom_value4 = $product->custom_value4;
|
$item->custom_value4 = $product->custom_value4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$line_items[] = $item;
|
$line_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -36,13 +36,11 @@ class CreateTestQuoteJob implements ShouldQueue
|
|||||||
|
|
||||||
protected $client;
|
protected $client;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct(Client $client)
|
public function __construct(Client $client)
|
||||||
{
|
{
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
@ -57,7 +55,7 @@ class CreateTestQuoteJob implements ShouldQueue
|
|||||||
{
|
{
|
||||||
$faker = \Faker\Factory::create();
|
$faker = \Faker\Factory::create();
|
||||||
|
|
||||||
$quote =factory(\App\Models\Quote::class)->create(['user_id' => $this->client->user->id, 'company_id' => $this->client->company->id, 'client_id' => $this->client->id]);
|
$quote = factory(\App\Models\Quote::class)->create(['user_id' => $this->client->user->id, 'company_id' => $this->client->company->id, 'client_id' => $this->client->id]);
|
||||||
$quote->date = $faker->date();
|
$quote->date = $faker->date();
|
||||||
|
|
||||||
$quote->line_items = $this->buildLineItems(rand(1, 10));
|
$quote->line_items = $this->buildLineItems(rand(1, 10));
|
||||||
@ -89,13 +87,11 @@ class CreateTestQuoteJob implements ShouldQueue
|
|||||||
CreateQuoteInvitations::dispatch($quote, $quote->company);
|
CreateQuoteInvitations::dispatch($quote, $quote->company);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private function buildLineItems($count = 1)
|
private function buildLineItems($count = 1)
|
||||||
{
|
{
|
||||||
$line_items = [];
|
$line_items = [];
|
||||||
|
|
||||||
for ($x=0; $x<$count; $x++) {
|
for ($x = 0; $x < $count; $x++) {
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->quantity = 1;
|
$item->quantity = 1;
|
||||||
//$item->cost = 10;
|
//$item->cost = 10;
|
||||||
@ -117,7 +113,7 @@ class CreateTestQuoteJob implements ShouldQueue
|
|||||||
|
|
||||||
$product = Product::all()->random();
|
$product = Product::all()->random();
|
||||||
|
|
||||||
$item->cost = (float)$product->cost;
|
$item->cost = (float) $product->cost;
|
||||||
$item->product_key = $product->product_key;
|
$item->product_key = $product->product_key;
|
||||||
$item->notes = $product->notes;
|
$item->notes = $product->notes;
|
||||||
$item->custom_value1 = $product->custom_value1;
|
$item->custom_value1 = $product->custom_value1;
|
||||||
@ -125,8 +121,6 @@ class CreateTestQuoteJob implements ShouldQueue
|
|||||||
$item->custom_value3 = $product->custom_value3;
|
$item->custom_value3 = $product->custom_value3;
|
||||||
$item->custom_value4 = $product->custom_value4;
|
$item->custom_value4 = $product->custom_value4;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$line_items[] = $item;
|
$line_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -56,7 +56,7 @@ class Kernel extends ConsoleKernel
|
|||||||
$schedule->job(new UpdateExchangeRates)->daily();
|
$schedule->job(new UpdateExchangeRates)->daily();
|
||||||
|
|
||||||
/* Run hosted specific jobs */
|
/* Run hosted specific jobs */
|
||||||
if(Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
$schedule->job(new AdjustEmailQuota())->daily();
|
$schedule->job(new AdjustEmailQuota())->daily();
|
||||||
$schedule->job(new SendFailedEmails())->daily();
|
$schedule->job(new SendFailedEmails())->daily();
|
||||||
}
|
}
|
||||||
|
@ -4,9 +4,8 @@ namespace App\DataMapper\Analytics;
|
|||||||
|
|
||||||
class LoginFailure
|
class LoginFailure
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of Sample
|
* The type of Sample.
|
||||||
*
|
*
|
||||||
* Monotonically incrementing counter
|
* Monotonically incrementing counter
|
||||||
*
|
*
|
||||||
@ -17,13 +16,13 @@ class LoginFailure
|
|||||||
public $type = 'counter';
|
public $type = 'counter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the counter
|
* The name of the counter.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $name = 'login.failure';
|
public $name = 'login.failure';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The datetime of the counter measurement
|
* The datetime of the counter measurement.
|
||||||
*
|
*
|
||||||
* date("Y-m-d H:i:s")
|
* date("Y-m-d H:i:s")
|
||||||
*
|
*
|
||||||
@ -33,10 +32,9 @@ class LoginFailure
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The increment amount... should always be
|
* The increment amount... should always be
|
||||||
* set to 0
|
* set to 0.
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $metric = 0;
|
public $metric = 0;
|
||||||
|
|
||||||
}
|
}
|
@ -4,9 +4,8 @@ namespace App\DataMapper\Analytics;
|
|||||||
|
|
||||||
class LoginSuccess
|
class LoginSuccess
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type of Sample
|
* The type of Sample.
|
||||||
*
|
*
|
||||||
* Monotonically incrementing counter
|
* Monotonically incrementing counter
|
||||||
*
|
*
|
||||||
@ -17,13 +16,13 @@ class LoginSuccess
|
|||||||
public $type = 'counter';
|
public $type = 'counter';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The name of the counter
|
* The name of the counter.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
public $name = 'login.success';
|
public $name = 'login.success';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The datetime of the counter measurement
|
* The datetime of the counter measurement.
|
||||||
*
|
*
|
||||||
* date("Y-m-d H:i:s")
|
* date("Y-m-d H:i:s")
|
||||||
*
|
*
|
||||||
@ -33,10 +32,9 @@ class LoginSuccess
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The increment amount... should always be
|
* The increment amount... should always be
|
||||||
* set to 0
|
* set to 0.
|
||||||
*
|
*
|
||||||
* @var integer
|
* @var int
|
||||||
*/
|
*/
|
||||||
public $metric = 0;
|
public $metric = 0;
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -12,7 +12,7 @@
|
|||||||
namespace App\DataMapper;
|
namespace App\DataMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClientSettings
|
* ClientSettings.
|
||||||
*/
|
*/
|
||||||
class BaseSettings
|
class BaseSettings
|
||||||
{
|
{
|
||||||
@ -46,7 +46,7 @@ class BaseSettings
|
|||||||
return is_null($value) ? '' : (string) $value;
|
return is_null($value) ? '' : (string) $value;
|
||||||
case 'bool':
|
case 'bool':
|
||||||
case 'boolean':
|
case 'boolean':
|
||||||
return (bool)($value);
|
return (bool) ($value);
|
||||||
case 'object':
|
case 'object':
|
||||||
return json_decode($value);
|
return json_decode($value);
|
||||||
case 'array':
|
case 'array':
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,7 @@ use App\Models\Client;
|
|||||||
use App\Utils\TranslationHelper;
|
use App\Utils\TranslationHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ClientSettings
|
* ClientSettings.
|
||||||
*
|
*
|
||||||
* Client settings are built as a superset of Company Settings
|
* 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
|
* 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.
|
* into the settings column of the entity, so there is no need to create additional entity level settings handlers.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class ClientSettings extends BaseSettings
|
class ClientSettings extends BaseSettings
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings which which are unique to client settings
|
* Settings which which are unique to client settings.
|
||||||
*/
|
*/
|
||||||
public $industry_id;
|
public $industry_id;
|
||||||
public $size_id;
|
public $size_id;
|
||||||
@ -44,7 +42,7 @@ class ClientSettings extends BaseSettings
|
|||||||
/**
|
/**
|
||||||
* Cast object values and return entire class
|
* Cast object values and return entire class
|
||||||
* prevents missing properties from not being returned
|
* 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
|
* @return \stdClass
|
||||||
*/
|
*/
|
||||||
@ -54,16 +52,14 @@ class ClientSettings extends BaseSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Default Client Settings scaffold.
|
||||||
* Default Client Settings scaffold
|
|
||||||
*
|
*
|
||||||
* @return \stdClass
|
* @return \stdClass
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public static function defaults() : \stdClass
|
public static function defaults() : \stdClass
|
||||||
{
|
{
|
||||||
$data = (object)[
|
$data = (object) [
|
||||||
'entity' => (string)Client::class,
|
'entity' => (string) Client::class,
|
||||||
'industry_id' => '',
|
'industry_id' => '',
|
||||||
'size_id' => '',
|
'size_id' => '',
|
||||||
];
|
];
|
||||||
@ -71,9 +67,8 @@ class ClientSettings extends BaseSettings
|
|||||||
return self::setCasts($data, self::$casts);
|
return self::setCasts($data, self::$casts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Merges settings from Company to Client
|
* Merges settings from Company to Client.
|
||||||
*
|
*
|
||||||
* @param \stdClass $company_settings
|
* @param \stdClass $company_settings
|
||||||
* @param \stdClass $client_settings
|
* @param \stdClass $client_settings
|
||||||
@ -81,7 +76,7 @@ class ClientSettings extends BaseSettings
|
|||||||
*/
|
*/
|
||||||
public static function buildClientSettings($company_settings, $client_settings)
|
public static function buildClientSettings($company_settings, $client_settings)
|
||||||
{
|
{
|
||||||
if (!$client_settings) {
|
if (! $client_settings) {
|
||||||
return $company_settings;
|
return $company_settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,8 +84,8 @@ class ClientSettings extends BaseSettings
|
|||||||
/* pseudo code
|
/* pseudo code
|
||||||
if the property exists and is a string BUT has no length, treat it as TRUE
|
if the property exists and is a string BUT has no length, treat it as TRUE
|
||||||
*/
|
*/
|
||||||
if (((property_exists($client_settings, $key) && is_string($client_settings->{$key}) && (iconv_strlen($client_settings->{$key}) <1)))
|
if (((property_exists($client_settings, $key) && is_string($client_settings->{$key}) && (iconv_strlen($client_settings->{$key}) < 1)))
|
||||||
|| !isset($client_settings->{$key})
|
|| ! isset($client_settings->{$key})
|
||||||
&& property_exists($company_settings, $key)) {
|
&& property_exists($company_settings, $key)) {
|
||||||
$client_settings->{$key} = $company_settings->{$key};
|
$client_settings->{$key} = $company_settings->{$key};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -15,9 +15,8 @@ use App\DataMapper\CompanySettings;
|
|||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CompanySettings
|
* CompanySettings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class CompanySettings extends BaseSettings
|
class CompanySettings extends BaseSettings
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
@ -56,7 +55,7 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $default_task_rate = 0;
|
public $default_task_rate = 0;
|
||||||
|
|
||||||
public $payment_terms = "";
|
public $payment_terms = '';
|
||||||
public $send_reminders = false;
|
public $send_reminders = false;
|
||||||
|
|
||||||
public $custom_message_dashboard = '';
|
public $custom_message_dashboard = '';
|
||||||
@ -72,8 +71,8 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
public $translations;
|
public $translations;
|
||||||
|
|
||||||
public $counter_number_applied = 'when_saved';// when_saved , when_sent
|
public $counter_number_applied = 'when_saved'; // when_saved , when_sent
|
||||||
public $quote_number_applied = 'when_saved';// when_saved , when_sent
|
public $quote_number_applied = 'when_saved'; // when_saved , when_sent
|
||||||
|
|
||||||
/* Counters */
|
/* Counters */
|
||||||
public $invoice_number_pattern = '';
|
public $invoice_number_pattern = '';
|
||||||
@ -139,7 +138,7 @@ class CompanySettings extends BaseSettings
|
|||||||
public $require_quote_signature = false;
|
public $require_quote_signature = false;
|
||||||
|
|
||||||
//email settings
|
//email settings
|
||||||
public $email_sending_method = 'default';//enum 'default','gmail'
|
public $email_sending_method = 'default'; //enum 'default','gmail'
|
||||||
public $gmail_sending_user_id = '0';
|
public $gmail_sending_user_id = '0';
|
||||||
|
|
||||||
public $reply_to_email = '';
|
public $reply_to_email = '';
|
||||||
@ -186,11 +185,11 @@ class CompanySettings extends BaseSettings
|
|||||||
public $num_days_reminder2 = 0;
|
public $num_days_reminder2 = 0;
|
||||||
public $num_days_reminder3 = 0;
|
public $num_days_reminder3 = 0;
|
||||||
|
|
||||||
public $schedule_reminder1 = '';// (enum: after_invoice_date, before_due_date, after_due_date)
|
public $schedule_reminder1 = ''; // (enum: after_invoice_date, before_due_date, after_due_date)
|
||||||
public $schedule_reminder2 = '';// (enum: after_invoice_date, before_due_date, after_due_date)
|
public $schedule_reminder2 = ''; // (enum: after_invoice_date, before_due_date, after_due_date)
|
||||||
public $schedule_reminder3 = '';// (enum: after_invoice_date, before_due_date, after_due_date)
|
public $schedule_reminder3 = ''; // (enum: after_invoice_date, before_due_date, after_due_date)
|
||||||
|
|
||||||
public $reminder_send_time = 32400;//number of seconds from UTC +0 to send reminders
|
public $reminder_send_time = 32400; //number of seconds from UTC +0 to send reminders
|
||||||
|
|
||||||
public $late_fee_amount1 = 0;
|
public $late_fee_amount1 = 0;
|
||||||
public $late_fee_amount2 = 0;
|
public $late_fee_amount2 = 0;
|
||||||
@ -241,7 +240,6 @@ class CompanySettings extends BaseSettings
|
|||||||
public $client_portal_allow_under_payment = false;
|
public $client_portal_allow_under_payment = false;
|
||||||
public $client_portal_allow_over_payment = false;
|
public $client_portal_allow_over_payment = false;
|
||||||
|
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
'client_portal_allow_under_payment' => 'bool',
|
'client_portal_allow_under_payment' => 'bool',
|
||||||
'client_portal_allow_over_payment' => 'bool',
|
'client_portal_allow_over_payment' => 'bool',
|
||||||
@ -414,7 +412,6 @@ class CompanySettings extends BaseSettings
|
|||||||
'client_portal_enable_uploads' => 'bool',
|
'client_portal_enable_uploads' => 'bool',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
public static $free_plan_casts = [
|
public static $free_plan_casts = [
|
||||||
'currency_id' => 'string',
|
'currency_id' => 'string',
|
||||||
'company_gateway_ids' => 'string',
|
'company_gateway_ids' => 'string',
|
||||||
@ -453,7 +450,7 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Array of variables which
|
* Array of variables which
|
||||||
* cannot be modified client side
|
* cannot be modified client side.
|
||||||
*/
|
*/
|
||||||
public static $protected_fields = [
|
public static $protected_fields = [
|
||||||
// 'credit_number_counter',
|
// 'credit_number_counter',
|
||||||
@ -470,7 +467,7 @@ class CompanySettings extends BaseSettings
|
|||||||
/**
|
/**
|
||||||
* Cast object values and return entire class
|
* Cast object values and return entire class
|
||||||
* prevents missing properties from not being returned
|
* 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
|
* @return \stdClass
|
||||||
*/
|
*/
|
||||||
@ -480,14 +477,14 @@ class CompanySettings extends BaseSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides class defaults on init
|
* Provides class defaults on init.
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
public static function defaults():\stdClass
|
public static function defaults():\stdClass
|
||||||
{
|
{
|
||||||
$config = json_decode(config('ninja.settings'));
|
$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->casts);
|
||||||
unset($data->protected_fields);
|
unset($data->protected_fields);
|
||||||
@ -516,10 +513,10 @@ class CompanySettings extends BaseSettings
|
|||||||
*/
|
*/
|
||||||
public static function setProperties($settings):\stdClass
|
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) {
|
foreach ($company_settings as $key => $value) {
|
||||||
if (!property_exists($settings, $key)) {
|
if (! property_exists($settings, $key)) {
|
||||||
$settings->{ $key} = self::castAttribute($key, $company_settings->{ $key});
|
$settings->{ $key} = self::castAttribute($key, $company_settings->{ $key});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -614,7 +611,7 @@ class CompanySettings extends BaseSettings
|
|||||||
'$custom_surcharge3',
|
'$custom_surcharge3',
|
||||||
'$custom_surcharge4',
|
'$custom_surcharge4',
|
||||||
'$paid_to_date',
|
'$paid_to_date',
|
||||||
'$client.balance'
|
'$client.balance',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -15,12 +15,10 @@ use App\Models\Client;
|
|||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class DefaultSettings
|
* Class DefaultSettings.
|
||||||
* @package App\DataMapper
|
|
||||||
*/
|
*/
|
||||||
class DefaultSettings extends BaseSettings
|
class DefaultSettings extends BaseSettings
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
*/
|
*/
|
||||||
@ -33,7 +31,7 @@ class DefaultSettings extends BaseSettings
|
|||||||
*/
|
*/
|
||||||
public static function userSettings() : \stdClass
|
public static function userSettings() : \stdClass
|
||||||
{
|
{
|
||||||
return (object)[
|
return (object) [
|
||||||
// class_basename(User::class) => self::userSettingsObject(),
|
// class_basename(User::class) => self::userSettingsObject(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -43,7 +41,7 @@ class DefaultSettings extends BaseSettings
|
|||||||
*/
|
*/
|
||||||
private static function userSettingsObject() : \stdClass
|
private static function userSettingsObject() : \stdClass
|
||||||
{
|
{
|
||||||
return (object)[
|
return (object) [
|
||||||
// 'per_page' => self::$per_page,
|
// 'per_page' => self::$per_page,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -12,7 +12,7 @@
|
|||||||
namespace App\DataMapper;
|
namespace App\DataMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EmailSpooledForSend
|
* EmailSpooledForSend.
|
||||||
*
|
*
|
||||||
* Stubbed class used to store the meta data
|
* Stubbed class used to store the meta data
|
||||||
* for an email that was unable to be sent
|
* for an email that was unable to be sent
|
||||||
@ -21,7 +21,6 @@ namespace App\DataMapper;
|
|||||||
* - Quota exceeded
|
* - Quota exceeded
|
||||||
* - SMTP issues
|
* - SMTP issues
|
||||||
* - Upstream connectivity
|
* - Upstream connectivity
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
class EmailSpooledForSend
|
class EmailSpooledForSend
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -119,10 +119,10 @@ class EmailTemplateDefaults
|
|||||||
'allow_unsafe_links' => false,
|
'allow_unsafe_links' => false,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$invoice_message = '<p>' . self::transformText('invoice_message') . '</p><br><br><p>$view_link</p>';
|
$invoice_message = '<p>'.self::transformText('invoice_message').'</p><br><br><p>$view_link</p>';
|
||||||
|
|
||||||
return $invoice_message;
|
return $invoice_message;
|
||||||
//return $converter->convertToHtml($invoice_message);
|
//return $converter->convertToHtml($invoice_message);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function emailQuoteSubject()
|
public static function emailQuoteSubject()
|
||||||
@ -214,9 +214,8 @@ class EmailTemplateDefaults
|
|||||||
return Parsedown::instance()->line('Statement Templates needs texts record!');
|
return Parsedown::instance()->line('Statement Templates needs texts record!');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static function transformText($string)
|
private static function transformText($string)
|
||||||
{
|
{
|
||||||
return str_replace(":", "$", ctrans('texts.'.$string));
|
return str_replace(':', '$', ctrans('texts.'.$string));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -15,9 +15,8 @@ use App\DataMapper\CompanySettings;
|
|||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* FreeCompanySettings
|
* FreeCompanySettings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FreeCompanySettings extends BaseSettings
|
class FreeCompanySettings extends BaseSettings
|
||||||
{
|
{
|
||||||
use MakesHash;
|
use MakesHash;
|
||||||
@ -45,7 +44,7 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
public $military_time = false;
|
public $military_time = false;
|
||||||
public $payment_number_pattern = '';
|
public $payment_number_pattern = '';
|
||||||
public $payment_number_counter = 1;
|
public $payment_number_counter = 1;
|
||||||
public $payment_terms = "";
|
public $payment_terms = '';
|
||||||
public $payment_type_id = '0';
|
public $payment_type_id = '0';
|
||||||
public $portal_design_id = '1';
|
public $portal_design_id = '1';
|
||||||
public $quote_design_id = 'VolejRejNm';
|
public $quote_design_id = 'VolejRejNm';
|
||||||
@ -68,7 +67,6 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
public $vendor_number_pattern = '';
|
public $vendor_number_pattern = '';
|
||||||
public $vendor_number_counter = 1;
|
public $vendor_number_counter = 1;
|
||||||
|
|
||||||
|
|
||||||
/* Company Meta data that we can use to build sub companies*/
|
/* Company Meta data that we can use to build sub companies*/
|
||||||
|
|
||||||
public $address1 = '';
|
public $address1 = '';
|
||||||
@ -85,7 +83,6 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
public $vat_number = '';
|
public $vat_number = '';
|
||||||
public $website = '';
|
public $website = '';
|
||||||
|
|
||||||
|
|
||||||
public static $casts = [
|
public static $casts = [
|
||||||
'portal_design_id' => 'string',
|
'portal_design_id' => 'string',
|
||||||
'currency_id' => 'string',
|
'currency_id' => 'string',
|
||||||
@ -141,7 +138,7 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
/**
|
/**
|
||||||
* Cast object values and return entire class
|
* Cast object values and return entire class
|
||||||
* prevents missing properties from not being returned
|
* 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
|
* @return \stdClass
|
||||||
*/
|
*/
|
||||||
@ -150,7 +147,7 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides class defaults on init
|
* Provides class defaults on init.
|
||||||
* @return object
|
* @return object
|
||||||
*/
|
*/
|
||||||
public static function defaults():\stdClass
|
public static function defaults():\stdClass
|
||||||
@ -174,6 +171,4 @@ class FreeCompanySettings extends BaseSettings
|
|||||||
|
|
||||||
return self::setCasts($data, self::$casts);
|
return self::setCasts($data, self::$casts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Clean extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -39,7 +38,6 @@ class Clean extends AbstractDesign
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="px-12 my-10">
|
return '<div class="px-12 my-10">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -20,7 +20,6 @@ class Creative extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -42,7 +41,6 @@ $custom_css
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="m-12">
|
return '<div class="m-12">
|
||||||
@ -114,7 +112,6 @@ $custom_css
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function product()
|
public function product()
|
||||||
{
|
{
|
||||||
return '';
|
return '';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -64,10 +64,10 @@ class Designer
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the design
|
* Returns the design
|
||||||
* formatted HTML
|
* formatted HTML.
|
||||||
* @return string The HTML design built
|
* @return string The HTML design built
|
||||||
*/
|
*/
|
||||||
public function build():Designer
|
public function build():self
|
||||||
{
|
{
|
||||||
$this->setHtml()
|
$this->setHtml()
|
||||||
->exportVariables()
|
->exportVariables()
|
||||||
@ -104,13 +104,12 @@ class Designer
|
|||||||
<div class="flex items-center justify-between m-12">
|
<div class="flex items-center justify-between m-12">
|
||||||
%s <!-- Placeholder for signature -->
|
%s <!-- Placeholder for signature -->
|
||||||
%s <!-- Placehoder for Invoice Ninja logo -->
|
%s <!-- Placehoder for Invoice Ninja logo -->
|
||||||
</div>'
|
</div>';
|
||||||
;
|
|
||||||
|
|
||||||
$signature = '<img class="h-40" src="$contact.signature" />';
|
$signature = '<img class="h-40" src="$contact.signature" />';
|
||||||
$logo = '<div></div>';
|
$logo = '<div></div>';
|
||||||
|
|
||||||
if (!$this->entity->user->account->isPaid()) {
|
if (! $this->entity->user->account->isPaid()) {
|
||||||
$logo = '<img class="h-32" src="$app_url/images/created-by-invoiceninja-new.png" />';
|
$logo = '<img class="h-32" src="$app_url/images/created-by-invoiceninja-new.png" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,8 +177,7 @@ class Designer
|
|||||||
$this->exported_variables['$entity_details'] = $this->processVariables($this->input_variables['invoice_details'], $this->quoteDetails($company));
|
$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_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['$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']);
|
$this->exported_variables['$task_table_header'] = $this->entity->buildTableHeader($this->input_variables['task_columns']);
|
||||||
$this->exported_variables['$task_table_body'] = $this->entity->buildTableBody($this->input_variables['task_columns'], $this->design->task, '$task');
|
$this->exported_variables['$task_table_body'] = $this->entity->buildTableBody($this->input_variables['task_columns'], $this->design->task, '$task');
|
||||||
@ -191,6 +189,7 @@ class Designer
|
|||||||
if (strlen($this->exported_variables['$product_table_body']) == 0) {
|
if (strlen($this->exported_variables['$product_table_body']) == 0) {
|
||||||
$this->exported_variables['$product_table_header'] = '';
|
$this->exported_variables['$product_table_header'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -214,7 +213,7 @@ class Designer
|
|||||||
foreach (array_keys($input_variables) as $value) {
|
foreach (array_keys($input_variables) as $value) {
|
||||||
if (array_key_exists($value, $variables)) {
|
if (array_key_exists($value, $variables)) {
|
||||||
//$tmp = str_replace("</span>", "_label</span>", $variables[$value]);
|
//$tmp = str_replace("</span>", "_label</span>", $variables[$value]);
|
||||||
$tmp = strtr($variables[$value], "</span>", "_label</span>");
|
$tmp = strtr($variables[$value], '</span>', '_label</span>');
|
||||||
$output .= $tmp;
|
$output .= $tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -357,12 +356,12 @@ class Designer
|
|||||||
{
|
{
|
||||||
$custom_fields = $company->custom_fields;
|
$custom_fields = $company->custom_fields;
|
||||||
|
|
||||||
if (!$custom_fields) {
|
if (! $custom_fields) {
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (self::$custom_fields as $cf) {
|
foreach (self::$custom_fields as $cf) {
|
||||||
if (!property_exists($custom_fields, $cf) || (strlen($custom_fields->{$cf}) == 0)) {
|
if (! property_exists($custom_fields, $cf) || (strlen($custom_fields->{$cf}) == 0)) {
|
||||||
unset($data[$cf]);
|
unset($data[$cf]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Elegant extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -39,7 +38,6 @@ class Elegant extends AbstractDesign
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="m-10">
|
return '<div class="m-10">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Hipster extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -40,7 +39,6 @@ $custom_css
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="px-12 py-16">
|
return '<div class="px-12 py-16">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Modern extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -36,7 +35,6 @@ $custom_css
|
|||||||
<body>';
|
<body>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '
|
return '
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Photo extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -43,8 +42,6 @@ $custom_css
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="px-16 py-10">
|
return '<div class="px-16 py-10">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Plain extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -17,7 +17,6 @@ class Playful extends AbstractDesign
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function includes()
|
public function includes()
|
||||||
{
|
{
|
||||||
return '<title>$number</title>
|
return '<title>$number</title>
|
||||||
@ -39,7 +38,6 @@ $custom_css
|
|||||||
</style>';
|
</style>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public function header()
|
public function header()
|
||||||
{
|
{
|
||||||
return '<div class="my-12 mx-16">
|
return '<div class="my-12 mx-16">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -12,16 +12,15 @@
|
|||||||
namespace App\Events\Account;
|
namespace App\Events\Account;
|
||||||
|
|
||||||
use Illuminate\Broadcasting\Channel;
|
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\InteractsWithSockets;
|
||||||
|
use Illuminate\Broadcasting\PresenceChannel;
|
||||||
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AccountCreated
|
* Class AccountCreated.
|
||||||
* @package App\Events\Account
|
|
||||||
*/
|
*/
|
||||||
class AccountCreated
|
class AccountCreated
|
||||||
{
|
{
|
||||||
@ -35,6 +34,7 @@ class AccountCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -47,7 +47,6 @@ class ClientWasArchived
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -41,6 +41,5 @@ class ClientWasCreated
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -40,6 +40,5 @@ class ClientWasDeleted
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -40,6 +40,5 @@ class ClientWasRestored
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -40,6 +40,5 @@ class ClientWasUpdated
|
|||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -21,21 +21,21 @@ use Illuminate\Foundation\Events\Dispatchable;
|
|||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UserLoggedIn
|
* Class UserLoggedIn.
|
||||||
* @package App\Events\User
|
|
||||||
*/
|
*/
|
||||||
class ContactLoggedIn
|
class ContactLoggedIn
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var $client_contact
|
* @var
|
||||||
*/
|
*/
|
||||||
public $client_contact;
|
public $client_contact;
|
||||||
|
|
||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -9,7 +9,6 @@
|
|||||||
* @license https://opensource.org/licenses/AAL
|
* @license https://opensource.org/licenses/AAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
namespace App\Events\Credit;
|
namespace App\Events\Credit;
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
@ -27,6 +26,7 @@ class CreditWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -9,7 +9,6 @@
|
|||||||
* @license https://opensource.org/licenses/AAL
|
* @license https://opensource.org/licenses/AAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
namespace App\Events\Credit;
|
namespace App\Events\Credit;
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
@ -27,6 +26,7 @@ class CreditWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -9,7 +9,6 @@
|
|||||||
* @license https://opensource.org/licenses/AAL
|
* @license https://opensource.org/licenses/AAL
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
namespace App\Events\Credit;
|
namespace App\Events\Credit;
|
||||||
|
|
||||||
use App\Models\Company;
|
use App\Models\Company;
|
||||||
@ -27,6 +26,7 @@ class CreditWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -25,6 +25,7 @@ class CreditWasEmailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -29,6 +29,7 @@ class CreditWasMarkedSent
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -40,6 +40,5 @@ class CreditWasRestored
|
|||||||
$this->credit = $credit;
|
$this->credit = $credit;
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -26,6 +26,7 @@ class CreditWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -36,6 +36,7 @@ class DesignWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class DesignWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class DesignWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
@ -53,5 +54,4 @@ class DesignWasDeleted
|
|||||||
{
|
{
|
||||||
return new PrivateChannel('channel-name');
|
return new PrivateChannel('channel-name');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class DesignWasRestored
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class DesignWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
@ -43,6 +44,7 @@ class DesignWasUpdated
|
|||||||
|
|
||||||
$this->event_vars = $event_vars;
|
$this->event_vars = $event_vars;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the channels the event should broadcast on.
|
* Get the channels the event should broadcast on.
|
||||||
*
|
*
|
||||||
@ -52,5 +54,4 @@ class DesignWasUpdated
|
|||||||
{
|
{
|
||||||
return new PrivateChannel('channel-name');
|
return new PrivateChannel('channel-name');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class ExpenseWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class ExpenseWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class ExpenseWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class ExpenseWasRestored
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class ExpenseWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasCancelled
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasEmailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -35,6 +35,7 @@ class InvoiceWasEmailedAndFailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasMarkedSent
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasPaid
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -32,6 +32,7 @@ class InvoiceWasRestored
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasReversed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -32,6 +32,7 @@ class InvoiceWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class InvoiceWasViewed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -31,6 +31,7 @@ class InvitationWasViewed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -33,6 +33,7 @@ class MethodDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class PaymentCompleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentFailed
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentFailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentWasArchived
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -30,6 +30,7 @@ class PaymentWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentWasDeleted
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentWasEmailed
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentWasEmailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -31,6 +31,7 @@ class PaymentWasEmailedAndFailed
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PaymentWasEmailedAndFailed constructor.
|
* PaymentWasEmailedAndFailed constructor.
|
||||||
* @param Payment $payment
|
* @param Payment $payment
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -32,6 +32,7 @@ class PaymentWasRefunded
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -29,6 +29,7 @@ class PaymentWasRestored
|
|||||||
public $fromDeleted;
|
public $fromDeleted;
|
||||||
public $company;
|
public $company;
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentWasUpdated
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -22,7 +22,6 @@ class PaymentWasVoided
|
|||||||
{
|
{
|
||||||
use SerializesModels;
|
use SerializesModels;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Payment
|
* @var Payment
|
||||||
*/
|
*/
|
||||||
@ -31,6 +30,7 @@ class PaymentWasVoided
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -26,6 +26,7 @@ class ProductWasArchived
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -29,12 +29,13 @@ class ProductWasCreated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
* @return void
|
* @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->product = $product;
|
||||||
$this->input = $input;
|
$this->input = $input;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -27,6 +27,7 @@ class ProductWasDeleted
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com)
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
||||||
*
|
*
|
||||||
@ -26,6 +26,7 @@ class ProductWasUpdated
|
|||||||
public $company;
|
public $company;
|
||||||
|
|
||||||
public $event_vars;
|
public $event_vars;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new event instance.
|
* Create a new event instance.
|
||||||
*
|
*
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user