Merge fixes

This commit is contained in:
Hillel Coren 2017-05-28 13:22:00 +03:00
parent d68b13018b
commit 10a02fbc61
3 changed files with 7 additions and 9 deletions

View File

@ -75,9 +75,7 @@ class CheckData extends Command
$this->checkBalances(); $this->checkBalances();
$this->checkContacts(); $this->checkContacts();
$this->checkUserAccounts();
// TODO Enable once user_account companies have been merged
//$this->checkUserAccounts();
if (! $this->option('client_id')) { if (! $this->option('client_id')) {
$this->checkOAuth(); $this->checkOAuth();
@ -220,8 +218,9 @@ class CheckData extends Command
} }
} }
$this->logMessage($countInvalid . ' user accounts with multiple companies');
if ($countInvalid > 0) { if ($countInvalid > 0) {
$this->logMessage($countInvalid . ' user accounts with multiple companies');
$this->isValid = false; $this->isValid = false;
} }
} }

View File

@ -321,10 +321,7 @@ class AccountRepository
$item->product_key = 'Plan - '.ucfirst($plan).' ('.ucfirst($term).')'; $item->product_key = 'Plan - '.ucfirst($plan).' ('.ucfirst($term).')';
$invoice->invoice_items()->save($item); $invoice->invoice_items()->save($item);
$invitation = new Invitation(); $invitation = Invitation::createNew($invoice);
$invitation->account_id = $account->id;
$invitation->user_id = $account->users()->first()->id;
$invitation->public_id = $publicId;
$invitation->invoice_id = $invoice->id; $invitation->invoice_id = $invoice->id;
$invitation->contact_id = $client->contacts()->first()->id; $invitation->contact_id = $client->contacts()->first()->id;
$invitation->invitation_key = strtolower(str_random(RANDOM_KEY_LENGTH)); $invitation->invitation_key = strtolower(str_random(RANDOM_KEY_LENGTH));

View File

@ -304,7 +304,9 @@
theme: 'bootstrap', theme: 'bootstrap',
widgets: ['zebra', 'uitheme', 'filter'{!! request()->group_when_sorted ? ", 'group'" : "" !!}, 'columnSelector'], widgets: ['zebra', 'uitheme', 'filter'{!! request()->group_when_sorted ? ", 'group'" : "" !!}, 'columnSelector'],
headerTemplate : '{content} {icon}', headerTemplate : '{content} {icon}',
dateFormat: '{{ $report->convertDateFormat() }}', @if ($report)
dateFormat: '{{ $report->convertDateFormat() }}',
@endif
numberSorter: function(a, b, direction) { numberSorter: function(a, b, direction) {
var a = convertStringToNumber(a); var a = convertStringToNumber(a);
var b = convertStringToNumber(b); var b = convertStringToNumber(b);