Skip to content

Commit 1ea3aa1

Browse files
committed
Merge branch 'main' of https://github.com/inikoo/aiku into main
2 parents bf59cda + dbc601b commit 1ea3aa1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

app/Http/Resources/Accounting/InvoiceTransactionsResource.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public function toArray($request): array
101101
};
102102
};
103103

104+
$palletRef = null;
105+
$handlingDate = null;
106+
$palletRoute = null;
107+
104108
if ($this->model_type == 'Service') {
105109
if (!empty($this->data['pallet_id'])) {
106110
$pallet = Pallet::find($this->data['pallet_id']);
@@ -114,15 +118,10 @@ public function toArray($request): array
114118
'pallet' => $pallet->slug
115119
]
116120
];
117-
} else {
118-
$palletRef = null;
119-
$palletRoute = null;
120121
}
121122

122123
if (!empty($this->data['date'])) {
123124
$handlingDate = Carbon::parse($this->data['date'])->format('d M Y');
124-
} else {
125-
$handlingDate = null;
126125
}
127126
}
128127

0 commit comments

Comments
 (0)