Skip to content

Commit

Permalink
Merge pull request #181 from delcroip/develop
Browse files Browse the repository at this point in the history
4.1.5
  • Loading branch information
delcroip authored Mar 2, 2022
2 parents eadcee9 + 5f8aae4 commit 06e502c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
19 changes: 19 additions & 0 deletions htdocs/timesheet/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# dolibarr_project_timesheet changelog
4.5.1
- Fix Project data on reports

4.5.0
- new; first verison of the TS missing reminder
- new: add submit/save next button on ts pages
- new: add propal lines in the invoice service assignation screen (behave as lumpsum)
- new: add lump sum option the invoice service assignation screen
- new: show "all users" report
- new: enable masking "import from agenda"
- new add customer code in exports
- new: total lines are dynamic
- new: box for average/Max timesheet delta with hours per week for the user
- fix: role authorisation issue on project/task
- fix issue when selecting "curent user" in ts for other option
- fix: unblock holiday if not approved
- fix: project name on user report


4.4.10 (2021-12-01)
- fix the watch clock issue (going way to fast)

Expand Down
2 changes: 1 addition & 1 deletion htdocs/timesheet/core/modules/modtimesheet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function __construct($db)
$this->editor_name = 'Patrick Delcroix';
$this->editor_url = 'https://github.com/delcroip';
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
$this->version = '4.5.0';
$this->version = '4.5.1';
// Key used in llx_cons table to save module status enabled/disabled(where timesheet is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
// Where to store the module in setup page(0=common, 1=interface, 2=others, 3=very specific)
Expand Down
16 changes: 12 additions & 4 deletions htdocs/timesheet/core/modules/pdf/pdf_rat.modules.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2022 Pierre Ardoin <mapiolca@me.com>
*
* This program is free software;you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand All @@ -27,6 +28,8 @@
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php';
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
/**
* Class to manage generation of project document Baleine
*/
Expand Down Expand Up @@ -477,7 +480,12 @@ public function tableau(&$pdf, $tab_top, $tab_height, $heightoftitleline, $outpu
*/
public function pageHead(&$pdf, $object, $showaddress, $outputlangs, $projectid, $userName = "")
{
global $langs, $conf, $mysoc;
global $langs, $conf, $mysoc, $db;

$project = new Project($db);
$project->fetch($projectid);
$project->fetch_thirdparty();

$default_font_size = pdf_getPDFFontSize($outputlangs);
pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
$pdf->SetTextColor(0, 0, 60);
Expand Down Expand Up @@ -513,7 +521,7 @@ public function pageHead(&$pdf, $object, $showaddress, $outputlangs, $projectid,
$pdf->SetFont('', 'B', $default_font_size +1);
$pdf->SetXY($this->marge_gauche+$logoWidth, $posy);
$pdf->SetTextColor(0, 0, 60);
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite - $logoWidth, 4, $outputlangs->convToOutputCharset($object->ref[$projectid]), '', 'R');
$pdf->MultiCell($this->page_largeur - $this->marge_gauche - $this->marge_droite - $logoWidth, 4, $outputlangs->convToOutputCharset($project->ref." - ".$project->title), '', 'R');
//worker name
if (!empty($userName) && !$conf->global->TIMESHEET_PDF_HIDE_NAME) {
$pdf->SetXY($this->marge_gauche, $height+$default_font_size + 3);
Expand All @@ -530,10 +538,10 @@ public function pageHead(&$pdf, $object, $showaddress, $outputlangs, $projectid,
$pdf->SetXY($posx, $posy);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("DateEnd")." : " . dol_print_date($object->stopDate, 'day', false, $outputlangs, true), '', 'R');
// third party name
if (is_object($object->thirdparty[$projectid])) {
if ($project->thirdparty->id > 0) {
$posy += 5;
$pdf->SetXY($posx, $posy);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $object->thirdparty[$projectid]->getFullName($outputlangs), '', 'R');
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("ThirdParty")." : " . $project->thirdparty->getFullName($outputlangs), '', 'R');
}
$pdf->SetTextColor(0, 0, 60);
}
Expand Down

0 comments on commit 06e502c

Please sign in to comment.