Merge remote-tracking branch 'origin/3.9' into develop
Conflicts: htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
This commit is contained in:
commit
2e4c6597d8
@ -2358,27 +2358,32 @@ class Facture extends CommonInvoice
|
||||
$this->line->fk_facture=$this->id;
|
||||
$this->line->label=$label; // deprecated
|
||||
$this->line->desc=$desc;
|
||||
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
||||
|
||||
$this->line->qty= ($this->type==self::TYPE_CREDIT_NOTE?abs($qty):$qty); // For credit note, quantity is always positive and unit price negative
|
||||
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
|
||||
$this->line->tva_tx=$txtva;
|
||||
$this->line->localtax1_tx=$txlocaltax1;
|
||||
$this->line->localtax2_tx=$txlocaltax2;
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
|
||||
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_tva):$total_tva); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax1=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax1):$total_localtax1); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_localtax2=(($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_localtax2):$total_localtax2); // For credit note and if qty is negative, total is negative
|
||||
|
||||
$this->line->fk_product=$fk_product;
|
||||
$this->line->product_type=$product_type;
|
||||
$this->line->remise_percent=$remise_percent;
|
||||
$this->line->subprice= ($this->type==self::TYPE_CREDIT_NOTE?-abs($pu_ht):$pu_ht); // For credit note, unit price always negative, always positive otherwise
|
||||
$this->line->date_start=$date_start;
|
||||
$this->line->date_end=$date_end;
|
||||
$this->line->ventil=$ventil;
|
||||
$this->line->rang=$rangtouse;
|
||||
$this->line->info_bits=$info_bits;
|
||||
$this->line->fk_remise_except=$fk_remise_except;
|
||||
$this->line->total_ht= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative
|
||||
$this->line->total_tva= $total_tva;
|
||||
$this->line->total_localtax1=$total_localtax1;
|
||||
$this->line->total_localtax2=$total_localtax2;
|
||||
$this->line->localtax1_type = $localtaxes_type[0];
|
||||
$this->line->localtax2_type = $localtaxes_type[2];
|
||||
$this->line->total_ttc= (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);
|
||||
|
||||
$this->line->special_code=$special_code;
|
||||
$this->line->fk_parent_line=$fk_parent_line;
|
||||
$this->line->origin=$origin;
|
||||
|
||||
@ -824,7 +824,7 @@ if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
|
||||
print '</tr>';
|
||||
|
||||
$total_ttc += $obj->total_ttc;
|
||||
$total += $obj->total;
|
||||
$total += $obj->total_ht;
|
||||
$totalam += $obj->am;
|
||||
$var=!$var;
|
||||
$i++;
|
||||
|
||||
@ -318,15 +318,15 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent)
|
||||
else
|
||||
{
|
||||
for ($page=$start_page; $page <= $end_page; ++$page) {
|
||||
$this->setPage($page);
|
||||
$pdf->setPage($page);
|
||||
if ($page == $start_page) {
|
||||
// first page
|
||||
$height = $this->h - $start_y - $this->bMargin;
|
||||
$height = $pdf->h - $start_y - $pdf->bMargin;
|
||||
} elseif ($page == $end_page) {
|
||||
// last page
|
||||
$height = $end_y - $this->tMargin;
|
||||
$height = $end_y - $pdf->tMargin;
|
||||
} else {
|
||||
$height = $this->h - $this->tMargin - $this->bMargin;
|
||||
$height = $pdf->h - $pdf->tMargin - $pdf->bMargin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -305,10 +305,12 @@ class pdf_standard extends ModeleExpenseReport
|
||||
|
||||
$showpricebeforepagebreak=1;
|
||||
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
|
||||
// Accountancy piece
|
||||
$pdf->SetXY($this->posxpiece, $curY);
|
||||
$pdf->MultiCell($this->posxcomment-$this->posxpiece-0.8, 4, $piece_comptable, 0, 'C');
|
||||
|
||||
$pdf->writeHTMLCell($this->posxcomment-$this->posxpiece-0.8, 4, $this->posxpiece-1, $curY, $piece_comptable, 0, 1);
|
||||
|
||||
// Comments
|
||||
$pdf->SetXY($this->posxcomment, $curY);
|
||||
$pdf->writeHTMLCell($this->posxdate-$this->posxcomment-0.8, 4, $this->posxcomment-1, $curY, $object->lines[$i]->comments, 0, 1);
|
||||
@ -547,7 +549,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetFont('','B', $default_font_size + 4);
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx,6,$langs->trans("ExpenseReport"), 0, 'L');
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx,6,$langs->trans("ExpenseReport"), 0, 'R');
|
||||
|
||||
$pdf->SetFont('','', $default_font_size -1);
|
||||
|
||||
@ -555,19 +557,19 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$posy+=8;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'L');
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("Ref")." : " . $object->ref, '', 'R');
|
||||
|
||||
// Date start period
|
||||
$posy+=5;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateStart")." : " . ($object->date_debut>0?dol_print_date($object->date_debut,"day",false,$outputlangs):''), '', 'L');
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateStart")." : " . ($object->date_debut>0?dol_print_date($object->date_debut,"day",false,$outputlangs):''), '', 'R');
|
||||
|
||||
// Date end period
|
||||
$posy+=5;
|
||||
$pdf->SetXY($posx,$posy);
|
||||
$pdf->SetTextColor(0,0,60);
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateEnd")." : " . ($object->date_fin>0?dol_print_date($object->date_fin,"day",false,$outputlangs):''), '', 'L');
|
||||
$pdf->MultiCell($this->page_largeur-$this->marge_droite-$posx, 3, $outputlangs->transnoentities("DateEnd")." : " . ($object->date_fin>0?dol_print_date($object->date_fin,"day",false,$outputlangs):''), '', 'R');
|
||||
|
||||
// Status Expense Report
|
||||
$posy+=6;
|
||||
|
||||
@ -315,7 +315,7 @@ if ($id)
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle));
|
||||
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$langs->trans($obj->libelle)));
|
||||
print '<td>'.$perm_libelle. '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user