|
@@ -614,8 +614,8 @@ class BillResource extends Resource
|
614
|
614
|
->beforeReplicaSaved(function (Bill $replica) {
|
615
|
615
|
$replica->status = BillStatus::Open;
|
616
|
616
|
$replica->bill_number = Bill::getNextDocumentNumber();
|
617
|
|
- $replica->date = now();
|
618
|
|
- $replica->due_date = now()->addDays($replica->company->defaultBill->payment_terms->getDays());
|
|
617
|
+ $replica->date = company_today();
|
|
618
|
+ $replica->due_date = company_today()->addDays($replica->company->defaultBill->payment_terms->getDays());
|
619
|
619
|
})
|
620
|
620
|
->withReplicatedRelationships(['lineItems'])
|
621
|
621
|
->withExcludedRelationshipAttributes('lineItems', [
|