Skip to content

Commit

Permalink
Evarisk#2738 [Documents] add: total tasks budget on model orque
Browse files Browse the repository at this point in the history
  • Loading branch information
evarisk-micka committed Apr 10, 2024
1 parent d99850d commit 82cd35f
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ public function write_file( SaturneDocuments $objectDocument, Translate $outputL
$datestart = dol_print_date($objectDoc[$i]['date_start'], 'day');
$dateend = dol_print_date($objectDoc[$i]['date_end'], 'day');
$planned_workload = convertSecondToTime((int) $objectDoc[$i]['workload'], 'allhourmin');
$totalbudget += $objectDoc[$i]['budget'];

$showpricebeforepagebreak = 1;

Expand Down Expand Up @@ -605,6 +606,16 @@ public function write_file( SaturneDocuments $objectDocument, Translate $outputL
}
}

// Break line between total budget and tasks
$curY += 10;
$pdf->line($this->marge_gauche, $curY, $this->page_largeur - $this->marge_droite, $curY);
$curY += 5;
$totalbudget = price($totalbudget, 0, $langs, 1, 0, 0, $conf->currency);

// Total budget of task
$pdf->SetXY($this->posxref, $curY);
$pdf->MultiCell($this->posxbudget - $this->posxlabel, 3, $outputlangs->convToOutputCharset($langs->transnoentities('TotalBudget')) . ' : ' . $outputlangs->convToOutputCharset($totalbudget), 0, 'L');

// Show square
if ($pagenb == 1) {
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 0, 0);
Expand Down

0 comments on commit 82cd35f

Please sign in to comment.