fix timer

This commit is contained in:
omair saleh
2022-03-11 15:28:17 +08:00
parent 4ba32b6e9f
commit 8a5a05f950
+2 -1
View File
@@ -16,8 +16,9 @@ class TransactionResource extends JsonResource
*/
public function toArray($request)
{
$booking = (int)$this->type === TransactionType::BILL ? $this->owner->owner : $this->booking;
$days = $this->updated_at->startOfDay()->addWeekdays($booking->service_id === 1 ? 1 : 3);
$days = $this->updated_at->endOfDay()->addWeekdays($booking->service_id === 1 ? 1 : 3);
return [
'id' => $this->id,