Several minor fixes in expense reports
This commit is contained in:
parent
4b854fb33d
commit
553981426e
@ -4262,7 +4262,8 @@ class Form
|
||||
}
|
||||
|
||||
// Now we get list
|
||||
$num = $this->load_cache_vatrates($code_country);
|
||||
$num = $this->load_cache_vatrates($code_country); // If no vat defined, return -1 with message into this->error
|
||||
|
||||
if ($num > 0)
|
||||
{
|
||||
// Definition du taux a pre-selectionner (si defaulttx non force et donc vaut -1 ou '')
|
||||
|
||||
@ -1129,6 +1129,7 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
||||
if ($formatwithoutreduce != $format) { $format = $formatwithoutreduce; $reduceformat=1; } // so format 'dayreduceformat' is processed like day
|
||||
|
||||
// Change predefined format into computer format. If found translation in lang file we use it, otherwise we use default.
|
||||
// TODO Add format daysmallyear and dayhoursmallyear
|
||||
if ($format == 'day') $format=($outputlangs->trans("FormatDateShort")!="FormatDateShort"?$outputlangs->trans("FormatDateShort"):$conf->format_date_short);
|
||||
else if ($format == 'hour') $format=($outputlangs->trans("FormatHourShort")!="FormatHourShort"?$outputlangs->trans("FormatHourShort"):$conf->format_hour_short);
|
||||
else if ($format == 'hourduration') $format=($outputlangs->trans("FormatHourShortDuration")!="FormatHourShortDuration"?$outputlangs->trans("FormatHourShortDuration"):$conf->format_hour_short_duration);
|
||||
|
||||
@ -105,13 +105,13 @@ class pdf_standard extends ModeleExpenseReport
|
||||
// Define position of columns
|
||||
$this->posxpiece=$this->marge_gauche+1;
|
||||
$this->posxcomment=$this->marge_gauche+10;
|
||||
$this->posxdate=80;
|
||||
$this->posxtype=97;
|
||||
$this->posxprojet=116;
|
||||
$this->posxtva=136;
|
||||
$this->posxup=148;
|
||||
$this->posxqty=166;
|
||||
$this->postotalttc=178;
|
||||
$this->posxdate=88;
|
||||
$this->posxtype=107;
|
||||
$this->posxprojet=126;
|
||||
$this->posxtva=146;
|
||||
$this->posxup=158;
|
||||
$this->posxqty=176;
|
||||
$this->postotalttc=188;
|
||||
if (empty($conf->projet->enabled)) {
|
||||
$this->posxtva-=20;
|
||||
$this->posxup-=20;
|
||||
@ -324,7 +324,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
// Date
|
||||
$pdf->SetXY($this->posxdate, $curY);
|
||||
$pdf->MultiCell($this->posxtype-$this->posxdate-0.8, 4,dol_print_date($object->lines[$i]->date,"day",false,$outputlangs), 0, 'C');
|
||||
$pdf->MultiCell($this->posxtype-$this->posxdate-0.8, 4, dol_print_date($object->lines[$i]->date,"day",false,$outputlangs), 0, 'C');
|
||||
|
||||
// Type
|
||||
$pdf->SetXY($this->posxtype, $curY);
|
||||
@ -352,7 +352,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
// Quantity
|
||||
$pdf->SetXY($this->posxqty, $curY);
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty-0.8, 4,$object->lines[$i]->qty, 0, 'C');
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty-0.8, 4,$object->lines[$i]->qty, 0, 'R');
|
||||
|
||||
// Total with all taxes
|
||||
$pdf->SetXY($this->postotalttc-1, $curY);
|
||||
@ -423,6 +423,8 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1;
|
||||
}
|
||||
|
||||
$pdf->SetFont('','', 10);
|
||||
|
||||
// Show total area box
|
||||
$posy=$bottomlasttab+5;//$nexY+95;
|
||||
$pdf->SetXY(100, $posy);
|
||||
@ -574,7 +576,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
// Status Expense Report
|
||||
$posy+=6;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetFont('','B',18);
|
||||
$pdf->SetFont('','B', $default_font_size + 2);
|
||||
$pdf->SetTextColor(111,81,124);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $object->getLibStatut(0), '', 'R');
|
||||
|
||||
@ -814,7 +816,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
if (empty($hidetop))
|
||||
{
|
||||
$pdf->SetXY($this->posxqty-1, $tab_top+1);
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty,2, $outputlangs->transnoentities("Qty"),'','R');
|
||||
$pdf->MultiCell($this->postotalttc-$this->posxqty - 1,2, $outputlangs->transnoentities("Qty"),'','R');
|
||||
}
|
||||
|
||||
// Total with all taxes
|
||||
|
||||
@ -1825,9 +1825,7 @@ else
|
||||
print '<td style="text-align:right;">';
|
||||
$defaultvat=-1;
|
||||
if (! empty($conf->global->EXPENSEREPORT_NO_DEFAULT_VAT)) $conf->global->MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS = 'none';
|
||||
print '<select class="flat" name="vatrate">';
|
||||
print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', true);
|
||||
print '</select>';
|
||||
print $form->load_tva('vatrate', ($vatrate!=''?$vatrate:$defaultvat), $mysoc, '', 0, 0, '', false);
|
||||
print '</td>';
|
||||
|
||||
// Unit price
|
||||
|
||||
@ -2153,7 +2153,7 @@ div.tabBar table.border tr {
|
||||
|
||||
table.border td, div.border div div.tagtd {
|
||||
padding: 2px 2px 2px 2px;
|
||||
border: 1px solid #f4f4f4;
|
||||
border: 1px solid #f0f0f0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user