From: Nik Okuntseff Date: Mon, 19 Mar 2018 03:01:21 +0000 (+0000) Subject: Fixed report exports to include the IP field. X-Git-Tag: timetracker_1.19-1~1003 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ba7b5828793ff8881b6466055fe9aaae2193a31d;p=timetracker.git Fixed report exports to include the IP field. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 0c78fa33..4ccd531a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- '; } if ($bean->getAttribute('chcost')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chpaid')) { $colspan++; $html .= "'; } + if ($bean->getAttribute('chip')) { $colspan++; $html .= "'; } if ($bean->getAttribute('chinvoice')) { $colspan++; $html .= ''; } $html .= ''; $html .= ''; @@ -210,6 +211,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= ''; @@ -242,6 +244,11 @@ if ($totals_only) { $html .= $item['paid'] == 1 ? $i18n->getKey('label.yes') : $i18n->getKey('label.no'); $html .= ''; } + if ($bean->getAttribute('chip')) { + $html .= ''; + } if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; @@ -291,6 +298,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; } @@ -317,6 +325,7 @@ if ($totals_only) { $html .= ''; } if ($bean->getAttribute('chpaid')) $html .= ''; + if ($bean->getAttribute('chip')) $html .= ''; if ($bean->getAttribute('chinvoice')) $html .= ''; $html .= ''; $html .= '
 Anuko Time Tracker 1.17.58.4108 | Copyright © Anuko | +  Anuko Time Tracker 1.17.58.4109 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/tofile.php b/tofile.php index 1b367e25..534cb943 100644 --- a/tofile.php +++ b/tofile.php @@ -133,6 +133,10 @@ if ('xml' == $type) { print "]]>\n"; } if ($bean->getAttribute('chpaid')) print "\t\n"; + if ($bean->getAttribute('chip')) { + $ip = $item['modified'] ? $item['modified_ip'].' '.$item['modified'] : $item['created_ip'].' '.$item['created']; + print "\t\n"; + } if ($bean->getAttribute('chinvoice')) print "\t\n"; print "\n"; @@ -200,6 +204,7 @@ if ('csv' == $type) { if ($bean->getAttribute('chnote')) print ',"'.$i18n->getKey('label.note').'"'; if ($bean->getAttribute('chcost')) print ',"'.$i18n->getKey('label.cost').'"'; if ($bean->getAttribute('chpaid')) print ',"'.$i18n->getKey('label.paid').'"'; + if ($bean->getAttribute('chip')) print ',"'.$i18n->getKey('label.ip').'"'; if ($bean->getAttribute('chinvoice')) print ',"'.$i18n->getKey('label.invoice').'"'; print "\n"; @@ -227,6 +232,10 @@ if ('csv' == $type) { print ',"'.$item['expense'].'"'; } if ($bean->getAttribute('chpaid')) print ',"'.$item['paid'].'"'; + if ($bean->getAttribute('chip')) { + $ip = $item['modified'] ? $item['modified_ip'].' '.$item['modified'] : $item['created_ip'].' '.$item['created']; + print ',"'.$ip.'"'; + } if ($bean->getAttribute('chinvoice')) print ',"'.str_replace('"','""',$item['invoice']).'"'; print "\n"; } diff --git a/topdf.php b/topdf.php index 2be45cc4..68a1eb5c 100644 --- a/topdf.php +++ b/topdf.php @@ -160,6 +160,7 @@ if ($totals_only) { if ($bean->getAttribute('chnote')) { $colspan++; $html .= ''.$i18n->getKey('label.note').'".$i18n->getKey('label.cost').'".$i18n->getKey('label.paid').'".$i18n->getKey('label.ip').''.$i18n->getKey('label.invoice').'
 
'; + $html .= $item['modified'] ? $item['modified_ip'].' '.$item['modified'] : $item['created_ip'].' '.$item['created']; + $html .= ''.htmlspecialchars($item['invoice']).'
';