Kaynağa Gözat

wip timezone handling

3.x
Andrew Wallo 1 yıl önce
ebeveyn
işleme
9be2dbf166

+ 2
- 2
app/Filament/Company/Resources/Purchases/BillResource.php Dosyayı Görüntüle

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', [

Loading…
İptal
Kaydet