Fix invoice
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
eea85c9da4
commit
7fc17244fd
|
|
@ -42,9 +42,7 @@ class MassStoreAction
|
|||
->year($year);
|
||||
|
||||
$invoice = Invoice::createFromFactory($factory);
|
||||
$invoice->save();
|
||||
$invoice->positions()->createMany($invoice->positions->toArray());
|
||||
$invoices->push($invoice->fresh('positions'));
|
||||
$invoices->push($invoice);
|
||||
}
|
||||
|
||||
event(new InvoicesMassStored($year, $invoices));
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ class Invoice extends Model
|
|||
'usage' => $factory->getUsage(),
|
||||
]);
|
||||
|
||||
$invoice->setRelation('positions', $factory->getPositions()->toArray());
|
||||
$invoice->save();
|
||||
$invoice->positions()->createMany($factory->getPositions()->toArray());
|
||||
|
||||
return $invoice;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue