Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
9a7e4a2199
@ -841,7 +841,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto
|
||||
}
|
||||
$pdf->SetFont(pdf_getPDFFont($outputlangs));
|
||||
|
||||
if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) {
|
||||
if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) {
|
||||
$pdf->SetCompression(false);
|
||||
}
|
||||
|
||||
|
||||
@ -2072,7 +2072,7 @@ abstract class CommonObject
|
||||
if ($resql) {
|
||||
if ($trigkey) {
|
||||
// call trigger with updated object values
|
||||
if (empty($this->fields) && method_exists($this, 'fetch')) {
|
||||
if (method_exists($this, 'fetch')) {
|
||||
$result = $this->fetch($id);
|
||||
} else {
|
||||
$result = $this->fetchCommon($id);
|
||||
|
||||
@ -239,7 +239,7 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte
|
||||
}
|
||||
$pdf->SetFont(pdf_getPDFFont($langs));
|
||||
|
||||
if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) {
|
||||
if (getDolGlobalString('MAIN_DISABLE_PDF_COMPRESSION')) {
|
||||
$pdf->SetCompression(false);
|
||||
}
|
||||
//$pdf->SetCompression(false);
|
||||
|
||||
@ -383,10 +383,10 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('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)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$tab_height_newpage -= $top_shift;
|
||||
}
|
||||
|
||||
@ -430,7 +430,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -488,7 +488,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
@ -510,7 +510,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
@ -766,7 +766,7 @@ class pdf_standard_asset extends ModelePDFAsset
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
@ -456,7 +456,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -608,7 +608,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -628,7 +628,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -392,7 +392,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -466,7 +466,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -524,7 +524,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
@ -546,7 +546,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
|
||||
@ -642,7 +642,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
}
|
||||
} else {
|
||||
@ -832,7 +832,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -852,7 +852,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ class pdf_strato extends ModelePDFContract
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
// Display notes
|
||||
if (!empty($object->note_public)) {
|
||||
@ -390,7 +390,7 @@ class pdf_strato extends ModelePDFContract
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
|
||||
@ -343,7 +343,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -445,7 +445,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
|
||||
$curY = $tab_top_newpage;
|
||||
@ -485,7 +485,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -571,7 +571,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -591,7 +591,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,7 +322,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -401,7 +401,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -495,7 +495,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -515,7 +515,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -330,7 +330,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift: 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift: 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -428,7 +428,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->AddPage();
|
||||
$pagenb++;
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
// The only function to edit the bottom margin of current page to set it.
|
||||
@ -482,7 +482,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
// apply note frame to last page
|
||||
$pdf->setPage($pageposafternote);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
} else // No pagebreak
|
||||
@ -500,7 +500,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pageposafternote++;
|
||||
$pdf->setPage($pageposafternote);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
|
||||
$posyafter = $tab_top_newpage;
|
||||
}
|
||||
@ -554,7 +554,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
|
||||
$curY = $tab_top_newpage;
|
||||
@ -596,7 +596,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
}
|
||||
} else {
|
||||
@ -705,7 +705,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -725,7 +725,7 @@ class pdf_espadon extends ModelePdfExpedition
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -281,7 +281,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 52;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
|
||||
@ -355,7 +355,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -465,7 +465,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -510,7 +510,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -611,7 +611,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -631,7 +631,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,7 +286,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 95;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 65 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 65 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -361,7 +361,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -390,7 +390,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -447,7 +447,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -467,7 +467,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -448,7 +448,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
|
||||
// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||
$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// You can add more thing under header here, if you increase $extra_under_address_shift too.
|
||||
$extra_under_address_shift = 0;
|
||||
@ -578,7 +578,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -621,7 +621,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -797,7 +797,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -817,7 +817,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
@ -942,7 +942,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($current_page);
|
||||
@ -1004,7 +1004,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($current_page);
|
||||
|
||||
@ -457,7 +457,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
// $this->tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
|
||||
$this->tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
|
||||
$this->tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$this->tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// You can add more thing under header here, if you increase $extra_under_address_shift too.
|
||||
$extra_under_address_shift = 0;
|
||||
@ -575,7 +575,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -633,7 +633,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
$height_note = $posyafter - $this->tab_top_newpage;
|
||||
@ -655,7 +655,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
|
||||
@ -957,7 +957,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -978,7 +978,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
}
|
||||
}
|
||||
@ -1472,7 +1472,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) {
|
||||
$this->_pagefoot($pdf, $object, $outputlangs, 1);
|
||||
$pdf->addPage();
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
$pdf->setY($this->tab_top_newpage);
|
||||
} else {
|
||||
@ -1539,7 +1539,7 @@ class pdf_sponge extends ModelePDFFactures
|
||||
|
||||
if ($posy > $this->page_hauteur - 4 - $this->heightforfooter) {
|
||||
$pdf->addPage();
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs, $outputlangsbis);
|
||||
$pdf->setY($this->tab_top_newpage);
|
||||
} else {
|
||||
|
||||
@ -275,7 +275,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -378,7 +378,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -415,7 +415,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -435,7 +435,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,7 +466,7 @@ class pdf_standard extends ModelePDFMovement
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 42;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -537,7 +537,7 @@ class pdf_standard extends ModelePDFMovement
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -672,7 +672,7 @@ class pdf_standard extends ModelePDFMovement
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -692,7 +692,7 @@ class pdf_standard extends ModelePDFMovement
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -306,7 +306,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -350,7 +350,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -408,7 +408,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
@ -430,7 +430,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -532,7 +532,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
} else {
|
||||
// We found a page break
|
||||
@ -584,7 +584,7 @@ class pdf_vinci extends ModelePDFMo
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
} else {
|
||||
// We found a page break
|
||||
|
||||
@ -233,7 +233,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
|
||||
|
||||
$tab_top = 42;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -352,7 +352,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
{
|
||||
$pdf->AddPage('','',true);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter+1);
|
||||
}
|
||||
}
|
||||
@ -484,7 +484,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
|
||||
{
|
||||
@ -501,7 +501,7 @@ class pdf_standard extends ModelePDFProduct
|
||||
$pdf->AddPage();
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -67,7 +67,9 @@ if (isModEnabled('deplacement')) {
|
||||
if (isModEnabled('agenda')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
}
|
||||
|
||||
if (isModEnabled('expedition')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
|
||||
}
|
||||
|
||||
/**
|
||||
* Class to build documents using ODF templates generator
|
||||
|
||||
@ -284,7 +284,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 50;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -360,7 +360,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -385,7 +385,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -467,7 +467,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -487,7 +487,7 @@ class pdf_baleine extends ModelePDFProjects
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -333,7 +333,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 50;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -587,7 +587,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -612,7 +612,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -740,7 +740,7 @@ class pdf_beluga extends ModelePDFProjects
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation($this->orientation, 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
|
||||
@ -284,7 +284,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 50;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -364,7 +364,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -389,7 +389,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -470,7 +470,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -490,7 +490,7 @@ class pdf_timespent extends ModelePDFProjects
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -419,7 +419,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
$height_incoterms = 0;
|
||||
@ -522,7 +522,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -566,7 +566,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -723,7 +723,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -743,7 +743,7 @@ class pdf_azur extends ModelePDFPropales
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
|
||||
// Incoterm
|
||||
@ -481,7 +481,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -539,7 +539,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
@ -561,7 +561,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
|
||||
@ -847,7 +847,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -868,7 +868,7 @@ class pdf_cyan extends ModelePDFPropales
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ class pdf_squille extends ModelePdfReception
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -381,7 +381,7 @@ class pdf_squille extends ModelePdfReception
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -439,7 +439,7 @@ class pdf_squille extends ModelePdfReception
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
|
||||
@ -270,7 +270,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 65 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -353,7 +353,7 @@ class pdf_standard extends ModelePDFStock
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -457,7 +457,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -477,7 +477,7 @@ class pdf_standard extends ModelePDFStock
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -335,7 +335,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
$tab_height = 130;
|
||||
$tab_height_newpage = 150;
|
||||
|
||||
@ -440,7 +440,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) { // If photo too high, we moved completely on new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
|
||||
$curY = $tab_top_newpage;
|
||||
@ -496,7 +496,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
}
|
||||
} else {
|
||||
@ -612,7 +612,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||
if ($pagenb == 1) {
|
||||
@ -625,7 +625,7 @@ class pdf_eagle extends ModelePdfStockTransfer
|
||||
$pdf->AddPage();
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -352,7 +352,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if ($conf->incoterm->enabled) {
|
||||
@ -419,7 +419,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
$pdf->AddPage();
|
||||
$pagenb++;
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
$pdf->setTopMargin($tab_top_newpage);
|
||||
// The only function to edit the bottom margin of current page to set it.
|
||||
@ -473,7 +473,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
// apply note frame to last page
|
||||
$pdf->setPage($pageposafternote);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
$pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1);
|
||||
} else // No pagebreak
|
||||
@ -491,7 +491,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
$pageposafternote++;
|
||||
$pdf->setPage($pageposafternote);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
|
||||
$posyafter = $tab_top_newpage;
|
||||
}
|
||||
@ -582,7 +582,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
if ($i == ($nblines - 1)) { // No more lines, and no space left to show total, so we create a new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
}
|
||||
} else {
|
||||
@ -740,7 +740,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) {
|
||||
if ($pagenb == $pageposafter) {
|
||||
@ -753,7 +753,7 @@ class pdf_eagle_proforma extends ModelePDFCommandes
|
||||
$pdf->AddPage();
|
||||
if (!empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -342,7 +342,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if (isModEnabled('incoterm')) {
|
||||
@ -428,7 +428,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -559,7 +559,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
@ -576,7 +576,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -423,7 +423,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
// $this->_pagefoot($pdf,$object,$outputlangs,1);
|
||||
@ -481,7 +481,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$height_note = $posyafter - $tab_top_newpage;
|
||||
@ -503,7 +503,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
|
||||
@ -592,7 +592,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
//if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
//if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
}
|
||||
} else {
|
||||
@ -774,7 +774,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -794,7 +794,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,7 +385,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Incoterm
|
||||
if (isModEnabled('incoterm')) {
|
||||
@ -452,7 +452,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -499,7 +499,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -656,7 +656,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -676,7 +676,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -291,7 +291,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 : 10);
|
||||
|
||||
$tab_height = $this->page_hauteur - $tab_top - $heightforfooter - $heightforfreetext;
|
||||
|
||||
@ -336,7 +336,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -417,7 +417,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -437,7 +437,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
@ -371,7 +371,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->SetTextColor(0, 0, 0);
|
||||
|
||||
$tab_top = 90 + $top_shift;
|
||||
$tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10);
|
||||
$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
|
||||
|
||||
// Affiche notes
|
||||
$notetoshow = empty($object->note_public) ? '' : $object->note_public;
|
||||
@ -436,7 +436,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposbefore + 1);
|
||||
@ -486,7 +486,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
$pdf->setPage($pageposafter + 1);
|
||||
@ -633,7 +633,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pagenb++;
|
||||
$pdf->setPage($pagenb);
|
||||
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
if (!empty($tplidx)) {
|
||||
@ -653,7 +653,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
$pdf->useTemplate($tplidx);
|
||||
}
|
||||
$pagenb++;
|
||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) {
|
||||
if (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD')) {
|
||||
$this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@ -140,6 +140,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client, c.rowid, d.total_ht as total_ht, c.ref,";
|
||||
$sql .= " c.ref_client,";
|
||||
$sql .= " c.date_commande, c.fk_statut as statut, c.facture, c.rowid as commandeid, d.rowid, d.qty";
|
||||
$sql .= ", c.date_livraison";
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
}
|
||||
@ -184,6 +185,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$option = '';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$option .= '&limit='.urlencode($limit);
|
||||
}
|
||||
@ -232,6 +234,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("CustomerCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OrderDate", $_SERVER["PHP_SELF"], "c.date_commande", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('DateDeliveryPlanned', $_SERVER['PHP_SELF'], 'c.date_livraison', '', $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "c.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "c.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
@ -257,6 +260,10 @@ if ($id > 0 || !empty($ref)) {
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_commande), 'dayhour')."</td>";
|
||||
// delivery planned date
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_livraison), 'dayhour');
|
||||
print '</td>';
|
||||
print '<td class="center">'.$objp->qty."</td>\n";
|
||||
print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$orderstatic->LibStatut($objp->statut, $objp->facture, 5).'</td>';
|
||||
@ -271,6 +278,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
print '<td colspan="3"></td>';
|
||||
// delivery planned date
|
||||
print '<td></td>';
|
||||
print '<td class="center">'.$total_qty.'</td>';
|
||||
print '<td align="right">'.price($total_ht).'</td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -140,6 +140,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
$sql = "SELECT DISTINCT s.nom as name, s.rowid as socid, s.code_client,";
|
||||
$sql .= " c.rowid, d.total_ht as total_ht, c.ref,";
|
||||
$sql .= " c.date_commande, c.fk_statut as statut, c.rowid as commandeid, d.rowid, d.qty";
|
||||
$sql .= ", c.date_livraison";
|
||||
if (empty($user->rights->societe->client->voir) && !$socid) {
|
||||
$sql .= ", sc.fk_soc, sc.fk_user ";
|
||||
}
|
||||
@ -184,6 +185,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$option = '';
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$option .= '&limit='.urlencode($limit);
|
||||
}
|
||||
@ -232,6 +234,7 @@ if ($id > 0 || !empty($ref)) {
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("SupplierCode", $_SERVER["PHP_SELF"], "s.code_client", "", $option, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("OrderDate", $_SERVER["PHP_SELF"], "c.date_commande", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre('DateDeliveryPlanned', $_SERVER['PHP_SELF'], 'c.date_livraison', '', $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "c.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "c.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
|
||||
@ -257,6 +260,10 @@ if ($id > 0 || !empty($ref)) {
|
||||
print "<td>".$objp->code_client."</td>\n";
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_commande), 'dayhour')."</td>";
|
||||
// delivery planned date
|
||||
print '<td class="center">';
|
||||
print dol_print_date($db->jdate($objp->date_livraison), 'dayhour');
|
||||
print '</td>';
|
||||
print '<td class="center">'.$objp->qty."</td>\n";
|
||||
print '<td align="right">'.price($objp->total_ht)."</td>\n";
|
||||
print '<td align="right">'.$supplierorderstatic->getLibStatut(4).'</td>';
|
||||
@ -271,6 +278,8 @@ if ($id > 0 || !empty($ref)) {
|
||||
print '<td class="left">'.$langs->trans("Totalforthispage").'</td>';
|
||||
}
|
||||
print '<td colspan="3"></td>';
|
||||
// delivery planned date
|
||||
print '<td></td>';
|
||||
print '<td class="center">'.$total_qty.'</td>';
|
||||
print '<td align="right">'.price($total_ht).'</td>';
|
||||
print '<td></td>';
|
||||
|
||||
@ -2935,7 +2935,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
||||
print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>';
|
||||
if ($object->tva_intra) {
|
||||
$s = '';
|
||||
$s .= dol_print_profids($object->tva_intra, 'VATIntra', $object->country_code, 1);
|
||||
$s .= dol_print_profids($object->tva_intra, 'VAT', $object->country_code, 1);
|
||||
$s .= '<input type="hidden" id="tva_intra" name="tva_intra" maxlength="20" value="'.$object->tva_intra.'">';
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) {
|
||||
|
||||
@ -4932,15 +4932,16 @@ class Societe extends CommonObject
|
||||
*/
|
||||
public function setThirdpartyType($typent_id)
|
||||
{
|
||||
global $user;
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
if ($this->id) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
||||
$sql .= " SET fk_typent = ".($typent_id > 0 ? $typent_id : "null");
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
dol_syslog(get_class($this).'::setThirdpartyType', LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$result = $this->setValueFrom('fk_typent', $typent_id, '', null, '', '', $user, 'COMPANY_MODIFY');
|
||||
|
||||
if ($result > 0) {
|
||||
$this->typent_id = $typent_id;
|
||||
$this->typent_code = dol_getIdFromCode($this->db, $this->$typent_id, 'c_typent', 'id', 'code');
|
||||
$this->typent_code = dol_getIdFromCode($this->db, $this->typent_id, 'c_typent', 'id', 'code');
|
||||
return 1;
|
||||
} else {
|
||||
return -1;
|
||||
|
||||
@ -274,8 +274,9 @@ if ($type_element == 'propal') {
|
||||
}
|
||||
if ($type_element == 'order') {
|
||||
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
|
||||
$langs->load('sendings'); // delivery planned date
|
||||
$documentstatic = new Commande($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, NULL as paid, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_commande as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date,';
|
||||
$tables_from = MAIN_DB_PREFIX."commande as c,".MAIN_DB_PREFIX."commandedet as d";
|
||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid);
|
||||
$where .= " AND d.fk_commande = c.rowid";
|
||||
@ -310,8 +311,9 @@ if ($type_element == 'supplier_proposal') {
|
||||
}
|
||||
if ($type_element == 'supplier_order') { // Supplier : Show products from orders.
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
$langs->load('sendings'); // delivery planned date
|
||||
$documentstatic = new CommandeFournisseur($db);
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, ';
|
||||
$sql_select = 'SELECT c.rowid as doc_id, c.ref as doc_number, \'1\' as doc_type, c.date_valid as dateprint, c.fk_statut as status, NULL as paid, c.date_livraison as delivery_planned_date, ';
|
||||
$tables_from = MAIN_DB_PREFIX."commande_fournisseur as c,".MAIN_DB_PREFIX."commande_fournisseurdet as d";
|
||||
$where = " WHERE c.fk_soc = s.rowid AND s.rowid = ".((int) $socid);
|
||||
$where .= " AND d.fk_commande = c.rowid";
|
||||
@ -396,14 +398,6 @@ if (empty($elementTypeArray) && !$object->client && !$object->fournisseur) {
|
||||
$typeElementString = $form->selectarray("type_element", $elementTypeArray, GETPOST('type_element'), $showempty, 0, 0, '', 0, 0, $disabled, '', 'maxwidth150onsmartphone');
|
||||
$button = '<input type="submit" class="button buttonform small" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
|
||||
$param = '';
|
||||
$param .= "&sref=".urlencode($sref);
|
||||
$param .= "&month=".urlencode($month);
|
||||
$param .= "&year=".urlencode($year);
|
||||
$param .= "&sprod_fulldescr=".urlencode($sprod_fulldescr);
|
||||
$param .= "&socid=".urlencode($socid);
|
||||
$param .= "&type_element=".urlencode($type_element);
|
||||
|
||||
$total_qty = 0;
|
||||
|
||||
if ($sql_select) {
|
||||
@ -451,6 +445,10 @@ if ($sql_select) {
|
||||
print $formother->select_month($month ? $month : -1, 'month', 1, 0, 'valignmiddle');
|
||||
print $formother->selectyear($year ? $year : -1, 'year', 1, 20, 1, 0, 0, '', 'valignmiddle maxwidth75imp marginleftonly');
|
||||
print '</td>';
|
||||
// delivery planned date
|
||||
if ($type_element == 'order' || $type_element == 'supplier_order') {
|
||||
print '<td class="liste_titre center"></td>';
|
||||
}
|
||||
print '<td class="liste_titre center">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre left">';
|
||||
@ -470,6 +468,10 @@ if ($sql_select) {
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre('Ref', $_SERVER['PHP_SELF'], 'doc_number', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre('Date', $_SERVER['PHP_SELF'], 'dateprint', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
// delivery planned date
|
||||
if ($type_element == 'order' || $type_element == 'supplier_order') {
|
||||
print_liste_field_titre('DateDeliveryPlanned', $_SERVER['PHP_SELF'], 'delivery_planned_date', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
}
|
||||
print_liste_field_titre('Status', $_SERVER['PHP_SELF'], 'fk_statut', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre('Product', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre('Quantity', $_SERVER['PHP_SELF'], 'prod_qty', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||
@ -499,6 +501,10 @@ if ($sql_select) {
|
||||
print $documentstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
print '<td class="center" width="80">'.dol_print_date($db->jdate($objp->dateprint), 'day').'</td>';
|
||||
// delivery planned date
|
||||
if ($type_element == 'order' || $type_element == 'supplier_order') {
|
||||
print '<td class="center">'.dol_print_date($db->jdate($objp->delivery_planned_date), 'day').'</td>';
|
||||
}
|
||||
|
||||
// Status
|
||||
print '<td class="center">';
|
||||
@ -679,6 +685,10 @@ if ($sql_select) {
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans('Total').'</td>';
|
||||
print '<td colspan="3"></td>';
|
||||
// delivery planned date
|
||||
if ($type_element == 'order' || $type_element == 'supplier_order') {
|
||||
print '<td></td>';
|
||||
}
|
||||
print '<td class="right">'.$total_qty.'</td>';
|
||||
print '<td class="right">'.price($total_ht).'</td>';
|
||||
print '<td class="right">'.price(price2num($total_ht / (empty($total_qty) ? 1 : $total_qty), 'MU')).'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user