add visibility

This commit is contained in:
Frédéric FRANCE
2019-02-28 22:07:48 +01:00
parent 4f9e35f350
commit 7e31ca48d8
46 changed files with 387 additions and 379 deletions

View File

@@ -203,7 +203,7 @@ class pdf_einstein extends ModelePDFCommandes
$this->atleastonediscount=0;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Function to build pdf onto disk
*
@@ -215,7 +215,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $hideref Do not show ref
* @return int 1=OK, 0=KO
*/
function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0)
{
// phpcs:enable
global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblignes;
@@ -652,7 +652,7 @@ class pdf_einstein extends ModelePDFCommandes
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show payments table
*
@@ -662,13 +662,13 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Object langs for output
* @return int <0 if KO, >0 if OK
*/
function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
private function _tableau_versements(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show miscellaneous information (payment mode, payment term, ...)
*
@@ -678,7 +678,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param Translate $outputlangs Langs object
* @return void
*/
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
private function _tableau_info(&$pdf, $object, $posy, $outputlangs)
{
// phpcs:enable
global $conf;
@@ -855,18 +855,18 @@ class pdf_einstein extends ModelePDFCommandes
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Show total to pay
*
* @param TCPDF $pdf Object PDF
* @param TCPDF $pdf Object PDF
* @param Facture $object Object invoice
* @param int $deja_regle Montant deja regle
* @param int $posy Position depart
* @param Translate $outputlangs Objet langs
* @return int Position pour suite
*/
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
private function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
// phpcs:enable
global $conf,$mysoc;
@@ -1129,7 +1129,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param string $currency Currency code
* @return void
*/
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
private function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop = 0, $hidebottom = 0, $currency = '')
{
global $conf;
@@ -1239,7 +1239,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "PdfOrderTitle")
{
global $conf,$langs,$hookmanager;
@@ -1450,7 +1450,7 @@ class pdf_einstein extends ModelePDFCommandes
* @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
private function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
{
global $conf;
$showdetails=$conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;

View File

@@ -643,7 +643,7 @@ class pdf_eratosthene extends ModelePDFCommandes
if ($pagenb == $pageposafter)
{
$this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1, $object->multicurrency_code);
}
}
else
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code);
@@ -816,7 +816,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
$posy=$pdf->GetY()+1;
}
}
elseif ($object->availability_code || $object->availability) // Show availability conditions
{
$pdf->SetFont('', 'B', $default_font_size - 2);
@@ -831,7 +831,7 @@ class pdf_eratosthene extends ModelePDFCommandes
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
$posy=$pdf->GetY()+1;
}
}
// Show payment mode
if ($object->mode_reglement_code
@@ -889,8 +889,8 @@ class pdf_eratosthene extends ModelePDFCommandes
$posy=$pdf->GetY()+2;
}
}
}
}
}
}
// If payment mode not forced or forced to VIR, show payment with BAN
if (empty($object->mode_reglement_code) || $object->mode_reglement_code == 'VIR')
@@ -1672,5 +1672,5 @@ class pdf_eratosthene extends ModelePDFCommandes
{
$this->cols = $hookmanager->resArray;
}
}
}
}

View File

@@ -46,7 +46,7 @@ class pdf_proforma extends pdf_einstein
*
* @param DoliDB $db Database handler
*/
function __construct($db)
public function __construct($db)
{
global $conf,$langs,$mysoc;
@@ -67,7 +67,7 @@ class pdf_proforma extends pdf_einstein
* @param string $titlekey Translation key to show as title of document
* @return void
*/
function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma")
private function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $titlekey = "InvoiceProForma")
{
global $conf,$langs,$hookmanager;