diff --git a/ChangeLog b/ChangeLog
index 16ba71ffce9..a6fa992f319 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -56,6 +56,7 @@ For users:
- New: Update libs/tools/logo for DoliWamp (now use PHP 5.3).
- New: Added ODT Template tag {object_total_discount}
- New: Add new import options: Third parties bank details, warehouses and stocks, categories and suppliers prices
+- New: English bank account need a bank code (called sort code) to identify an account.
New experimental modules:
- New: Add margin management module.
diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php
index bda0e074be0..d1d3cf69423 100644
--- a/htdocs/comm/propal/class/propal.class.php
+++ b/htdocs/comm/propal/class/propal.class.php
@@ -2204,7 +2204,7 @@ class Propal extends CommonObject
$this->mode_reglement_id = 7;
$this->mode_reglement_code = 'CHQ';
$this->availability_id = 1;
- $this->availability_code = 'DSP';
+ $this->availability_code = 'AV_NOW';
$this->demand_reason_id = 1;
$this->demand_reason_code = 'SRC_00';
$this->note_public='This is a comment (public)';
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 43a21712b98..fd744a221a8 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -975,18 +975,19 @@ class Account extends CommonObject
}
/**
- * Return if a bank account is defined with detailed information (bank code, desk code, number and key)
+ * Return if a bank account is defined with detailed information (bank code, desk code, number and key).
+ * More information on codes used by countries on page http://en.wikipedia.org/wiki/Bank_code
*
- * @return int 0=Use only an account number
- * 1=Need Bank, Desk, Number and Key (France, Spain, ...)
- * 2=Neek Bank only (BSB for Australia)
+ * @return int 0=No bank code need + Account number is enough
+ * 1=Need 2 fields for bank code: Bank, Desk (France, Spain, ...) + Account number and key
+ * 2=Neek 1 field for bank code: Bank only (Sort code for Great Britain, BSB for Australia) + Account number
*/
function useDetailedBBAN()
{
$country_code=$this->getCountryCode();
- if (in_array($country_code,array('FR','ES','GA'))) return 1; // France, Spain, Gabon
- if (in_array($country_code,array('AU'))) return 2; // Australia
+ if (in_array($country_code,array('CH','DE','FR','ES','GA','IT'))) return 1; // France, Spain, Gabon
+ if (in_array($country_code,array('AU','BE','CA','DK','GR','GB','ID','IE','IR','KR','NL','NZ','US'))) return 2; // Australia, Great Britain...
return 0;
}
diff --git a/htdocs/compta/bank/fiche.php b/htdocs/compta/bank/fiche.php
index 490b228f25a..75aaff172c5 100644
--- a/htdocs/compta/bank/fiche.php
+++ b/htdocs/compta/bank/fiche.php
@@ -78,17 +78,22 @@ if ($_POST["action"] == 'add')
if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($account->account_number))
{
- $message='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'
';
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), 'error');
$action='create'; // Force chargement page en mode creation
$error++;
}
-
- if (empty($account->label))
+ if (empty($account->ref))
{
- $message=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'
';
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), 'errors');
$action='create'; // Force chargement page en mode creation
$error++;
}
+ if (empty($account->label))
+ {
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), 'errors');
+ $action='create'; // Force chargement page en mode creation
+ $error++;
+ }
if (! $error)
{
@@ -98,7 +103,7 @@ if ($_POST["action"] == 'add')
$_GET["id"]=$id; // Force chargement page en mode visu
}
else {
- $message=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("AccountancyCode")).'
';
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("AccountancyCode")), 'error');
$action='edit'; // Force chargement page en mode creation
$error++;
}
-
- if (empty($account->label))
+ if (empty($account->ref))
{
- $message=''.$langs->trans("ErrorFieldRequired",$langs->transnoentities("LabelBankCashAccount")).'
';
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("Ref")), 'errors');
$action='edit'; // Force chargement page en mode creation
$error++;
}
+ if (empty($account->label))
+ {
+ setEventMessage($langs->transnoentitiesnoconv("ErrorFieldRequired",$langs->transnoentitiesnoconv("LabelBankCashAccount")), 'errors');
+ $action='edit'; // Force chargement page en mode creation
+ $error++;
+ }
if (! $error)
{
@@ -256,7 +266,7 @@ if ($action == 'create')
print '';
// Country
- print '| '.$langs->trans("BankAccountCountry").' | ';
if ($account->fk_pays > 0)
{
$img=picto_from_langcode($account->country_code);
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index f267ab0a496..1c9db467dcf 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -2879,8 +2879,8 @@ class Facture extends CommonInvoice
$this->cond_reglement_id = 1;
$this->cond_reglement_code = 'RECEP';
$this->date_lim_reglement=$this->calculate_date_lim_reglement();
- $this->mode_reglement_id = 7;
- $this->mode_reglement_code = 'CHQ';
+ $this->mode_reglement_id = 0; // Not forced to show payment mode CHQ + VIR
+ $this->mode_reglement_code = ''; // Not forced to show payment mode CHQ + VIR
$this->note_public='This is a comment (public)';
$this->note_private='This is a comment (private)';
$this->note='This is a comment (private)';
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 70368a4a37b..0e4ca0113bb 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -696,7 +696,7 @@ function dol_format_address($object)
$ret .= ($ret ? "\n" : '' ).$object->town;
if ($object->state && in_array($object->country_code,$countriesusingstate))
{
- $ret.=", ".$object->departement;
+ $ret.=", ".$object->state;
}
if ($object->zip) $ret .= ', '.$object->zip;
}
@@ -705,7 +705,7 @@ function dol_format_address($object)
$ret .= ($ret ? "\n" : '' ).$object->town;
if ($object->state && in_array($object->country_code,$countriesusingstate))
{
- $ret.=", ".$object->departement;
+ $ret.=", ".$object->state;
}
if ($object->zip) $ret .= ($ret ? "\n" : '' ).$object->zip;
}
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 7cbcdb4854d..0efb375c4f4 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -529,9 +529,10 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
* @param int $page_hauteur Page height (no more used)
* @param Object $object Object shown in PDF
* @param int $showdetails Show company details into footer. This param seems to not be used by standard version.
+ * @param int $hidefreetext 1=Hide free text, 0=Show free text
* @return int Return height of bottom margin including footer text
*/
-function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0)
+function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_basse,$marge_gauche,$page_hauteur,$object,$showdetails=0,$hidefreetext=0)
{
global $conf,$user;
@@ -541,7 +542,7 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$dims=$pdf->getPageDimensions();
// Line of free text
- if (! empty($conf->global->$paramfreetext))
+ if (empty($hidefreetext) && ! empty($conf->global->$paramfreetext))
{
// Make substitution
$substitutionarray=array(
@@ -658,21 +659,26 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
$pdf->SetDrawColor(224,224,224);
// On positionne le debut du bas de page selon nbre de lignes de ce bas de page
- $nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
- //print 'nbofline='.$nbofline; exit;
- //print 'e'.$line.'t'.dol_nboflines($line);exit;
- $marginwithfooter=$marge_basse + ($nbofline*3) + (! empty($line1)?3:0) + (! empty($line2)?3:0) + (! empty($line3)?3:0) + (! empty($line4)?3:0);
+ $freetextheight=0;
+ if ($line) // Free text
+ {
+ $width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
+ if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) {
+ $width=200; $align='C';
+ }
+ $freetextheight=$pdf->getStringHeight($width,$line);
+ }
+
+ $marginwithfooter=$marge_basse + $freetextheight + (! empty($line1)?3:0) + (! empty($line2)?3:0) + (! empty($line3)?3:0) + (! empty($line4)?3:0);
$posy=$marginwithfooter+0;
if ($line) // Free text
{
$pdf->SetXY($dims['lm'],-$posy);
- $width=20000; $align='L'; // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
- if (! empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) { $width=200; $align='C'; }
$pdf->MultiCell($width, 3, $line, 0, $align, 0);
- $posy-=($nbofline*3); // 6 of ligne + 3 of MultiCell
+ $posy-=$freetextheight;
}
-
+
$pdf->SetY(-$posy);
$pdf->line($dims['lm'], $dims['hk']-$posy, $dims['wk']-$dims['rm'], $dims['hk']-$posy);
$posy--;
diff --git a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
index 4fd48630869..4c86e9db9d8 100644
--- a/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
+++ b/htdocs/core/modules/cheque/pdf/pdf_blochet.class.php
@@ -343,9 +343,10 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return void
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
global $conf;
$default_font_size = pdf_getPDFFontSize($outputlangs);
diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
index 11c77000b1a..ed4446f0661 100644
--- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
+++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php
@@ -273,7 +273,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -360,7 +360,7 @@ class pdf_einstein extends ModelePDFCommandes
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -376,7 +376,7 @@ class pdf_einstein extends ModelePDFCommandes
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -489,7 +489,9 @@ class pdf_einstein extends ModelePDFCommandes
$posy=$pdf->GetY()+4;
}
- // Show payments conditions
+ $posxval=52;
+
+ // Show payments conditions
if ($object->cond_reglement_code || $object->cond_reglement)
{
$pdf->SetFont('','B', $default_font_size - 2);
@@ -498,7 +500,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(52, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
@@ -515,7 +517,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('','B', $default_font_size - 2);
- $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
+ $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
$pdf->SetTextColor(0,0,0);
$posy=$pdf->GetY()+1;
@@ -533,7 +535,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(50, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
@@ -1083,11 +1085,12 @@ class pdf_einstein extends ModelePDFCommandes
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'COMMANDE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
index 0e41524f4a7..956bde9a7f6 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_merou.modules.php
@@ -256,7 +256,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
{
$this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -271,7 +271,7 @@ class pdf_expedition_merou extends ModelePdfExpedition
{
$this->_tableau($pdf, $tab_top_newpage - 1, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
$pagenb++;
@@ -365,9 +365,10 @@ class pdf_expedition_merou extends ModelePdfExpedition
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return void
*/
- function _pagefoot(&$pdf, $object, $outputlangs)
+ function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0)
{
$default_font_size = pdf_getPDFFontSize($outputlangs);
$pdf->SetFont('','', $default_font_size - 2);
diff --git a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
index bc6793612ca..46031811be4 100644
--- a/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
+++ b/htdocs/core/modules/expedition/doc/pdf_expedition_rouget.modules.php
@@ -68,8 +68,8 @@ class pdf_expedition_rouget extends ModelePdfExpedition
// Defini position des colonnes
$this->posxdesc=$this->marge_gauche+1;
- $this->posxqtyordered=120;
- $this->posxqtytoship=160;
+ $this->posxqtyordered=$this->page_largeur - $this->marge_droite - 70;
+ $this->posxqtytoship=$this->page_largeur - $this->marge_droite - 35;
}
/**
@@ -236,7 +236,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description de la ligne produit
@@ -255,11 +255,11 @@ class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->SetFont('','', $default_font_size - 1); // On repositionne la police par defaut
- $pdf->SetXY($this->posxqtyordered+5, $curY);
- $pdf->MultiCell(30, 3, $object->lines[$i]->qty_asked,'','C');
+ $pdf->SetXY($this->posxqtyordered, $curY);
+ $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 3, $object->lines[$i]->qty_asked,'','C');
- $pdf->SetXY($this->posxqtytoship+5, $curY);
- $pdf->MultiCell(30, 3, $object->lines[$i]->qty_shipped,'','C');
+ $pdf->SetXY($this->posxqtytoship, $curY);
+ $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxqtytoship), 3, $object->lines[$i]->qty_shipped,'','C');
$nexY+=2; // Passe espace entre les lignes
@@ -275,7 +275,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -290,7 +290,7 @@ class pdf_expedition_rouget extends ModelePdfExpedition
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -374,21 +374,21 @@ class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->line($this->marge_gauche, $tab_top+5, $this->page_largeur-$this->marge_droite, $tab_top+5);
$pdf->SetXY($this->posxdesc-1, $tab_top+1);
- $pdf->MultiCell(108, 2, $outputlangs->transnoentities("Description"), '', 'L');
+ $pdf->MultiCell($this->posxqtyordered - $this->posxdesc, 2, $outputlangs->transnoentities("Description"), '', 'L');
}
$pdf->line($this->posxqtyordered-1, $tab_top, $this->posxqtyordered-1, $tab_top + $tab_height);
if (empty($hidetop))
{
- $pdf->SetXY($this->posxqtyordered-1, $tab_top+1);
- $pdf->MultiCell(40,2, $outputlangs->transnoentities("QtyOrdered"),'','C');
+ $pdf->SetXY($this->posxqtyordered, $tab_top+1);
+ $pdf->MultiCell(($this->posxqtytoship - $this->posxqtyordered), 2, $outputlangs->transnoentities("QtyOrdered"),'','C');
}
$pdf->line($this->posxqtytoship-1, $tab_top, $this->posxqtytoship-1, $tab_top + $tab_height);
if (empty($hidetop))
{
- $pdf->SetXY($this->posxqtytoship-1, $tab_top+1);
- $pdf->MultiCell(40,2, $outputlangs->transnoentities("QtyToShip"),'','C');
+ $pdf->SetXY($this->posxqtytoship, $tab_top+1);
+ $pdf->MultiCell(($this->page_largeur - $this->marge_droite - $this->posxqtytoship), 2, $outputlangs->transnoentities("QtyToShip"),'','C');
}
}
@@ -636,11 +636,12 @@ class pdf_expedition_rouget extends ModelePdfExpedition
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return void
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'SHIPPING_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
index 373eb82e494..cb9c5177b08 100755
--- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
+++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php
@@ -276,7 +276,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -362,7 +362,7 @@ class pdf_crabe extends ModelePDFFactures
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -378,7 +378,7 @@ class pdf_crabe extends ModelePDFFactures
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -602,6 +602,8 @@ class pdf_crabe extends ModelePDFFactures
$posy=$pdf->GetY()+4;
}
+ $posxval=52;
+
// Show payments conditions
if ($object->type != 2 && ($object->cond_reglement_code || $object->cond_reglement))
{
@@ -611,7 +613,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(52, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
@@ -629,7 +631,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('','B', $default_font_size - 2);
- $pdf->MultiCell(90, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
+ $pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorNoPaiementModeConfigured"),0,'L',0);
$pdf->SetTextColor(0,0,0);
$posy=$pdf->GetY()+1;
@@ -646,7 +648,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(50, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
@@ -1271,11 +1273,12 @@ class pdf_crabe extends ModelePDFFactures
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'FACTURE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
index 0f62b8be6b2..f5b42c904c1 100644
--- a/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
+++ b/htdocs/core/modules/fichinter/doc/pdf_soleil.modules.php
@@ -249,7 +249,7 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -283,7 +283,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -298,7 +298,7 @@ class pdf_soleil extends ModelePDFFicheinter
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -597,9 +597,9 @@ class pdf_soleil extends ModelePDFFicheinter
* @param Translate $outputlangs Object lang for output
* @return void
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'FICHINTER_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php b/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
deleted file mode 100644
index 1e49e8f6c6d..00000000000
--- a/htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
+++ /dev/null
@@ -1,476 +0,0 @@
-
- * Copyright (C) 2004-2008 Laurent Destailleur
- * Copyright (C) 2005-2011 Regis Houssin
- * Copyright (C) 2007 Franky Van Liedekerke
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- * or see http://www.gnu.org/
- */
-
-/**
- * \file htdocs/core/modules/livraison/pdf/pdf_sirocco.modules.php
- * \ingroup livraison
- * \brief File of class to manage receving receipts with template Sirocco
- */
-
-require_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
-require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
-
-
-/**
- * Classe permettant de generer les bons de livraison au modele Sirocco
- */
-class pdf_sirocco extends ModelePDFDeliveryOrder
-{
-
- /**
- * Constructor
- *
- * @param DoliDB $db Database handler
- */
- function __construct($db)
- {
- global $conf,$langs,$mysoc;
-
- $langs->load("main");
- $langs->load("bills");
- $langs->load("sendings");
- $langs->load("companies");
-
- $this->db = $db;
- $this->name = "sirocco";
- $this->description = $langs->trans("DocumentModelSirocco");
-
- // Dimension page pour format A4
- $this->type = 'pdf';
- $formatarray=pdf_getFormat();
- $this->page_largeur = $formatarray['width'];
- $this->page_hauteur = $formatarray['height'];
- $this->format = array($this->page_largeur,$this->page_hauteur);
- $this->marge_gauche=10;
- $this->marge_droite=10;
- $this->marge_haute=10;
- $this->marge_basse=10;
-
- // Recupere emmetteur
- $this->emetteur=$mysoc;
- if (! $this->emetteur->pays_code) $this->emetteur->pays_code=substr($langs->defaultlang,-2); // Par defaut, si n'�tait pas d�fini
-
- $this->tva=array();
- }
-
-
- /**
- * Fonction generant le bon de livraison sur le disque
- *
- * @param Object $object Object livraison a generer
- * @param Translate $outputlangs Lang output object
- * @return int 1 if OK, <=0 if KO
- */
- function write_file($object,$outputlangs)
- {
- global $user,$conf,$langs;
- $default_font_size = pdf_getPDFFontSize($outputlangs);
-
- if (! is_object($outputlangs)) $outputlangs=$langs;
- // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
- if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
-
- $outputlangs->load("main");
- $outputlangs->load("dict");
- $outputlangs->load("bills");
- $outputlangs->load("products");
- $outputlangs->load("deliveries");
- $outputlangs->load("sendings");
-
- if ($conf->expedition->dir_output."/receipt")
- {
- $object->fetch_thirdparty();
-
- $nblines = count($object->lines);
-
- $objectref = dol_sanitizeFileName($object->ref);
- $dir = $conf->expedition->dir_output."/receipt";
- if (! preg_match('/specimen/i',$objectref)) $dir.= "/" . $objectref;
- $file = $dir . "/" . $objectref . ".pdf";
-
- if (! file_exists($dir))
- {
- if (dol_mkdir($dir) < 0)
- {
- $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir);
- return 0;
- }
- }
-
- if (file_exists($dir))
- {
- $pdf=pdf_getInstance($this->format);
- $heightforinfotot = 50; // Height reserved to output the info and total part
- $heightforfooter = 25; // Height reserved to output the footer (value include bottom margin)
- $pdf->SetAutoPageBreak(1,0);
-
- if (class_exists('TCPDF'))
- {
- $pdf->setPrintHeader(false);
- $pdf->setPrintFooter(false);
- }
- $pdf->SetFont(pdf_getPDFFont($outputlangs));
- // Set path to the background PDF File
- if (empty($conf->global->MAIN_DISABLE_FPDI) && ! empty($conf->global->MAIN_ADD_PDF_BACKGROUND))
- {
- $pagecount = $pdf->setSourceFile($conf->mycompany->dir_output.'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND);
- $tplidx = $pdf->importPage(1);
- }
-
- // Complete object by loading several other informations
- $expedition=new Expedition($this->db);
- $result = $expedition->fetch($object->expedition_id);
-
- $commande = new Commande($this->db);
- if ($expedition->origin == 'commande')
- {
- $commande->fetch($expedition->origin_id);
- }
- $object->commande=$commande;
-
-
- $pdf->Open();
- $pagenb=0;
- $pdf->SetDrawColor(128,128,128);
-
- $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref));
- $pdf->SetSubject($outputlangs->transnoentities("DeliveryOrder"));
- $pdf->SetCreator("Dolibarr ".DOL_VERSION);
- $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs)));
- $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("DeliveryOrder"));
- if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false);
-
- $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
-
- // New page
- $pdf->AddPage();
- if (! empty($tplidx)) $pdf->useTemplate($tplidx);
- $pagenb++;
- $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_height_newpage = 150;
-
- $iniY = $tab_top + 7;
- $curY = $tab_top + 7;
- $nexY = $tab_top + 7;
-
- // Loop on each lines
- for ($i = 0 ; $i < $nblines ; $i++)
- {
- $curY = $nexY;
- $pdf->SetFont('','', $default_font_size - 1); // Into loop to work with multipage
- $pdf->SetTextColor(0,0,0);
-
- $pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
- $pageposbefore=$pdf->getPage();
-
- // Description of product line
- pdf_writelinedesc($pdf,$object,$i,$outputlangs,100,3,30,$curY,1);
-
- $nexY = $pdf->GetY();
- $pageposafter=$pdf->getPage();
- $pdf->setPage($pageposbefore);
- $pdf->setTopMargin($this->marge_haute);
- $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
-
-// We suppose that a too long description is moved completely on next page
-if ($pageposafter > $pageposbefore) {
- $pdf->setPage($pageposafter); $curY = $tab_top_newpage;
-}
-
- $pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
-
- $pdf->SetXY(10, $curY);
-
- $pdf->MultiCell(20, 3, $outputlangs->convToOutputCharset($object->lines[$i]->ref), 0, 'C');
-
- // TODO Field not yet saved in database
- //$pdf->SetXY(133, $curY );
- //$pdf->MultiCell(10, 5, $object->lines[$i]->tva_tx, 0, 'C');
-
- $pdf->SetXY(145, $curY);
- $pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
-
- // TODO Field not yet saved in database
- //$pdf->SetXY(156, $curY );
- //$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0);
-
- // TODO Field not yet saved in database
- //$pdf->SetXY(174, $curY );
- //$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped);
- //$pdf->MultiCell(26, 3, $total, 0, 'R', 0);
-
- $pdf->line(10, $curY-1, 200, $curY-1);
-
-
- $nexY+=2; // Passe espace entre les lignes
-
- // Detect if some page were added automatically and output _tableau for past pages
- while ($pagenb < $pageposafter)
- {
- $pdf->setPage($pagenb);
- if ($pagenb == 1)
- {
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
- }
- else
- {
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
- }
- $this->_pagefoot($pdf,$object,$outputlangs);
- $pagenb++;
- $pdf->setPage($pagenb);
- $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
- }
- if (isset($object->lines[$i+1]->pagebreak) && $object->lines[$i+1]->pagebreak)
- {
- if ($pagenb == 1)
- {
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, 0, 1);
- }
- else
- {
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
- }
- $this->_pagefoot($pdf,$object,$outputlangs);
- // New page
- $pdf->AddPage();
- if (! empty($tplidx)) $pdf->useTemplate($tplidx);
- $pagenb++;
- }
- }
-
- // Show square
- if ($pagenb == 1)
- {
- $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfooter, 0, $outputlangs, 0, 0);
- $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfooter + 1;
- }
- else
- {
- $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfooter, 0, $outputlangs, 1, 0);
- $bottomlasttab=$this->page_hauteur - $heightforinfotot - $heightforfooter + 1;
- }
-
- /*
- * Pied de page
- */
- $this->_pagefoot($pdf, $object, $outputlangs);
- $pdf->AliasNbPages();
-
- $pdf->Close();
-
- $pdf->Output($file,'F');
- if (! empty($conf->global->MAIN_UMASK))
- @chmod($file, octdec($conf->global->MAIN_UMASK));
-
- return 1;
- }
- }
- else
- {
- $this->error=$langs->transnoentities("ErrorConstantNotDefined","LIVRAISON_OUTPUTDIR");
- return 0;
- }
- }
-
- /**
- * Show table for lines
- *
- * @param PDF &$pdf Object PDF
- * @param string $tab_top Top position of table
- * @param string $tab_height Height of table (rectangle)
- * @param int $nexY Y
- * @param Translate $outputlangs Langs object
- * @param int $hidetop Hide top bar of array
- * @param int $hidebottom Hide bottom bar of array
- * @return void
- */
- function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0, $hidebottom=0)
- {
- $default_font_size = pdf_getPDFFontSize($outputlangs);
- $pdf->SetFont('','', $default_font_size - 1);
-
- $pdf->SetXY(30, $tab_top+1);
- $pdf->MultiCell(60, 2, $outputlangs->transnoentities("Designation"), 0, 'L');
-
- $pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
- $pdf->SetXY(147, $tab_top+1);
- $pdf->MultiCell(30, 2, $outputlangs->transnoentities("QtyShipped"), 0, 'L');
-
- $pdf->Rect(10, $tab_top, 190, $tab_height);
- }
-
- /**
- * Show top header of page.
- *
- * @param PDF &$pdf Object PDF
- * @param Object $object Object to show
- * @param int $showaddress 0=no, 1=yes
- * @param Translate $outputlangs Object lang for output
- * @return void
- */
- function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
- {
- global $langs,$conf,$mysoc;
- $default_font_size = pdf_getPDFFontSize($outputlangs);
-
- $outputlangs->load("companies");
-
- pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
-
- $pdf->SetTextColor(0,0,60);
- $pdf->SetFont('','B', $default_font_size + 3);
-
- $posx=$this->page_largeur-$this->marge_droite-100;
- $posy=$this->marge_haute;
-
- $pdf->SetXY($this->marge_gauche,$posy);
-
- if (! empty($conf->global->MAIN_INFO_SOCIETE_NOM))
- {
- $pdf->SetTextColor(0,0,200);
- $pdf->SetFont('','B', $default_font_size + 2);
- $pdf->MultiCell(76, 4, $outputlangs->convToOutputCharset(MAIN_INFO_SOCIETE_NOM), 0, 'L');
- }
-
- // Sender properties
- $carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);
-
- $pdf->SetFont('','', $default_font_size - 1);
- $pdf->SetXY($this->marge_gauche,$posy+4);
- $pdf->MultiCell(80, 3, $carac_emetteur, 0, 'L');
-
-
- /*
- * Adresse Client
- */
-
- // If SHIPPING contact defined on invoice, we use it
- $usecontact=false;
- $arrayidcontact=$object->commande->getIdContact('external','SHIPPING');
- if (count($arrayidcontact) > 0)
- {
- $usecontact=true;
- $result=$object->fetch_contact($arrayidcontact[0]);
- }
-
- // Recipient name
- if (! empty($usecontact))
- {
- // On peut utiliser le nom de la societe du contact
- if (! empty($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT)) $socname = $object->contact->socname;
- else $socname = $object->client->nom;
- $carac_client_name=$outputlangs->convToOutputCharset($socname);
- }
- else
- {
- $carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
- }
-
- $carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
-
- $pdf->SetTextColor(0,0,0);
- $pdf->SetFont('','B', $default_font_size + 1);
-
- $pdf->SetXY(102,42);
- $pdf->MultiCell(96,5, $carac_client_name, 0, 'L');
- $pdf->SetFont('','B', $default_font_size);
- $pdf->SetXY(102,47);
- $pdf->MultiCell(96,5, $carac_client, 0, 'L');
- $pdf->Rect(100, 40, 100, 40);
-
-
- $pdf->SetTextColor(0,0,60);
- $pdf->SetFont('','B', $default_font_size + 1);
- $pdf->SetXY($posx, 86);
- $pdf->MultiCell(100, 2, $outputlangs->transnoentities("Date")." : " . dol_print_date(($object->date_delivery?$object->date_delivery:$date->valid),"day",false,$outputlangs,true), 0, 'R');
- $pdf->SetXY($posx, 92);
- $pdf->MultiCell(100, 2, $outputlangs->transnoentities("DeliveryOrder")." ".$outputlangs->convToOutputCharset($object->ref), 0, 'R');
-
- if ($object->client->code_client)
- {
- $posy+=7;
- $pdf->SetXY($posx, $posy);
- $pdf->SetTextColor(0,0,60);
- $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
- }
-
- $pdf->SetFont('','B', $default_font_size - 1);
-
- // Add origin linked objects
- // TODO extend to other objects
- $object->fetchObjectLinked('','',$object->id,'delivery');
-
- if (! empty($object->linkedObjects))
- {
- $outputlangs->load('orders');
-
- foreach($object->linkedObjects as $elementtype => $objects)
- {
- $object->fetchObjectLinked('','',$objects[0]->id,$objects[0]->element);
-
- foreach($object->linkedObjects as $elementtype => $objects)
- {
- $num=count($objects);
- for ($i=0;$i<$num;$i++)
- {
- $order=new Commande($this->db);
- $result=$order->fetch($objects[$i]->id);
- if ($result >= 0)
- {
- $posy+=5;
- $pdf->SetXY($posx,$posy);
- $pdf->SetFont('','', $default_font_size - 1);
- $text=$order->ref;
- if ($order->ref_client) $text.=' ('.$order->ref_client.')';
- $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder")." : ".$outputlangs->transnoentities($text), '', 'R');
- }
- }
- }
- }
- }
-
- }
-
- /**
- * Show footer of page. Need this->emetteur object
- *
- * @param PDF &$pdf PDF
- * @param Object $object Object to show
- * @param Translate $outputlangs Object lang for output
- * @return void
- */
- function _pagefoot(&$pdf,$object,$outputlangs)
- {
- return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
- }
-}
-
-?>
diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
index 163fa51dc05..52da05fbfd2 100644
--- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
+++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php
@@ -151,7 +151,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
$pdf=pdf_getInstance($this->format);
$heightforinfotot = 50; // Height reserved to output the info and total part
- $heightforfooter = 50; // Height reserved to output the footer (value include bottom margin)
+ $heightforfooter = 25; // Height reserved to output the footer (value include bottom margin)
$pdf->SetAutoPageBreak(1,0);
if (class_exists('TCPDF'))
@@ -251,7 +251,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot-50); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot-50); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -318,7 +318,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -333,7 +333,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -394,7 +394,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if ($pdf->GetY() > 250)
{
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pdf->AddPage('P', 'A4');
@@ -425,7 +425,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
if (! empty($conf->global->MAIN_UMASK))
@chmod($file, octdec($conf->global->MAIN_UMASK));
- return 1; // Pas d'erreur
+ return 1;
}
else
{
@@ -693,11 +693,12 @@ class pdf_typhon extends ModelePDFDeliveryOrder
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return void
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
index 23352041b33..38337c4314e 100644
--- a/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
+++ b/htdocs/core/modules/project/pdf/pdf_baleine.modules.php
@@ -239,7 +239,7 @@ class pdf_baleine extends ModelePDFProjects
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -254,7 +254,7 @@ class pdf_baleine extends ModelePDFProjects
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -425,11 +425,12 @@ class pdf_baleine extends ModelePDFProjects
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return void
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'DELIVERY_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'PROJECT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
index b5109ab8b8a..1258c0c5286 100644
--- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php
+++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php
@@ -274,12 +274,45 @@ class pdf_azur extends ModelePDFPropales
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
$curX = $this->posxdesc-1;
+
+ $showpricebeforepagebreak=1;
+
+ $pdf->startTransaction();
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,0,$hookmanager);
+ $pageposafter=$pdf->getPage();
+ if ($pageposafter > $pageposbefore) // There is a pagebreak
+ {
+ $pdf->rollbackTransaction(true);
+ $pageposafter=$pageposbefore;
+ //print $pageposafter.'-'.$pageposbefore;exit;
+ $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
+ pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,4,$curX,$curY,$hideref,$hidedesc,0,$hookmanager);
+ $pageposafter=$pdf->getPage();
+ if ($pageposafter == $pageposbefore) // There is no pagebreak after second try with small margin
+ {
+ if ($i == ($nblignes-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, $hookmanager);
+ $pdf->setPage($pagenb+1);
+ }
+ }
+ else
+ {
+ // We found a page break
+ $showpricebeforepagebreak=0;
+ }
+ }
+ else // No pagebreak
+ {
+ $pdf->commitTransaction();
+ }
$nexY = $pdf->GetY();
$pageposafter=$pdf->getPage();
@@ -288,7 +321,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
// We suppose that a too long description is moved completely on next page
- if ($pageposafter > $pageposbefore) {
+ if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) {
$pdf->setPage($pageposafter); $curY = $tab_top_newpage;
}
@@ -360,7 +393,7 @@ class pdf_azur extends ModelePDFPropales
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -376,7 +409,7 @@ class pdf_azur extends ModelePDFPropales
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -493,6 +526,8 @@ class pdf_azur extends ModelePDFPropales
$posy=$pdf->GetY()+4;
}
+ $posxval=52;
+
// Show shipping date
if ($object->date_livraison)
{
@@ -502,7 +537,7 @@ class pdf_azur extends ModelePDFPropales
$titre = $outputlangs->transnoentities("DateDeliveryPlanned").':';
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(82, $posy);
+ $pdf->SetXY($posxval, $posy);
$dlp=dol_print_date($object->date_livraison,"daytext",false,$outputlangs,true);
$pdf->MultiCell(80, 4, $dlp, 0, 'L');
@@ -516,7 +551,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(82, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_availability=$outputlangs->transnoentities("AvailabilityType".$object->availability_code)!=('AvailabilityType'.$object->availability_code)?$outputlangs->transnoentities("AvailabilityType".$object->availability_code):$outputlangs->convToOutputCharset($object->availability);
$lib_availability=str_replace('\n',"\n",$lib_availability);
$pdf->MultiCell(80, 4, $lib_availability, 0, 'L');
@@ -533,7 +568,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->MultiCell(80, 4, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(52, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_condition_paiement=$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code)!=('PaymentCondition'.$object->cond_reglement_code)?$outputlangs->transnoentities("PaymentCondition".$object->cond_reglement_code):$outputlangs->convToOutputCharset($object->cond_reglement_doc);
$lib_condition_paiement=str_replace('\n',"\n",$lib_condition_paiement);
$pdf->MultiCell(80, 4, $lib_condition_paiement,0,'L');
@@ -569,7 +604,7 @@ class pdf_azur extends ModelePDFPropales
$titre = $outputlangs->transnoentities("PaymentMode").':';
$pdf->MultiCell(80, 5, $titre, 0, 'L');
$pdf->SetFont('','', $default_font_size - 2);
- $pdf->SetXY(50, $posy);
+ $pdf->SetXY($posxval, $posy);
$lib_mode_reg=$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code)!=('PaymentType'.$object->mode_reglement_code)?$outputlangs->transnoentities("PaymentType".$object->mode_reglement_code):$outputlangs->convToOutputCharset($object->mode_reglement);
$pdf->MultiCell(80, 5, $lib_mode_reg,0,'L');
@@ -1157,11 +1192,12 @@ class pdf_azur extends ModelePDFPropales
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf,$object,$outputlangs)
+ function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'PROPALE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
index cb8cd7106fd..f505e9f93a1 100755
--- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
+++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php
@@ -271,7 +271,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -350,7 +350,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -365,7 +365,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -983,11 +983,12 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf, $object, $outputlangs)
+ function _pagefoot(&$pdf, $object, $outputlangs,$hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
index edc1e389ac4..f1d143076ff 100644
--- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
+++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php
@@ -283,7 +283,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->SetTextColor(0,0,0);
$pdf->setTopMargin($tab_top_newpage);
- $pdf->setPageOrientation('', 1, $this->marge_basse+$heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
+ $pdf->setPageOrientation('', 1, $heightforfooter+$heightforinfotot); // The only function to edit the bottom margin of current page to set it.
$pageposbefore=$pdf->getPage();
// Description of product line
@@ -367,7 +367,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
$pagenb++;
$pdf->setPage($pagenb);
$pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it.
@@ -382,7 +382,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1);
}
- $this->_pagefoot($pdf,$object,$outputlangs);
+ $this->_pagefoot($pdf,$object,$outputlangs,1);
// New page
$pdf->AddPage();
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
@@ -1087,11 +1087,12 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
* @param PDF &$pdf PDF
* @param Object $object Object to show
* @param Translate $outputlangs Object lang for output
+ * @param int $hidefreetext 1=Hide free text
* @return int Return height of bottom margin including footer text
*/
- function _pagefoot(&$pdf, $object, $outputlangs)
+ function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext=0)
{
- return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
+ return pdf_pagefoot($pdf,$outputlangs,'SUPPLIER_INVOICE_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,0,$hidefreetext);
}
}
diff --git a/htdocs/install/mysql/data/llx_00_c_pays.sql b/htdocs/install/mysql/data/llx_00_c_pays.sql
index baabf172c46..98f7ccf1b16 100644
--- a/htdocs/install/mysql/data/llx_00_c_pays.sql
+++ b/htdocs/install/mysql/data/llx_00_c_pays.sql
@@ -120,7 +120,7 @@ insert into llx_c_pays (rowid,code,libelle) values (85, 'EG', 'Egypte' )
insert into llx_c_pays (rowid,code,libelle) values (86, 'SV', 'Salvador' );
insert into llx_c_pays (rowid,code,libelle) values (87, 'GQ', 'Guinée Equatoriale');
insert into llx_c_pays (rowid,code,libelle) values (88, 'ER', 'Erythrée' );
-insert into llx_c_pays (rowid,code,libelle) values (89, 'EE', 'Estonie' );
+insert into llx_c_pays (rowid,code,libelle) values (89, 'EE', 'Estonia' );
insert into llx_c_pays (rowid,code,libelle) values (90, 'ET', 'Ethiopie' );
insert into llx_c_pays (rowid,code,libelle) values (91, 'FK', 'Iles Falkland' );
insert into llx_c_pays (rowid,code,libelle) values (92, 'FO', 'Iles Féroé' );
@@ -130,17 +130,17 @@ insert into llx_c_pays (rowid,code,libelle) values (95, 'GF', 'Guyane française
insert into llx_c_pays (rowid,code,libelle) values (96, 'PF', 'Polynésie française');
insert into llx_c_pays (rowid,code,libelle) values (97, 'TF', 'Terres australes françaises');
insert into llx_c_pays (rowid,code,libelle) values (98, 'GM', 'Gambie' );
-insert into llx_c_pays (rowid,code,libelle) values (99, 'GE', 'Géorgie' );
+insert into llx_c_pays (rowid,code,libelle) values (99, 'GE', 'Georgia' );
insert into llx_c_pays (rowid,code,libelle) values (100, 'GH', 'Ghana' );
insert into llx_c_pays (rowid,code,libelle) values (101, 'GI', 'Gibraltar' );
-insert into llx_c_pays (rowid,code,libelle) values (102, 'GR', 'Grèce' );
+insert into llx_c_pays (rowid,code,libelle) values (102, 'GR', 'Greece' );
insert into llx_c_pays (rowid,code,libelle) values (103, 'GL', 'Groenland' );
insert into llx_c_pays (rowid,code,libelle) values (104, 'GD', 'Grenade' );
--insert into llx_c_pays (rowid,code,libelle) values (105, 'GP', 'Guadeloupe' );
insert into llx_c_pays (rowid,code,libelle) values (106, 'GU', 'Guam' );
insert into llx_c_pays (rowid,code,libelle) values (107, 'GT', 'Guatemala' );
-insert into llx_c_pays (rowid,code,libelle) values (108, 'GN', 'Guinée' );
-insert into llx_c_pays (rowid,code,libelle) values (109, 'GW', 'Guinée-Bissao' );
+insert into llx_c_pays (rowid,code,libelle) values (108, 'GN', 'Guinea' );
+insert into llx_c_pays (rowid,code,libelle) values (109, 'GW', 'Guinea-Bissao' );
--insert into llx_c_pays (rowid,code,libelle) values (110, 'GY', 'Guyana' );
insert into llx_c_pays (rowid,code,libelle) values (111, 'HT', 'Haiti' );
insert into llx_c_pays (rowid,code,libelle) values (112, 'HM', 'Iles Heard et McDonald');
@@ -159,8 +159,8 @@ insert into llx_c_pays (rowid,code,libelle) values (124, 'JO', 'Jordanie' )
insert into llx_c_pays (rowid,code,libelle) values (125, 'KZ', 'Kazakhstan' );
insert into llx_c_pays (rowid,code,libelle) values (126, 'KE', 'Kenya' );
insert into llx_c_pays (rowid,code,libelle) values (127, 'KI', 'Kiribati' );
-insert into llx_c_pays (rowid,code,libelle) values (128, 'KP', 'Corée du Nord' );
-insert into llx_c_pays (rowid,code,libelle) values (129, 'KR', 'Corée du Sud' );
+insert into llx_c_pays (rowid,code,libelle) values (128, 'KP', 'North Corea' );
+insert into llx_c_pays (rowid,code,libelle) values (129, 'KR', 'South Corea' );
insert into llx_c_pays (rowid,code,libelle) values (130, 'KW', 'Koweït' );
insert into llx_c_pays (rowid,code,libelle) values (131, 'KG', 'Kirghizistan' );
insert into llx_c_pays (rowid,code,libelle) values (132, 'LA', 'Laos' );
diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang
index ee159f0d689..1250cfadf24 100644
--- a/htdocs/langs/el_GR/admin.lang
+++ b/htdocs/langs/el_GR/admin.lang
@@ -277,112 +277,14 @@ Alerts=Συναγερμοί
Delays=Καθυστερήσεις
DelayBeforeWarning=Καθυστέρηση πριν την προειδοποίηση
DelaysBeforeWarning=Καθυστερήσεις πριν την προειδοποίηση
-DelaysOfToleranceBeforeWarning=Tolerance delays before warning
-DelaysOfToleranceDesc=This screen allows you to define the tolerated delays before an alert is reported on screen with picto %s for each late element.
-Delays_MAIN_DELAY_ACTIONS_TODO=Delay tolerance (in days) before alert on planned actions not yet realised
-Delays_MAIN_DELAY_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on orders not yet done
-Delays_MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS=Delay tolerance (in days) before alert on suppliers orders not yet processed
-Delays_MAIN_DELAY_PROPALS_TO_CLOSE=Delay tolerance (in days) before alert on proposals to close
-Delays_MAIN_DELAY_PROPALS_TO_BILL=Delay tolerance (in days) before alert on proposals not billed
-Delays_MAIN_DELAY_NOT_ACTIVATED_SERVICES=Tolerance delay (in days) before alert on services to activate
-Delays_MAIN_DELAY_RUNNING_SERVICES=Tolerance delay (in days) before alert on expired services
-Delays_MAIN_DELAY_SUPPLIER_BILLS_TO_PAY=Tolerance delay (in days) before alert on unpaid supplier invoices
-Delays_MAIN_DELAY_CUSTOMER_BILLS_UNPAYED=Tolerence delay (in days) before alert on unpaid client invoices
-Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=Tolerance delay (in days) before alert on pending bank reconciliation
-Delays_MAIN_DELAY_MEMBERS=Tolerance delay (in days) before alert on delayed membership fee
-Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Tolerance delay (in days) before alert for cheques deposit to do
-SetupDescription1=All parameters available in the setup area allow you to setup Dolibarr before starting using it.
-SetupDescription2=The 2 most important setup steps are the 2 first ones in the left setup menu, this means Company/foundation setup page and Modules setup page:
-SetupDescription3=Parameters in menu Setup -> Company/foundation are required because input information is used on Dolibarr displays and to modify Dolibarr behaviour (for example for features related to your country).
-SetupDescription4=Parameters in menu Setup -> Modules are required because Dolibarr is not a fixed ERP/CRM but a sum of several modules, all more or less independant. It's only after activating modules you're interesting in that you will see features appeared in menus.
-SetupDescription5=Other menu entries manage optional parameters.
-EventsSetup=Setup for events logs
-LogEvents=Security audit events
Audit=Ιστορικό εισόδου χρηστών
-ListEvents=Audit events
-ListOfSecurityEvents=List of Dolibarr security events
-LogEventDesc=You can enable here the logging for Dolibarr security events. Administrators can then see its content via menu System tools - Audit. Warning, this feature can consume a large amount of data in database.
-AreaForAdminOnly=Those features can be used by administrator users only.
-SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only.
-SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
-CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage
-DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
-AvailableModules=Available modules
-ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
-SessionTimeOut=Time out for session
-SessionExplanation=This number guarantee that session will never expire before this delay. But PHP sessoin management does not guaranty that session always expire after this delay: This occurs if a system to clean cache session is running. Note: with no particular system, internal PHP process will clean session every about %s/%s access but only during access made by other sessions.
-TriggersAvailable=Available triggers
-TriggersDesc=Triggers are files that will modify the behaviour of Dolibarr workflow once copied into the directory htdocs/core/triggers. They realised new actions, activated on Dolibarr events (new company creation, invoice validation, ...).
-TriggerDisabledByName=Triggers in this file are disabled by the -NORUN suffix in their name.
-TriggerDisabledAsModuleDisabled=Triggers in this file are disabled as module %s is disabled.
-TriggerAlwaysActive=Triggers in this file are always active, whatever are the activated Dolibarr modules.
-TriggerActiveAsModuleActive=Triggers in this file are active as module %s is enabled.
-GeneratedPasswordDesc=Define here which rule you want to use to generate new password if you ask to have auto generated password
-DictionnaryDesc=Define here all reference datas. You can complete predefined value with yours.
-ConstDesc=This page allows you to edit all other parameters not available in previous pages. They are reserved parameters for advanced developers or for troubleshouting.
-OnceSetupFinishedCreateUsers=Warning, you are a Dolibarr administrator user. Administrator users are used to setup Dolibarr. For a usual usage of Dolibarr, it is recommended to use a non administrator user created from Users & Groups menu.
-MiscellanousDesc=Define here all other parameters related to security.
-LimitsSetup=Limits/Precision setup
-LimitsDesc=You can define limits, precisions and optimisations used by Dolibarr here
-MAIN_MAX_DECIMALS_UNIT=Max decimals for unit prices
-MAIN_MAX_DECIMALS_TOT=Max decimals for total prices
-MAIN_MAX_DECIMALS_SHOWN=Max decimals for prices shown on screen (Add ... after this number if you want to see ... when number is truncated when shown on screen)
-MAIN_DISABLE_PDF_COMPRESSION=Use PDF compression for generated PDF files.
-MAIN_ROUNDING_RULE_TOT= Size of rounding range (for rare countries where rounding is done on something else than base 10)
-UnitPriceOfProduct=Net unit price of a product
-TotalPriceAfterRounding=Total price (net/vat/incl tax) after rounding
-ParameterActiveForNextInputOnly=Parameter effective for next input only
-NoEventOrNoAuditSetup=No security event has been recorded yet. This can be normal if audit has not been enabled on "setup - security - audit" page.
-NoEventFoundWithCriteria=No security event has been found for such search criterias.
-SeeLocalSendMailSetup=See your local sendmail setup
-BackupDesc=To make a complete backup of Dolibarr, you must:
-BackupDesc2=* Save content of documents directory (%s) that contains all uploaded and generated files (you can make a zip for example).
-BackupDesc3=* Save content of your database into a dump file. for this, you can use following assistant.
-BackupDescX=Archived directory should be stored in a secure place.
-BackupDescY=The generated dump file should be stored in a secure place.
-RestoreDesc=To restore a Dolibarr backup, you must:
-RestoreDesc2=* Restore archive file (zip file for example) of documents directory to extract tree of files in documents directory of a new Dolibarr installation or into this current documents directoy (%s).
-RestoreDesc3=* Restore the data, from a backup dump file, into the database of the new Dolibarr installation or into the database of this current installation. Warning, once restore is finished, you must use a login/password, that existed when backup was made, to connect again. To restore a backup database into this current installation, you can follow this assistant.
-ForcedToByAModule= This rule is forced to %s by an activated module
-PreviousDumpFiles=Available database backup dump files
WeekStartOnDay=Πρώτη ημέρα της εβδομάδας
-RunningUpdateProcessMayBeRequired=Running the upgrade process seems to be required (Programs version %s differs from database version %s)
-YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from command line after login to a shell with user %s.
-YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP
-DownloadMoreSkins=More skins to download
-SimpleNumRefModelDesc=Return the reference number with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence without hole and with no reset
-ShowProfIdInAddress=Show professionnal id with addresses on documents
TranslationUncomplete=Ημιτελής μεταγλώττιση
-SomeTranslationAreUncomplete=Some languages may be partially translated or may contains errors. If you detect some, you can fix .lang text files into directory htdocs/langs and submit them on the forum at http://www.dolibarr.org.
-MenuUseLayout=Make vertical menu hidable (option javascript must not be disabled)
=
-##### Module password generation
-PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase.
-PasswordGenerationNone=Do not suggest any generated password. Password must be type in manually.
-##### Users setup #####
-UserGroupSetup=Users and groups module setup
-GeneratePassword=Suggest a generated password
-RuleForGeneratedPasswords=Rule to generate suggested passwords or validate passwords
DoNotSuggest=Χωρίς πρόταση κωδικού
-EncryptedPasswordInDatabase=To allow the encryption of the passwords in the database
-DisableForgetPasswordLinkOnLogonPage=Do not show the link "Forget password" on login page
UsersSetup=Ρυθμίσεις αρθρώματος χρηστών
-UserMailRequired=EMail required to create a new user
-##### Company setup #####
CompanySetup=Ρυθμίσεις αρθρώματος Εταιριών
-CompanyCodeChecker=Module for third parties code generation and checking (customer or supplier)
-AccountCodeManager=Module for accountancy code generation (customer or supplier)
-ModuleCompanyCodeAquarium=Return an accountancy code built by %s followed by third party supplier code for a supplier accountancy code, and %s followed by third party customer code for a customer accountancy code.
-ModuleCompanyCodePanicum=Return an empty accountancy code.
-ModuleCompanyCodeDigitaria=Accountancy code depends on third party code. The code is composed of the character "C" in the first position followed by the first 5 characters of the third party code.
-UseNotifications=Use notifications
-NotificationsDesc=EMails notifications feature allows you to silently send automatic mail, for some Dolibarr events, to third parties (customers or suppliers) that are configured to. Choice of active notification and targets contacts is made one third party at time.
ModelModules=Πρότυπα εγγράφων
-DocumentModelOdt=Generate documents from OpenDocuments templates (.ODT files for OpenOffice, KOffice, TextEdit,...)
-WatermarkOnDraft=Watermark on draft document
-##### Webcal setup #####
-WebCalSetup=Webcalendar link setup
-WebCalSyncro=Add Dolibarr events to WebCalendar
WebCalAllways=Πάντα, χωρίς ερώτηση
WebCalYesByDefault=Κατ' απαίτηση (Ναί εξ ορισμού)
WebCalNoByDefault=Κατ' απαίτηση (Όχι εξ ορισμού)
@@ -390,217 +292,6 @@ WebCalNever=Ποτέ
WebCalURL=URL for calendar access
WebCalServer=Server hosting calendar database
WebCalDatabaseName=Όνομα βάσης δεδομένων
-WebCalUser=User to access database
-WebCalSetupSaved=Webcalendar setup saved successfully.
-WebCalTestOk=Connection to server '%s' on database '%s' with user '%s' successfull.
-WebCalTestKo1=Connection to server '%s' succeed but database '%s' could not be reached.
-WebCalTestKo2=Connection to server '%s' with user '%s' failed.
-WebCalErrorConnectOkButWrongDatabase=Connection succeeded but database doesn't look to be a Webcalendar database.
-WebCalAddEventOnCreateActions=Add calendar event on actions create
-WebCalAddEventOnCreateCompany=Add calendar event on companies create
-WebCalAddEventOnStatusPropal=Add calendar event on commercial proposals status change
-WebCalAddEventOnStatusContract=Add calendar event on contracts status change
-WebCalAddEventOnStatusBill=Add calendar event on bills status change
-WebCalAddEventOnStatusMember=Add calendar event on members status change
-WebCalUrlForVCalExport=An export link to %s format is available at following link: %s
-WebCalCheckWebcalSetup=Maybe the Webcal module setup is not correct.
-##### Invoices #####
-BillsSetup=Invoices module setup
-BillsDate=Invoices date
-BillsNumberingModule=Invoices and credit notes numbering module
-BillsPDFModules=Invoice documents models
-CreditNoteSetup=Credit note module setup
-CreditNotePDFModules=Credit note document models
-CreditNote=Credit note
-CreditNotes=Credit notes
-ForceInvoiceDate=Force invoice date to validation date
-DisableRepeatable=Disable repeatable invoices
-SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined for invoice
-EnableEditDeleteValidInvoice=Enable the possibility to edit/delete valid invoice with no payment
-SuggestPaymentByRIBOnAccount=Suggest payment by withdraw on account
-SuggestPaymentByChequeToAddress=Suggest payment by cheque to
-FreeLegalTextOnInvoices=Free text on invoices
-WatermarkOnDraftInvoices=Watermark on draft invoices (any if empty)
-##### Proposals #####
-PropalSetup=Commercial proposals module setup
-CreateForm=Create forms
-NumberOfProductLines=Number of product lines
-PathToDocuments=Path to documents
-PathDirectory=Directory
-ProposalsNumberingModules=Commercial proposal numbering modules
-ProposalsPDFModules=Commercial proposal documents models
-ClassifiedInvoiced=Classified invoiced
-HideTreadedPropal=Hide the treated commercial proposals in the list
-AddShippingDateAbility=Add shipping date ability
-AddDeliveryAddressAbility=Add delivery date ability
-UseOptionLineIfNoQuantity=A line of product/service with a zero amount is considered as an option
-FreeLegalTextOnProposal=Free text on commercial proposals
-WatermarkOnDraftProposal=Watermark on draft commercial proposals (any if empty)
-##### Orders #####
-OrdersSetup=Order's management setup
-OrdersNumberingModules=Orders numbering modules
-OrdersModelModule=Order documents models
-HideTreadedOrders=Hide the treated or canceled orders in the list
-ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order
-FreeLegalTextOnOrders=Free text on orders
-WatermarkOnDraftOrders=Watermark on draft orders (any if empty)
-##### Clicktodial #####
-ClickToDialSetup=Ρυθμίσεις αρθρώματος Click To Dial
-ClickToDialUrlDesc=Url called when a click on phone picto is done. Dans l'url, vous pouvez utiliser les balises %%1$s qui sera remplacé par le téléphone de l'appelé %%2$s qui sera remplacé par le téléphone de l'appelant (le votre) %%3$s qui sera remplacé par votre login clicktodial (défini sur votre fiche utilisateur) %%4$s qui sera remplacé par votre mot de passe clicktodial (défini sur votre fiche utilisateur).
-##### Bookmark4u #####
-Bookmark4uSetup=Bookmark4u module setup
-##### Interventions #####
-InterventionsSetup=Interventions module setup
-FreeLegalTextOnInterventions=Free text on intervention documents
-FicheinterNumberingModules=Intervention numbering modules
-TemplatePDFInterventions=Intervention card documents models
-WatermarkOnDraftInterventionCards=Watermark on intervention card documents (any if empty)
-##### Members #####
-MembersSetup=Members module setup
-MemberMainOptions=Βασικές επιλογές
-AddSubscriptionIntoAccount=Suggest by default to create a bank transaction, in bank module, when adding a new payed subscription
-AdherentMailRequired=EMail required to create a new member
-MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default
-##### LDAP setup #####
-LDAPSetup=LDAP Setup
-LDAPGlobalParameters=Global parameters
-LDAPUsersSynchro=Users
-LDAPGroupsSynchro=Groups
-LDAPContactsSynchro=Contacts
-LDAPMembersSynchro=Members
-LDAPSynchronization=LDAP synchronisation
-LDAPFunctionsNotAvailableOnPHP=LDAP functions are not available on your PHP
-LDAPToDolibarr=LDAP -> Dolibarr
-DolibarrToLDAP=Dolibarr -> LDAP
-LDAPNamingAttribute=Key in LDAP
-LDAPSynchronizeUsers=Organization of users in LDAP
-LDAPSynchronizeGroups=Organization of groups in LDAP
-LDAPSynchronizeContacts=Organization of contacts in LDAP
-LDAPSynchronizeMembers=Organization of foundation's members in LDAP
-LDAPTypeExample=OpenLdap, Egroupware or Active Directory
-LDAPPrimaryServer=Primary server
-LDAPSecondaryServer=Secondary server
-LDAPServerPort=Server port
-LDAPServerPortExample=Default port : 389
-LDAPServerProtocolVersion=Protocol version
-LDAPServerUseTLS=Use TLS
-LDAPServerUseTLSExample=Your LDAP server use TLS
-LDAPServerDn=Server DN
-LDAPAdminDn=Administrator DN
-LDAPAdminDnExample=Complete DN (ex: cn=admin,dc=example,dc=com)
-LDAPPassword=Administrator password
-LDAPUserDn=Users' DN
-LDAPUserDnExample=Complete DN (ex: ou=users,dc=example,dc=com)
-LDAPGroupDn=Groups' DN
-LDAPGroupDnExample=Complete DN (ex: ou=groups,dc=example,dc=com)
-LDAPServerExample=Server address (ex: localhost, 192.168.0.2, ldaps://ldap.example.com/)
-LDAPServerDnExample=Complete DN (ex: dc=company,dc=com)
-LDAPPasswordExample=Admin password
-LDAPDnSynchroActive=Users and groups synchronization
-LDAPDnSynchroActiveExample=LDAP to Dolibarr or Dolibarr to LDAP synchronization
-LDAPDnContactActive=Contacts' synchronization
-LDAPDnContactActiveYes=Activated synchronization
-LDAPDnContactActiveExample=Activated/Unactivated synchronization
-LDAPDnMemberActive=Members' synchronization
-LDAPDnMemberActiveExample=Activated/Unactivated synchronization
-LDAPContactDn=Dolibarr contacts' DN
-LDAPContactDnExample=Complete DN (ex: ou=contacts,dc=example,dc=com)
-LDAPMemberDn=Dolibarr member's DN
-LDAPMemberDnExample=Complete DN (ex: ou=members,dc=example,dc=com)
-LDAPMemberObjectClassList=List of objectClass
-LDAPMemberObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory)
-LDAPUserObjectClassList=List of objectClass
-LDAPUserObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory)
-LDAPGroupObjectClassList=List of objectClass
-LDAPGroupObjectClassListExample=List of objectClass defining record attributes (ex: top,groupOfUniqueNames)
-LDAPContactObjectClassList=List of objectClass
-LDAPContactObjectClassListExample=List of objectClass defining record attributes (ex: top,inetOrgPerson or top,user for active directory)
-LDAPMemberTypeDn=Dolibarr member's type DN
-LDAPMemberTypeDnExample=Complete DN (ex: ou=type_members,dc=example,dc=com)
-LDAPTestConnect=Test LDAP connection
-LDAPTestSynchroContact=Test contact's synchronization
-LDAPTestSynchroUser=Test user's synchronization
-LDAPTestSynchroGroup=Test group's synchronization
-LDAPTestSynchroMember=Test member's synchronization
-LDAPSynchroOK=Synchronization test successful
-LDAPSynchroKO=Failed synchronization test
-LDAPSynchroKOMayBePermissions=Failed synchronization test. Check that connexion to server is correctly configured and allows LDAP udpates
-LDAPTCPConnectOK=TCP connect to LDAP server successful (Server=%s, Port=%s)
-LDAPTCPConnectKO=TCP connect to LDAP server failed (Server=%s, Port=%s)
-LDAPBindOK=Connect/Authentificate to LDAP server sucessfull (Server=%s, Port=%s, Admin=%s, Password=%s)
-LDAPBindKO=Connect/Authentificate to LDAP server failed (Server=%s, Port=%s, Admin=%s, Password=%s)
-LDAPUnbindSuccessfull=Disconnect successfull
-LDAPUnbindFailed=Disconnect failed
-LDAPDolibarrMapping=Dolibarr Mapping
-LDAPLdapMapping=LDAP Mapping
-LDAPFieldLoginUnix=Login (unix)
-LDAPFieldLoginExample=Example : uid
-LDAPFilterConnection=Search filter
-LDAPFilterConnectionExample=Example : &(objectClass=inetOrgPerson)
-LDAPFieldLoginSamba=Login (samba, activedirectory)
-LDAPFieldLoginSambaExample=Example : samaccountname
-LDAPFieldFullname=Firstname Name
-LDAPFieldFullnameExample=Example : cn
-LDAPFieldPassword=Password
-LDAPFieldPasswordNotCrypted=Password not crypted
-LDAPFieldPasswordCrypted=Password crypted
-LDAPFieldPasswordExample=Example : userPassword
-LDAPFieldCommonName=Common name
-LDAPFieldCommonNameExample=Example : cn
-LDAPFieldName=Name
-LDAPFieldNameExample=Example : sn
-LDAPFieldFirstName=First name
-LDAPFieldFirstNameExample=Example : givenName
-LDAPFieldMail=Email address
-LDAPFieldMailExample=Example : mail
-LDAPFieldPhone=Professional phone number
-LDAPFieldPhoneExample=Example : telephonenumber
-LDAPFieldHomePhone=Personal phone number
-LDAPFieldHomePhoneExample=Example : homephone
-LDAPFieldMobile=Cellular phone
-LDAPFieldMobileExample=Example : mobile
-LDAPFieldFax=Αριθμός FAX
-LDAPFieldFaxExample=Example : facsimiletelephonenumber
-LDAPFieldAddress=Street
-LDAPFieldAddressExample=Example : street
-LDAPFieldZip=Τ.Κ.
-LDAPFieldZipExample=Example : postalcode
-LDAPFieldTown=Πόλη
-LDAPFieldTownExample=Example : l
-LDAPFieldCountry=Χώρα
-LDAPFieldCountryExample=Example : c
-LDAPFieldDescription=Description
-LDAPFieldDescriptionExample=Example : description
-LDAPFieldGroupMembers= Group members
-LDAPFieldGroupMembersExample= Example : uniqueMember
-LDAPFieldBirthdate=Birthdate
-LDAPFieldBirthdateExample=Example :
-LDAPFieldCompany=Company
-LDAPFieldCompanyExample=Example : o
-LDAPFieldSid=SID
-LDAPFieldSidExample=Example : objectsid
-LDAPFieldEndLastSubscription=Date of subscription end
-LDAPParametersAreStillHardCoded=LDAP parametres are still hardcoded (in contact class)
-LDAPSetupNotComplete=LDAP setup not complete (go on others tabs)
-LDAPNoUserOrPasswordProvidedAccessIsReadOnly=No administrator or password provided. LDAP access will be anonymous and in read only mode.
-LDAPDescContact=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr contacts.
-LDAPDescUsers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr users.
-LDAPDescGroups=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr groups.
-LDAPDescMembers=This page allows you to define LDAP attributes name in LDAP tree for each data found on Dolibarr members module.
-LDAPDescValues=Example values are designed for OpenLDAP with following loaded schemas: core.schema, cosine.schema, inetorgperson.schema). If you use thoose values and OpenLDAP, modify your LDAP config file slapd.conf to have all thoose schemas loaded.
-ForANonAnonymousAccess=For an authenticated acces (for a write access for example)
-##### Products #####
-ProductSetup=Ρυθμίσεις αρθρώματος προϊόντων
-SyslogSimpleFile=Αρχείο
-BarcodeSetup=Ρυθμίσεις Barcode
-##### Tax #####
-TaxSetup=Taxes, social contributions and dividends module setup
-OptionVatMode=VAT due
-OptionVATDefault=Standard
-OptionVATDebitOption=Option services on Debit
-OptionVatDefaultDesc=VAT is due: - on delivery/payments for goods - on payments for services
-OptionVatDebitOptionDesc=VAT is due: - on delivery/payments for goods - on invoice (debit) for services
-SummaryOfVatExigibilityUsedByDefault=Time of VAT exigibility by default according to choosed option:
OnDelivery=Κατά την αποστολή
OnPayment=Κατά την πληρωμή
OnInvoice=Κατά την έκδοση τιμ/γίου
@@ -623,8 +314,6 @@ MAIN_SMS_SENDMODE=Μέθοδος να χρησιμοποιήσετε για τη
MAIN_MAIL_SMS_FROM=Προεπιλογή αριθμού τηλεφώνου αποστολέα για την αποστολή SMS
TestSubmitForm=Είσοδος μορφή δοκιμή
ThemeDir=Δέρματα κατάλογο
-ConnectionTimeout=Timeout Connexion
-ResponseTimeout=Timeout Response
SmsTestMessage=Δοκιμαστικό μήνυμα από __PHONEFROM__ να __PHONETO__
ModuleMustBeEnabledFirst=%s Ενότητα πρέπει να είναι ενεργοποιημένα πρώτη φορά πριν τη χρήση αυτής της δυνατότητας.
SecurityToken=Security Token
diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang
index 60c38ade196..d019dcb93be 100644
--- a/htdocs/langs/en_GB/bills.lang
+++ b/htdocs/langs/en_GB/bills.lang
@@ -14,6 +14,7 @@ ChequesReceipts=Cheques receipts
ChequesArea=Cheques deposits area
ChequeDeposits=Cheques deposits
Cheques=Cheques
+BankCode=Sort code
# PaymentConditions
PaymentConditionShortRECEP=Due on Receipt
diff --git a/htdocs/langs/en_GB/exports.lang b/htdocs/langs/en_GB/exports.lang
new file mode 100644
index 00000000000..60436970774
--- /dev/null
+++ b/htdocs/langs/en_GB/exports.lang
@@ -0,0 +1,3 @@
+# Dolibarr language file - en_GB - exports
+CHARSET=UTF-8
+BankCode=Sort code
\ No newline at end of file
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index acf2a6095aa..96985683d62 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -867,7 +867,7 @@ NoEventFoundWithCriteria=No security event has been found for such search criter
SeeLocalSendMailSetup=See your local sendmail setup
BackupDesc=To make a complete backup of Dolibarr, you must:
BackupDesc2=* Save content of documents directory (%s) that contains all uploaded and generated files (you can make a zip for example).
-BackupDesc3=* Save content of your database into a dump file. for this, you can use following assistant.
+BackupDesc3=* Save content of your database into a dump file. For this, you can use following assistant.
BackupDescX=Archived directory should be stored in a secure place.
BackupDescY=The generated dump file should be stored in a secure place.
BackupPHPWarning=Backup can't be guaranted with this method. Prefer previous one
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 8b2d9284824..d978b2cc59d 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -2537,8 +2537,12 @@ class Societe extends CommonObject
$this->name = 'THIRDPARTY SPECIMEN '.dol_print_date($now,'dayhourlog');
$this->nom = $this->name; // For backward compatibility
$this->specimen=1;
+ $this->address='21 jump street';
$this->zip='99999';
$this->town='MyTown';
+ $this->state_id=1;
+ $this->state_code='AA';
+ $this->state='MyState';
$this->country_id=1;
$this->country_code='FR';
diff --git a/htdocs/user/fiche.php b/htdocs/user/fiche.php
index ed3e9b36928..3921afa6a6b 100644
--- a/htdocs/user/fiche.php
+++ b/htdocs/user/fiche.php
@@ -1146,7 +1146,7 @@ else
// Signature
print '| '.$langs->trans('Signature').' | ';
- print dol_textishtml($fuser->signature)?$fuser->signature:dol_nl2br($fuser->signature,1,true);
+ print dol_textishtml($fuser->signature)?$fuser->signature:dol_nl2br($fuser->signature,1,false);
print " | \n";
// Statut
diff --git a/test/phpunit/FunctionsTest.php b/test/phpunit/FunctionsTest.php
index 67aee8988a7..9dc7ff30580 100755
--- a/test/phpunit/FunctionsTest.php
+++ b/test/phpunit/FunctionsTest.php
@@ -388,6 +388,35 @@ class FunctionsTest extends PHPUnit_Framework_TestCase
}
+ /**
+ * testDolFormatAddress
+ *
+ * @return void
+ */
+ public function testDolFormatAddress()
+ {
+ global $conf,$user,$langs,$db;
+ $conf=$this->savconf;
+ $user=$this->savuser;
+ $langs=$this->savlangs;
+ $db=$this->savdb;
+
+ $object=new Societe($db);
+ $object->initAsSpecimen();
+
+ $object->country_code='FR';
+ $address=dol_format_address($object);
+ $this->assertEquals("21 jump street\n99999 MyTown",$address);
+
+ $object->country_code='GB';
+ $address=dol_format_address($object);
+ $this->assertEquals("21 jump street\nMyTown, MyState\n99999",$address);
+
+ $object->country_code='US';
+ $address=dol_format_address($object);
+ $this->assertEquals("21 jump street\nMyTown, MyState, 99999",$address);
+ }
+
/**
* testImgPicto
*
|