diff --git a/app/Models/Task.php b/app/Models/Task.php index c58740f661..c36f4983cf 100644 --- a/app/Models/Task.php +++ b/app/Models/Task.php @@ -207,7 +207,7 @@ class Task extends BaseModel $normalized[] = [ 'start_time' => (int) $log[0], - 'end_time' => isset($log[1]) && $log[1] !== 0 ? (int) $log[1] : null, + 'end_time' => isset($log[1]) && $log[1] !== 0 ? (int) $log[1] : 0, 'description' => isset($log[2]) ? trim((string) $log[2]) : '', 'billable' => isset($log[3]) ? (bool) $log[3] : false, 'is_running' => isset($log[1]) && $log[1] === 0, diff --git a/app/Utils/Traits/Pdf/PDF.php b/app/Utils/Traits/Pdf/PDF.php index 2624c40440..a3e4962060 100644 --- a/app/Utils/Traits/Pdf/PDF.php +++ b/app/Utils/Traits/Pdf/PDF.php @@ -41,16 +41,16 @@ class PDF extends FPDI if ($this->text_alignment == 'L') { $this->SetX($this->GetX() + $base_x); // Adjust cell width to account for X offset - $cell_width = $this->GetPageWidth(); + $cell_width = $this->GetPageWidth() + $base_x; $this->Cell($cell_width, 5, $trans, 0, 0, 'L'); } elseif ($this->text_alignment == 'R') { $this->SetX($this->GetX() + $base_x); // For right alignment, calculate width from X position to right edge - $cell_width = $this->GetPageWidth(); + $cell_width = $this->GetPageWidth() + $base_x; $this->Cell($cell_width, 5, $trans, 0, 0, 'R'); } else { // For center alignment, calculate appropriate width - $cell_width = $this->GetPageWidth(); + $cell_width = $this->GetPageWidth() + $base_x; $this->Cell($cell_width, 5, $trans, 0, 0, 'C'); } }