1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Improvements to task exports

This commit is contained in:
David Bomba 2024-03-23 07:53:56 +11:00
parent 0e5aa5e26e
commit 72d67df9d3
2 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,9 @@
namespace App\DataProviders; namespace App\DataProviders;
/**
* Class Domain.
*/
class Domains class Domains
{ {
private static array $verify_domains = [ private static array $verify_domains = [

View File

@ -197,7 +197,7 @@ class TaskExport extends BaseExport
if (in_array('task.duration', $this->input['report_keys']) || in_array('duration', $this->input['report_keys'])) { if (in_array('task.duration', $this->input['report_keys']) || in_array('duration', $this->input['report_keys'])) {
$seconds = $task->calcDuration(); $seconds = $task->calcDuration();
$entity['task.duration'] = $seconds; $entity['task.duration'] = $seconds;
$entity['task.duration_words'] = CarbonInterval::seconds($seconds)->locale($this->company->locale())->cascade()->forHumans(); $entity['task.duration_words'] = $seconds > 86400 ? CarbonInterval::seconds($seconds)->locale($this->company->locale())->cascade()->forHumans() : now()->startOfDay()->addSeconds($seconds)->format('H:i:s');
} }
$entity = $this->decorateAdvancedFields($task, $entity); $entity = $this->decorateAdvancedFields($task, $entity);