Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

export in dec_time or std_time in export_pdf2 #810

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

claudegel
Copy link
Contributor

FIXES #

Changes proposed in this pull request:

  • Add the possibility to export in standard time or decimal time in the pdf2 export extension

Reason for this pull request:

@@ -102,7 +102,16 @@ public function printRows($data, $widths) {
else {
$this->printTimeRow($widths, $row);
$this->moneySum += $row['wage'];
$this->timeSum += $row['decimalDuration'] == -1 ? 0 : $row['decimalDuration'];
if ($_REQUEST['time_type'] == "dec_time") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks as if there are race-conditions where timeSum will not be generated.
I would prefer creating a default timeSum (leaving the previous line) and then overwriting its value in case $_REQUEST['time_type'] != 'dec_time' && isset($this->columns['time'])

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on line 105 if $_REQUEST['time_type'] != 'dec_time then it goes to line 109 } else {
and there, if isset($this->columns['time'] TimeSum is updated
I don't understand your race-condition

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants