浏览代码

wip timezone handling

3.x
Andrew Wallo 4 个月前
父节点
当前提交
9be2dbf166
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      app/Filament/Company/Resources/Purchases/BillResource.php

+ 2
- 2
app/Filament/Company/Resources/Purchases/BillResource.php 查看文件

614
                         ->beforeReplicaSaved(function (Bill $replica) {
614
                         ->beforeReplicaSaved(function (Bill $replica) {
615
                             $replica->status = BillStatus::Open;
615
                             $replica->status = BillStatus::Open;
616
                             $replica->bill_number = Bill::getNextDocumentNumber();
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
                         ->withReplicatedRelationships(['lineItems'])
620
                         ->withReplicatedRelationships(['lineItems'])
621
                         ->withExcludedRelationshipAttributes('lineItems', [
621
                         ->withExcludedRelationshipAttributes('lineItems', [

正在加载...
取消
保存