Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 7.0
Conflicts: htdocs/compta/facture/card.php
This commit is contained in:
commit
ab21769aa2
@ -217,6 +217,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) {
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
@ -529,6 +530,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
@ -606,7 +608,6 @@ if (empty($reshook))
|
||||
$result=$object->set_draft($user, $idwarehouse);
|
||||
if ($result<0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
|
||||
// Define output language
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
@ -617,6 +618,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
@ -1495,6 +1497,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
@ -1747,6 +1750,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
|
||||
$desc = (! empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description;
|
||||
@ -1770,6 +1774,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
if (! empty($prod->customcode))
|
||||
$tmptxt .= $outputlangs->transnoentitiesnoconv("CustomCode") . ': ' . $prod->customcode;
|
||||
@ -1835,6 +1840,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
$model=$object->modelpdf;
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
@ -2012,6 +2018,7 @@ if (empty($reshook))
|
||||
if (! empty($newlang)) {
|
||||
$outputlangs = new Translate("", $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->load('products');
|
||||
}
|
||||
|
||||
$ret = $object->fetch($id); // Reload to get new records
|
||||
|
||||
@ -1300,7 +1300,10 @@ abstract class CommonObject
|
||||
if ($resql)
|
||||
{
|
||||
$row = $this->db->fetch_row($resql);
|
||||
$result = $this->fetch($row[0]);
|
||||
// Test for avoid error -1
|
||||
if ($row[0] > 0) {
|
||||
$result = $this->fetch($row[0]);
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@ -299,16 +299,17 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->AddPage();
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
|
||||
$tab_height = 130;
|
||||
$tab_top = 90+$top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42+$top_shift:10);
|
||||
$tab_height = 130-$top_shift;
|
||||
$tab_height_newpage = 150;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $tab_height_newpage -= $top_shift;
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
@ -1307,16 +1308,22 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
$posy+=2;
|
||||
|
||||
$top_shift = 0;
|
||||
// Show list of linked objects
|
||||
$current_y = $pdf->getY();
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
||||
|
||||
if ($current_y < $pdf->getY())
|
||||
{
|
||||
$top_shift = $pdf->getY() - $current_y;
|
||||
}
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
$carac_emetteur = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
$posy=42+$top_shift;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
@ -1368,7 +1375,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// Show recipient
|
||||
$widthrecbox=100;
|
||||
if ($this->page_largeur < 210) $widthrecbox=84; // To work with US executive format
|
||||
$posy=42;
|
||||
$posy=42+$top_shift;
|
||||
$posx=$this->page_largeur-$this->marge_droite-$widthrecbox;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
@ -1393,6 +1400,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
return $top_shift;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -334,15 +334,16 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
|
||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
|
||||
$tab_height = 130;
|
||||
$tab_top = 90+$top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42+$top_shift:10);
|
||||
$tab_height = 130-$top_shift;
|
||||
$tab_height_newpage = 150;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $tab_height_newpage -= $top_shift;
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
@ -1679,9 +1680,15 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
$posy+=1;
|
||||
|
||||
$top_shift = 0;
|
||||
// Show list of linked objects
|
||||
$current_y = $pdf->getY();
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
|
||||
|
||||
if ($current_y < $pdf->getY())
|
||||
{
|
||||
$top_shift = $pdf->getY() - $current_y;
|
||||
}
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
@ -1689,6 +1696,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// Show sender
|
||||
$posy=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
|
||||
$posy+=$top_shift;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
|
||||
@ -1744,6 +1752,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$widthrecbox=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 92 : 100;
|
||||
if ($this->page_largeur < 210) $widthrecbox=84; // To work with US executive format
|
||||
$posy=!empty($conf->global->MAIN_PDF_USE_ISO_LOCATION) ? 40 : 42;
|
||||
$posy+=$top_shift;
|
||||
$posx=$this->page_largeur-$this->marge_droite-$widthrecbox;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
@ -1768,6 +1777,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
return $top_shift;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -331,16 +331,17 @@ class pdf_azur extends ModelePDFPropales
|
||||
$heightforfooter = $this->marge_basse + 8; // Height reserved to output the footer (value include bottom margin)
|
||||
//print $heightforinfotot + $heightforsignature + $heightforfreetext + $heightforfooter;exit;
|
||||
|
||||
$this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs);
|
||||
$pdf->SetFont('','', $default_font_size - 1);
|
||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42:10);
|
||||
$tab_height = 130;
|
||||
$tab_top = 90+$top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)?42+$top_shift:10);
|
||||
$tab_height = 130-$top_shift;
|
||||
$tab_height_newpage = 150;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $tab_height_newpage -= $top_shift;
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
@ -1492,9 +1493,15 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
$posy+=2;
|
||||
|
||||
$top_shift = 0;
|
||||
// Show list of linked objects
|
||||
$current_y = $pdf->getY();
|
||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
||||
|
||||
if ($current_y < $pdf->getY())
|
||||
{
|
||||
$top_shift = $pdf->getY() - $current_y;
|
||||
}
|
||||
|
||||
if ($showaddress)
|
||||
{
|
||||
// Sender properties
|
||||
@ -1511,7 +1518,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty);
|
||||
|
||||
// Show sender
|
||||
$posy=42;
|
||||
$posy=42+$top_shift;
|
||||
$posx=$this->marge_gauche;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->page_largeur-$this->marge_droite-80;
|
||||
$hautcadre=40;
|
||||
@ -1562,7 +1569,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
// Show recipient
|
||||
$widthrecbox=100;
|
||||
if ($this->page_largeur < 210) $widthrecbox=84; // To work with US executive format
|
||||
$posy=42;
|
||||
$posy=42+$top_shift;
|
||||
$posx=$this->page_largeur-$this->marge_droite-$widthrecbox;
|
||||
if (! empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) $posx=$this->marge_gauche;
|
||||
|
||||
@ -1587,6 +1594,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
|
||||
$pdf->SetTextColor(0,0,0);
|
||||
return $top_shift;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -73,7 +73,7 @@ if ($action == 'presend')
|
||||
{
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
$outputlangs->loadLangs(array('commercial','bills','orders','contracts','members','propal','supplier_proposal','interventions'));
|
||||
$outputlangs->loadLangs(array('commercial','bills','orders','contracts','members','propal','products','supplier_proposal','interventions'));
|
||||
}
|
||||
|
||||
$topicmail='';
|
||||
|
||||
@ -1223,6 +1223,8 @@ class Fichinter extends CommonObject
|
||||
*/
|
||||
function fetch_lines()
|
||||
{
|
||||
$this->lines = array();
|
||||
|
||||
$sql = 'SELECT rowid, description, duree, date, rang';
|
||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet';
|
||||
$sql.=' WHERE fk_fichinter = '.$this->id .' ORDER BY rang ASC, date ASC' ;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user