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