diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 64e5d499197..eefe51a120f 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -56,7 +56,7 @@ class Account extends CommonObject var $number; //! Cle de controle du RIB var $cle_rib; - //! Numero BIC du compte + //! Numero BIC/SWIFT du compte var $bic; //! Prefix IBAN a utiliser pour creer la cle IBAN International Bank Account Number var $iban_prefix; diff --git a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php index 0f6bc2b6fdd..638db50c203 100644 --- a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php +++ b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php @@ -412,9 +412,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $pdf->SetXY ($this->marges['g'], $cury+12); $pdf->MultiCell(90, 3, "Domiciliation : " . $account->domiciliation, 0, 'L', 0); $pdf->SetXY ($this->marges['g'], $cury+22); - $pdf->MultiCell(90, 3, "Prefix IBAN : " . $account->iban_prefix, 0, 'L', 0); + $pdf->MultiCell(90, 3, $outputlangs->trans("IBAN")." : " . $account->iban_prefix, 0, 'L', 0); $pdf->SetXY ($this->marges['g'], $cury+25); - $pdf->MultiCell(90, 3, "BIC : " . $account->bic, 0, 'L', 0); + $pdf->MultiCell(90, 3, $outputlangs->trans("BIC")." : " . $account->bic, 0, 'L', 0); } } diff --git a/htdocs/includes/modules/facture/pdf_huitre.modules.php b/htdocs/includes/modules/facture/pdf_huitre.modules.php index 88b17f26b5f..c0f0a3db55b 100644 --- a/htdocs/includes/modules/facture/pdf_huitre.modules.php +++ b/htdocs/includes/modules/facture/pdf_huitre.modules.php @@ -62,11 +62,11 @@ class pdf_huitre extends ModelePDFFactures $this->page_largeur = 210; $this->page_hauteur = 297; $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; - + $this->marge_gauche=10; + $this->marge_droite=10; + $this->marge_haute=10; + $this->marge_basse=10; + $this->option_logo = 1; // Affiche logo FAC_PDF_LOGO $this->option_tva = 0; // Gere option tva FACTURE_TVAOPTION $this->option_modereg = 0; // Gere choix mode règlement FACTURE_CHQ_NUMBER, FACTURE_RIB_NUMBER @@ -96,7 +96,7 @@ class pdf_huitre extends ModelePDFFactures if (! is_object($outputlangs)) $outputlangs=$langs; // Force output charset to ISO, because, FPDF expect text encoded in ISO $outputlangs->charset_output=$outputlangs->character_set_client='ISO-8859-1'; - + $outputlangs->load("main"); $outputlangs->load("companies"); $outputlangs->load("bills"); @@ -108,49 +108,49 @@ class pdf_huitre extends ModelePDFFactures { // Définition de l'objet $fac (pour compatibilite ascendante) if (! is_object($fac)) - { - $id = $fac; - $fac = new Facture($this->db,"",$id); - $ret=$fac->fetch($id); - } + { + $id = $fac; + $fac = new Facture($this->db,"",$id); + $ret=$fac->fetch($id); + } - // Définition de $dir et $file - if ($fac->specimen) - { - $dir = $conf->facture->dir_output; - $file = $dir . "/SPECIMEN.pdf"; - } - else - { - $facref = sanitize_string($fac->ref); - $dir = $conf->facture->dir_output . "/" . $facref; - $file = $dir . "/" . $facref . ".pdf"; - } + // Définition de $dir et $file + if ($fac->specimen) + { + $dir = $conf->facture->dir_output; + $file = $dir . "/SPECIMEN.pdf"; + } + else + { + $facref = sanitize_string($fac->ref); + $dir = $conf->facture->dir_output . "/" . $facref; + $file = $dir . "/" . $facref . ".pdf"; + } - if (! file_exists($dir)) - { - if (create_exdir($dir) < 0) - { - $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session - return 0; - } - } + if (! file_exists($dir)) + { + if (create_exdir($dir) < 0) + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); + $langs->setPhpLang(); // On restaure langue session + return 0; + } + } - if (file_exists($dir)) - { - // Protection et encryption du pdf - if ($conf->global->PDF_SECURITY_ENCRYPTION) - { + if (file_exists($dir)) + { + // Protection et encryption du pdf + if ($conf->global->PDF_SECURITY_ENCRYPTION) + { $pdf=new FPDI_Protection('P','mm','A4'); $pdfrights = array('print'); // Ne permet que l'impression du document $pdfuserpass = ''; // Mot de passe pour l'utilisateur final $pdfownerpass = NULL; // Mot de passe du propriétaire, créé aléatoirement si pas défini $pdf->SetProtection($pdfrights,$pdfuserpass,$pdfownerpass); - } - else - { - $pdf=new FPDI('P','mm',$this->format); + } + else + { + $pdf=new FPDI('P','mm',$this->format); } $pdf->Open(); @@ -203,20 +203,20 @@ class pdf_huitre extends ModelePDFFactures if ($nexY > 200 && $i < $nblignes - 1) { - $this->_tableau($pdf, $tab_top, $tab_height, $nexY); - $pdf->AddPage(); - $nexY = $iniY; - $this->_pagehead($pdf, $fac, $outputlangs); - $pdf->SetTextColor(0,0,0); - $pdf->SetFont('Arial','', 10); + $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); + $pdf->AddPage(); + $nexY = $iniY; + $this->_pagehead($pdf, $fac, $outputlangs); + $pdf->SetTextColor(0,0,0); + $pdf->SetFont('Arial','', 10); } } - $this->_tableau($pdf, $tab_top, $tab_height, $nexY); + $this->_tableau($pdf, $tab_top, $tab_height, $nexY, $outputlangs); - $this->_tableau_tot($pdf, $fac); + $this->_tableau_tot($pdf, $fac, $outputlangs); - $this->_tableau_compl($pdf, $fac); + $this->_tableau_compl($pdf, $fac, $outputlangs); /* * @@ -225,20 +225,20 @@ class pdf_huitre extends ModelePDFFactures { if (FACTURE_RIB_NUMBER > 0) { - $account = new Account($this->db); - $account->fetch(FACTURE_RIB_NUMBER); + $account = new Account($this->db); + $account->fetch(FACTURE_RIB_NUMBER); - $pdf->SetXY (10, 40); - $pdf->SetFont('Arial','U',8); - $pdf->MultiCell(40, 4, $langs->transnoentities("BankDetails"), 0, 'L', 0); - $pdf->SetFont('Arial','',8); - $pdf->MultiCell(40, 4, $langs->transnoentities("BankCode").' : ' . $account->code_banque, 0, 'L', 0); - $pdf->MultiCell(40, 4, $langs->transnoentities("DeskCode").' : ' . $account->code_guichet, 0, 'L', 0); - $pdf->MultiCell(50, 4, $langs->transnoentities("BankAccountNumber").' : ' . $account->number, 0, 'L', 0); - $pdf->MultiCell(40, 4, $langs->transnoentities("BankAccountNumberKey").' : ' . $account->cle_rib, 0, 'L', 0); - $pdf->MultiCell(40, 4, $langs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0); - $pdf->MultiCell(40, 4, $langs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0); - $pdf->MultiCell(40, 4, $langs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0); + $pdf->SetXY (10, 40); + $pdf->SetFont('Arial','U',8); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankDetails"), 0, 'L', 0); + $pdf->SetFont('Arial','',8); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankCode").' : ' . $account->code_banque, 0, 'L', 0); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("DeskCode").' : ' . $account->code_guichet, 0, 'L', 0); + $pdf->MultiCell(50, 4, $outputlangs->transnoentities("BankAccountNumber").' : ' . $account->number, 0, 'L', 0); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("BankAccountNumberKey").' : ' . $account->cle_rib, 0, 'L', 0); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("Residence").' : ' . $account->domiciliation, 0, 'L', 0); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("IbanPrefix").' : ' . $account->iban_prefix, 0, 'L', 0); + $pdf->MultiCell(40, 4, $outputlangs->transnoentities("BIC").' : ' . $account->bic, 0, 'L', 0); } } @@ -251,7 +251,7 @@ class pdf_huitre extends ModelePDFFactures { $pdf->SetFont('Arial','',7); $pdf->SetXY(10, 211); - $note = $langs->transnoentities("Note").' : '.$fac->note_public; + $note = $outputlangs->transnoentities("Note").' : '.$fac->note_public; $pdf->MultiCell(110, 3, $note, 0, 'J'); } @@ -280,13 +280,13 @@ class pdf_huitre extends ModelePDFFactures $langs->setPhpLang(); // On restaure langue session return 1; // Pas d'erreur - } - else - { - $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); - $langs->setPhpLang(); // On restaure langue session - return 0; - } + } + else + { + $this->error=$langs->transnoentities("ErrorCanNotCreateDir",$dir); + $langs->setPhpLang(); // On restaure langue session + return 0; + } } else { @@ -343,7 +343,7 @@ class pdf_huitre extends ModelePDFFactures $this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c ', $x1*$this->k, ($h-$y1)*$this->k, $x2*$this->k, ($h-$y2)*$this->k, $x3*$this->k, ($h-$y3)*$this->k)); } - /////////////////////////////// + function _tableau_compl(&$pdf, $fac) { global $langs; @@ -377,7 +377,7 @@ class pdf_huitre extends ModelePDFFactures * \param pdf objet PDF * \param fac objet facture */ - function _tableau_tot(&$pdf, $fac) + function _tableau_tot(&$pdf, $fac, $outputlangs) { global $langs; $langs->load("main"); @@ -396,7 +396,7 @@ class pdf_huitre extends ModelePDFFactures // $pdf->line(132, $tab2_top + $tab2_height - 7, 200, $tab2_top + $tab2_height - 7 ); $pdf->SetXY (132, $tab2_top + 0); - $pdf->MultiCell(42, $tab2_hl, $langs->transnoentities("TotalHT"), 0, 'R', 0); + $pdf->MultiCell(42, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'R', 0); $pdf->SetXY (174, $tab2_top + 0); $pdf->MultiCell(26, $tab2_hl, price($fac->total_ht + $fac->remise), 0, 'R', 0); @@ -404,13 +404,13 @@ class pdf_huitre extends ModelePDFFactures $index = 1; $pdf->SetXY (132, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell(42, $tab2_hl, $langs->transnoentities("TotalVAT"), 0, 'R', 0); + $pdf->MultiCell(42, $tab2_hl, $outputlangs->transnoentities("TotalVAT"), 0, 'R', 0); $pdf->SetXY (174, $tab2_top + $tab2_hl * $index); $pdf->MultiCell(26, $tab2_hl, price($fac->total_tva), 0, 'R', 0); $pdf->SetXY (132, $tab2_top + $tab2_hl * ($index+1)); - $pdf->MultiCell(42, $tab2_hl, $langs->transnoentities("TotalTTC"), 0, 'R', 1); + $pdf->MultiCell(42, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), 0, 'R', 1); $pdf->SetXY (174, $tab2_top + $tab2_hl * ($index+1)); $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc), 0, 'R', 1); @@ -420,13 +420,13 @@ class pdf_huitre extends ModelePDFFactures if ($deja_regle > 0) { $pdf->SetXY (132, $tab2_top + $tab2_hl * ($index+2)); - $pdf->MultiCell(42, $tab2_hl, $langs->transnoentities("AlreadyPayed"), 0, 'R', 0); + $pdf->MultiCell(42, $tab2_hl, $outputlangs->transnoentities("AlreadyPayed"), 0, 'R', 0); $pdf->SetXY (174, $tab2_top + $tab2_hl * ($index+2)); $pdf->MultiCell(26, $tab2_hl, price($deja_regle), 0, 'R', 0); $pdf->SetXY (132, $tab2_top + $tab2_hl * ($index+3)); - $pdf->MultiCell(42, $tab2_hl, $langs->transnoentities("RemainderToPay"), 0, 'R', 1); + $pdf->MultiCell(42, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), 0, 'R', 1); $pdf->SetXY (174, $tab2_top + $tab2_hl * ($index+3)); $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc - $deja_regle), 0, 'R', 1); @@ -436,7 +436,7 @@ class pdf_huitre extends ModelePDFFactures * \brief Affiche la grille des lignes de factures * \param pdf objet PDF */ - function _tableau(&$pdf, $tab_top, $tab_height, $nexY) + function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs) { global $langs; $langs->load("main"); @@ -444,19 +444,19 @@ class pdf_huitre extends ModelePDFFactures $pdf->SetFont('Arial','',10); - $pdf->Text(11,$tab_top + 5,$langs->transnoentities("Designation")); + $pdf->Text(11,$tab_top + 5,$outputlangs->transnoentities("Designation")); $pdf->line(132, $tab_top, 132, $tab_top + $tab_height); - $pdf->Text(134,$tab_top + 5,$langs->transnoentities("VAT")); + $pdf->Text(134,$tab_top + 5,$outputlangs->transnoentities("VAT")); $pdf->line(144, $tab_top, 144, $tab_top + $tab_height); - $pdf->Text(147,$tab_top + 5,$langs->transnoentities("Qty")); + $pdf->Text(147,$tab_top + 5,$outputlangs->transnoentities("Qty")); $pdf->line(156, $tab_top, 156, $tab_top + $tab_height); - $pdf->Text(160,$tab_top + 5,$langs->transnoentities("PriceU")); + $pdf->Text(160,$tab_top + 5,$outputlangs->transnoentities("PriceU")); $pdf->line(174, $tab_top, 174, $tab_top + $tab_height); - $pdf->Text(187,$tab_top + 5,$langs->transnoentities("Total")); + $pdf->Text(187,$tab_top + 5,$outputlangs->transnoentities("Total")); $pdf->Rect(10, $tab_top, 190, $tab_height); $pdf->line(10, $tab_top + 10, 200, $tab_top + 10 ); @@ -601,10 +601,11 @@ class pdf_huitre extends ModelePDFFactures } - /* - * \brief Affiche le pied de page de la facture - * \param pdf objet PDF - * \param fac objet facture + /** + * \brief Affiche le pied de page de la facture + * \param pdf object PDF + * \param fac object invoice + * \param outputlangs object langs */ function _pagefoot(&$pdf, $fac, $outputlangs) { diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index d562b327840..1029f268f0b 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -29,7 +29,7 @@ ShowAllTimeBalance=Show balance from start Reconciliation=Reconciliation RIB=RIB IBAN=IBAN number -BIC=BIC number +BIC=BIC/SWIFT number StandingOrders=Standing orders StandingOrder=Standing order Withdrawals=Withdrawals diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index eebd670c905..fd6a994726e 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -276,7 +276,7 @@ BankAccountNumberKey=Key Residence=Domiciliation IbanPrefix=IBAN number IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT ExtraInfos=Extra infos RegulatedOn=Regulated on ChequeNumber=Cheque N° diff --git a/htdocs/langs/es_ES/banks.lang b/htdocs/langs/es_ES/banks.lang index a161dfc1b37..2b2c2e46c77 100644 --- a/htdocs/langs/es_ES/banks.lang +++ b/htdocs/langs/es_ES/banks.lang @@ -29,7 +29,7 @@ ShowAllTimeBalance=Mostar balance desde principio Reconciliation=Conciliación RIB=CCC IBAN=Identificador IBAN -BIC=Identificador BIC +BIC=Identificador BIC/SWIFT StandingOrders=Domiciliaciones StandingOrder=Domiciliación Withdrawals=Reintregros diff --git a/htdocs/langs/es_ES/bills.lang b/htdocs/langs/es_ES/bills.lang index 88c4d67145c..381dd64dc79 100644 --- a/htdocs/langs/es_ES/bills.lang +++ b/htdocs/langs/es_ES/bills.lang @@ -299,7 +299,7 @@ BankAccountNumberKey=Llave RIB Residence=Domiciliación IbanPrefix=Prefijo IBAN IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT ExtraInfos=Informaciones complementarias RegulatedOn=Pagar el ChequeNumber=Cheque nº diff --git a/htdocs/langs/fr_BE/banks.lang b/htdocs/langs/fr_BE/banks.lang index 1c7069236d6..34160c52727 100644 --- a/htdocs/langs/fr_BE/banks.lang +++ b/htdocs/langs/fr_BE/banks.lang @@ -24,7 +24,7 @@ EndBankBalance= CurrentBalance=Équilibre courant RIB=RIB IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT StandingOrders=Ordres permanents StandingOrder=Ordre permanent Withdrawals=Retraits diff --git a/htdocs/langs/fr_BE/bills.lang b/htdocs/langs/fr_BE/bills.lang index 9acb0c44084..1f0f94b0840 100644 --- a/htdocs/langs/fr_BE/bills.lang +++ b/htdocs/langs/fr_BE/bills.lang @@ -217,7 +217,7 @@ BankAccountNumberKey=Cl Residence=Domiciliation IbanPrefix=Prefix IBAN IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT ExtraInfos=Informations complémentaires RegulatedOn=Réglé le ChequeNumber=Chèque N° diff --git a/htdocs/langs/fr_FR/banks.lang b/htdocs/langs/fr_FR/banks.lang index 885167b3a28..b6f5e055f66 100644 --- a/htdocs/langs/fr_FR/banks.lang +++ b/htdocs/langs/fr_FR/banks.lang @@ -29,7 +29,7 @@ ShowAllTimeBalance=Afficher solde depuis debut Reconciliation=Rapprochement RIB=RIB IBAN=Identifiant IBAN -BIC=Identifiant BIC +BIC=Identifiant BIC/SWIFT StandingOrders=Prélèvements StandingOrder=Prélèvement Withdrawals=Retraits diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index ad7b145f8f1..b4686cfaba9 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -277,7 +277,7 @@ BankAccountNumberKey=Cl Residence=Domiciliation IbanPrefix=Prefix IBAN IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT ExtraInfos=Informations complémentaires RegulatedOn=Réglé le ChequeNumber=Chèque N° diff --git a/htdocs/langs/it_IT/bills.lang b/htdocs/langs/it_IT/bills.lang index c9debef840c..e9712a38187 100644 --- a/htdocs/langs/it_IT/bills.lang +++ b/htdocs/langs/it_IT/bills.lang @@ -272,7 +272,7 @@ BankAccountNumberKey =Chiave Residence =Domiciliazione IbanPrefix =Codice IBAN IBAN =IBAN -BIC =BIC +BIC =BIC/SWIFT ExtraInfos =Extra info RegulatedOn =Regolamentato su ChequeNumber =Assegno N° diff --git a/htdocs/langs/nl_BE/bills.lang b/htdocs/langs/nl_BE/bills.lang index 39f9c9d7301..12b8faad7d3 100644 --- a/htdocs/langs/nl_BE/bills.lang +++ b/htdocs/langs/nl_BE/bills.lang @@ -223,7 +223,7 @@ BankAccountNumberKey=Key Residence=Domiciliation IbanPrefix=IBAN nummer IBAN=IBAN -BIC=BIC +BIC=BIC/SWIFT ExtraInfos=Extra info RegulatedOn=Regulariseerd op ChequeNumber=Cheque N° diff --git a/htdocs/langs/pt_PT/banks.lang b/htdocs/langs/pt_PT/banks.lang index 9c87a33bbbc..c382d7b6db1 100644 --- a/htdocs/langs/pt_PT/banks.lang +++ b/htdocs/langs/pt_PT/banks.lang @@ -6,7 +6,7 @@ BankAccounts=Contas banc MainAccount=Conta principal RIB=RIB IBAN=Número IBAN -BIC=Número BIC +BIC=Número BIC/SWIFT StandingOrders=Compras pendentes StandingOrder=Compra pendente Withdrawals=Levantamentos