mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 02:34:31 -04:00
bug fixes
This commit is contained in:
parent
bb3a7b9d1c
commit
d3d4f8a64d
@ -36,7 +36,7 @@ class SendRecurringInvoices extends Command {
|
||||
continue;
|
||||
}
|
||||
|
||||
$invoice = Invoice::createNew($recurInvoice);
|
||||
$invoice = Invoice::createNew($recurInvoice);
|
||||
$invoice->client_id = $recurInvoice->client_id;
|
||||
$invoice->recurring_invoice_id = $recurInvoice->id;
|
||||
$invoice->invoice_number = 'R' . $recurInvoice->account->getNextInvoiceNumber();
|
||||
|
@ -33,17 +33,16 @@ class Activity extends Eloquent
|
||||
return $this->belongsTo('Account');
|
||||
}
|
||||
|
||||
|
||||
private static function getBlank($entity = false)
|
||||
{
|
||||
$activity = new Activity;
|
||||
|
||||
if (Auth::check()) {
|
||||
$activity->user_id = Auth::user()->id;
|
||||
$activity->account_id = Auth::user()->account_id;
|
||||
} else if ($entity) {
|
||||
if ($entity) {
|
||||
$activity->user_id = $entity->user_id;
|
||||
$activity->account_id = $entity->account_id;
|
||||
} else if (Auth::check()) {
|
||||
$activity->user_id = Auth::user()->id;
|
||||
$activity->account_id = Auth::user()->account_id;
|
||||
} else {
|
||||
Utils::fatalError();
|
||||
}
|
||||
|
@ -12,12 +12,12 @@ class EntityModel extends Eloquent
|
||||
$className = get_called_class();
|
||||
$entity = new $className();
|
||||
|
||||
if (Auth::check()) {
|
||||
$entity->user_id = Auth::user()->id;
|
||||
$entity->account_id = Auth::user()->account_id;
|
||||
} else if ($parent) {
|
||||
if ($parent) {
|
||||
$entity->user_id = $parent->user_id;
|
||||
$entity->account_id = $parent->account_id;
|
||||
} else if (Auth::check()) {
|
||||
$entity->user_id = Auth::user()->id;
|
||||
$entity->account_id = Auth::user()->account_id;
|
||||
} else {
|
||||
Utils::fatalError();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user