From 880a27f827483b80af304d6470d5f2050d5df529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Tue, 4 Jun 2013 18:40:46 +0200 Subject: [PATCH 01/18] Fixed field name --- htdocs/societe/societe.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index 4e4374fc69a..89187914c04 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -98,7 +98,7 @@ if ($mode == 'search') if ($search_categ) $sql.= " AND s.rowid = cs.fk_societe"; // Join for the needed table to filter by categ if (! $user->rights->societe->lire || ! $user->rights->fournisseur->lire) { - if (! $user->rights->fournisseur->lire) $sql.=" AND s.fourn != 1"; + if (! $user->rights->fournisseur->lire) $sql.=" AND s.fournisseur != 1"; } // Insert sale filter if ($search_sale) From a4841dacda59fec0e7a04d719dfc72648c84276f Mon Sep 17 00:00:00 2001 From: simnandez Date: Wed, 5 Jun 2013 15:09:13 +0200 Subject: [PATCH 02/18] Fix: Warning missing argument 2 into withdrawals --- htdocs/compta/prelevement/rejets.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 6cd04c95162..bebc56abbeb 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -1,7 +1,7 @@ * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2005-2012 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify @@ -57,7 +57,7 @@ if ($sortorder == "") $sortorder="DESC"; if ($sortfield == "") $sortfield="p.datec"; $rej = new RejetPrelevement($db, $user); -$ligne = new LignePrelevement($db); +$ligne = new LignePrelevement($db, $user); /* * Liste des factures From dd43f7a89021396eafc0e7b7e7e5abe7adb747ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 7 Jun 2013 19:12:38 +0200 Subject: [PATCH 03/18] Fix: memory not freed --- htdocs/cashdesk/facturation.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index e70b4ed3483..e4f23785a97 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -55,6 +55,7 @@ if ( GETPOST('filtre') ) { } $i++; } + $db->free($resql); } else { @@ -90,6 +91,7 @@ if ( GETPOST('filtre') ) { } $i++; } + $db->free($resql); } else { @@ -147,6 +149,7 @@ if ($res) } $i++; } + $db->free($resql); } else { From 3c9fef8eea0ec44a60203ffbec53c18f76bb745e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 01:33:16 +0200 Subject: [PATCH 04/18] Fix: choice of percentage was lost --- htdocs/comm/action/fiche.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 4b438786d56..3fe597d5c66 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -494,7 +494,11 @@ if ($action == 'create') print ''.$langs->trans("Status").' / '.$langs->trans("Percentage").''; print ''; $percent=-1; - if (isset($_GET['percentage']) || isset($_POST['percentage'])) + if (isset($_GET['status']) || isset($_POST['status'])) + { + $percent=GETPOST('status'); + } + else if (isset($_GET['percentage']) || isset($_POST['percentage'])) { $percent=GETPOST('percentage'); } From afbe6c1808ba68f35c49fa74b1c3251229affcba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 14:56:40 +0200 Subject: [PATCH 05/18] Fix: translation --- htdocs/langs/en_US/main.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 64f8fbd44cf..8a297b6adce 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -19,7 +19,7 @@ FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p DatabaseConnection=Database connection NoTranslation=No translation -NoRecordFound=Aucun enregistrement trouvé +NoRecordFound=No record found NoError=No error Error=Error ErrorFieldRequired=Field '%s' is required From 2c71c898ebba584942aad5d548488919fbad6ca6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 15:21:47 +0200 Subject: [PATCH 06/18] Fix: param lang not provided to price function --- htdocs/core/lib/pdf.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index ad1fa61a54d..d6d846c2b23 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1118,7 +1118,7 @@ function pdf_getlineupexcltax($object,$i,$outputlangs,$hidedetails=0,$hookmanage } else { - if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->subprice); + if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->subprice, 0, $outputlangs); } } @@ -1144,7 +1144,7 @@ function pdf_getlineupwithtax($object,$i,$outputlangs,$hidedetails=0) } else { - if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100); + if (empty($hidedetails) || $hidedetails > 1) return price(($object->lines[$i]->subprice) + ($object->lines[$i]->subprice)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs); } } @@ -1328,7 +1328,7 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0,$hookman } else { - if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->total_ht); + if (empty($hidedetails) || $hidedetails > 1) return price($sign * $object->lines[$i]->total_ht, 0, $outputlangs); } } } @@ -1362,7 +1362,7 @@ function pdf_getlinetotalwithtax($object,$i,$outputlangs,$hidedetails=0) else { if (empty($hidedetails) || $hidedetails > 1) return - price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100); + price(($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht)*($object->lines[$i]->tva_tx)/100, 0, $outputlangs); } } } From e13974b5f3df5f0df542fe923b7eef5b39701fab Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 15:29:27 +0200 Subject: [PATCH 07/18] Fix: tcpdf bug --- htdocs/includes/tcpdf/tcpdf.php | 42 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/includes/tcpdf/tcpdf.php b/htdocs/includes/tcpdf/tcpdf.php index a2fe57578e1..aee6fedeef3 100644 --- a/htdocs/includes/tcpdf/tcpdf.php +++ b/htdocs/includes/tcpdf/tcpdf.php @@ -76,7 +76,7 @@ // dullus for text Justification. // Bob Vincent (pillarsdotnet@users.sourceforge.net) for
  • value attribute. // Patrick Benny for text stretch suggestion on Cell(). -// Johannes Gntert for JavaScript support. +// Johannes G�ntert for JavaScript support. // Denis Van Nuffelen for Dynamic Form. // Jacek Czekaj for multibyte justification // Anthony Ferrara for the reintroduction of legacy image methods. @@ -87,7 +87,7 @@ // Mohamad Ali Golkar, Saleh AlMatrafe, Charles Abbott for Arabic and Persian support. // Moritz Wagner and Andreas Wurmser for graphic functions. // Andrew Whitehead for core fonts support. -// Esteban Jol Marn for OpenType font conversion. +// Esteban Jo�l Mar�n for OpenType font conversion. // Teus Hagen for several suggestions and fixes. // Yukihiro Nakadaira for CID-0 CJK fonts fixes. // Kosmas Papachristos for some CSS improvements. @@ -5324,7 +5324,7 @@ class TCPDF { $cbbox = array(); } // initialize subsetchars - $subsetchars = array(); + $subsetchars = array_fill(0, 256, true); $this->setFontBuffer($fontkey, array('fontkey' => $fontkey, 'i' => $this->numfonts, 'type' => $type, 'name' => $name, 'desc' => $desc, 'up' => $up, 'ut' => $ut, 'cw' => $cw, 'cbbox' => $cbbox, 'dw' => $dw, 'enc' => $enc, 'cidinfo' => $cidinfo, 'file' => $file, 'ctg' => $ctg, 'subset' => $subset, 'subsetchars' => $subsetchars)); if ($this->inxobj) { // we are inside an XObject template @@ -7123,7 +7123,7 @@ class TCPDF { * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Alexander Escalona Fernndez, Nicola Asuni + * @author Alexander Escalona Fern�ndez, Nicola Asuni * @public * @since 4.5.011 */ @@ -7230,7 +7230,7 @@ class TCPDF { * @param $cellpadding (float) Internal cell padding, if empty uses default cell padding. * @param $border (mixed) Indicates if borders must be drawn around the cell. The value can be a number:
    • 0: no border (default)
    • 1: frame
    or a string containing some or all of the following characters (in any order):
    • L: left
    • T: top
    • R: right
    • B: bottom
    or an array of line styles for each border group - for example: array('LTRB' => array('width' => 2, 'cap' => 'butt', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0))) * @return float Return the minimal height needed for multicell method for printing the $txt param. - * @author Nicola Asuni, Alexander Escalona Fernndez + * @author Nicola Asuni, Alexander Escalona Fern�ndez * @public */ public function getStringHeight($w, $txt, $reseth=false, $autopadding=true, $cellpadding='', $border=0) { @@ -15417,7 +15417,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x1 (float) Abscissa of control point 1. * @param $y1 (float) Ordinate of control point 1. @@ -15435,7 +15435,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using the current point and (x2, y2) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x2 (float) Abscissa of control point 2. * @param $y2 (float) Ordinate of control point 2. @@ -15451,7 +15451,7 @@ class TCPDF { } /** - * Append a cubic Bzier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the Bzier control points. + * Append a cubic B�zier curve to the current path. The curve shall extend from the current point to the point (x3, y3), using (x1, y1) and (x3, y3) as the B�zier control points. * The new current point shall be (x3, y3). * @param $x1 (float) Abscissa of control point 1. * @param $y1 (float) Ordinate of control point 1. @@ -16855,7 +16855,7 @@ class TCPDF { /** * Insert Named Destinations. * @protected - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 5.9.098 (2011-06-23) */ protected function _putdests() { @@ -17054,7 +17054,7 @@ class TCPDF { * Adds a javascript * @param $script (string) Javascript code * @public - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ public function IncludeJS($script) { @@ -17083,7 +17083,7 @@ class TCPDF { /** * Create a javascript PDF string. * @protected - * @author Johannes Gntert, Nicola Asuni + * @author Johannes G�ntert, Nicola Asuni * @since 2.1.002 (2008-02-12) */ protected function _putjavascript() { @@ -19146,7 +19146,7 @@ class TCPDF { * @param $col1 (array) first color (Grayscale, RGB or CMYK components). * @param $col2 (array) second color (Grayscale, RGB or CMYK components). * @param $coords (array) array of the form (x1, y1, x2, y2) which defines the gradient vector (see linear_gradient_coords.jpg). The default value is from left to right (x1=0, y1=0, x2=1, y2=0). - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19164,7 +19164,7 @@ class TCPDF { * @param $col1 (array) first color (Grayscale, RGB or CMYK components). * @param $col2 (array) second color (Grayscale, RGB or CMYK components). * @param $coords (array) array of the form (fx, fy, cx, cy, r) where (fx, fy) is the starting point of the gradient with color1, (cx, cy) is the center of the circle with color2, and r is the radius of the circle (see radial_gradient_coords.jpg). (fx, fy) should be inside the circle, otherwise some areas will not be defined. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19187,7 +19187,7 @@ class TCPDF { * @param $coords_min (array) minimum value used by the coordinates. If a coordinate's value is smaller than this it will be cut to coords_min. default: 0 * @param $coords_max (array) maximum value used by the coordinates. If a coordinate's value is greater than this it will be cut to coords_max. default: 1 * @param $antialias (boolean) A flag indicating whether to filter the shading function to prevent aliasing artifacts. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @public */ @@ -19279,7 +19279,7 @@ class TCPDF { * @param $y (float) ordinate of the top left corner of the rectangle. * @param $w (float) width of the rectangle. * @param $h (float) height of the rectangle. - * @author Andreas Wrmser, Nicola Asuni + * @author Andreas W�rmser, Nicola Asuni * @since 3.1.000 (2008-06-09) * @protected */ @@ -20797,19 +20797,19 @@ class TCPDF { // remove empty blocks $cssdata = preg_replace('/([^\}\{]+)\{\}/', '', $cssdata); // replace media type parenthesis - $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1', $cssdata); - $cssdata = preg_replace('/\}\}/si', '}', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\{]*)\{/i', '@media \\1�', $cssdata); + $cssdata = preg_replace('/\}\}/si', '}�', $cssdata); // trim string $cssdata = trim($cssdata); // find media blocks (all, braille, embossed, handheld, print, projection, screen, speech, tty, tv) $cssblocks = array(); $matches = array(); - if (preg_match_all('/@media[\s]+([^\]*)([^]*)/i', $cssdata, $matches) > 0) { + if (preg_match_all('/@media[\s]+([^\�]*)�([^�]*)�/i', $cssdata, $matches) > 0) { foreach ($matches[1] as $key => $type) { $cssblocks[$type] = $matches[2][$key]; } // remove media blocks - $cssdata = preg_replace('/@media[\s]+([^\]*)([^]*)/i', '', $cssdata); + $cssdata = preg_replace('/@media[\s]+([^\�]*)�([^�]*)�/i', '', $cssdata); } // keep 'all' and 'print' media, other media types are discarded if (isset($cssblocks['all']) AND !empty($cssblocks['all'])) { @@ -29032,7 +29032,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'Q': { // quadratic Bzier curveto + case 'Q': { // quadratic B�zier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if ((($ck + 1) % 4) == 0) { @@ -29058,7 +29058,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } break; } - case 'T': { // shorthand/smooth quadratic Bzier curveto + case 'T': { // shorthand/smooth quadratic B�zier curveto foreach ($params as $ck => $cp) { $params[$ck] = $cp; if (($ck % 2) != 0) { From 0ffb01e3477b4ada8f1ddbeef95845567daca2e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 16:35:52 +0200 Subject: [PATCH 08/18] Fix: Remove duplicate key --- htdocs/langs/el_GR/other.lang | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/langs/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index b3c717c3550..1afefb9578e 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -109,7 +109,6 @@ ToExport=Export NewExport=New export ##### External sites ##### ExternalSites=External sites -FONTFORPDF=Freemono // START - Lines generated via autotranslator.php tool (2011-06-26 15:35:22). From 49dcc32374b89d4410ba16e3861aa21c67abe1d2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 8 Jun 2013 16:53:26 +0200 Subject: [PATCH 09/18] Fix: Param lang forbidden into price function --- .../commande/doc/pdf_einstein.modules.php | 22 +++++++------- .../modules/facture/doc/pdf_crabe.modules.php | 30 +++++++++---------- .../modules/propale/doc/pdf_azur.modules.php | 24 +++++++-------- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index f13af05b108..5e4d5d1395c 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -702,7 +702,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -743,7 +743,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -776,7 +776,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -803,7 +803,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -834,14 +834,14 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -874,7 +874,7 @@ class pdf_einstein extends ModelePDFCommandes if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -882,7 +882,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -897,7 +897,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -919,7 +919,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); $index++; $pdf->SetTextColor(0,0,60); @@ -928,7 +928,7 @@ class pdf_einstein extends ModelePDFCommandes $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index d5cafd460c2..453860ba192 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -589,7 +589,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($obj->datef,'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); - $pdf->MultiCell(20, 3, price($obj->amount_ttc), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($obj->amount_ttc, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y); $pdf->MultiCell(20, 3, $text, 0, 'L', 0); $pdf->SetXY($tab3_posx+58, $tab3_top+$y); @@ -626,7 +626,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($tab3_posx, $tab3_top+$y); $pdf->MultiCell(20, 3, dol_print_date($this->db->jdate($row->date),'day',false,$outputlangs,true), 0, 'L', 0); $pdf->SetXY($tab3_posx+21, $tab3_top+$y); - $pdf->MultiCell(20, 3, price($sign * $row->amount), 0, 'L', 0); + $pdf->MultiCell(20, 3, price($sign * $row->amount, 0, $outputlangs), 0, 'L', 0); $pdf->SetXY($tab3_posx+40, $tab3_top+$y); $oper = $outputlangs->transnoentitiesnoconv("PaymentTypeShort" . $row->code); @@ -832,7 +832,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + 0); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($object->total_ht + (! empty($object->remise)?$object->remise:0))), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * ($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -874,7 +874,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -908,7 +908,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -935,7 +935,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -966,14 +966,14 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -1007,7 +1007,7 @@ class pdf_crabe extends ModelePDFFactures if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -1015,7 +1015,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -1030,7 +1030,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -1049,7 +1049,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("Paid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle + $depositsamount, 0, $outputlangs), 0, 'R', 0); // Credit note if ($creditnoteamount) @@ -1058,7 +1058,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("CreditNotes"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($creditnoteamount, 0, $outputlangs), 0, 'R', 0); } // Escompte @@ -1070,7 +1070,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle - $creditnoteamount - $depositsamount, 0, $outputlangs), $useborder, 'R', 1); $resteapayer=0; } @@ -1081,7 +1081,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index); $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); // Fin $pdf->SetFont('','', $default_font_size - 1); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index b62a6fe01f6..8de154861ac 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -735,7 +735,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalHT"), 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + 0); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0)), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ht + (! empty($object->remise)?$object->remise:0), 0, $outputlangs), 0, 'R', 1); // Show VAT by rates and total $pdf->SetFillColor(248,248,248); @@ -777,7 +777,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -811,7 +811,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -838,7 +838,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } @@ -869,14 +869,14 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { $totalvat.=vatrate(abs($tvakey),1).$tvacompl; $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -909,7 +909,7 @@ class pdf_azur extends ModelePDFPropales if ($localtax_type == '7') { // amount on order $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvakey, 0, $outputlangs), 0, 'R', 1); } else { @@ -917,7 +917,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); } } } @@ -932,7 +932,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc, 0, $outputlangs), $useborder, 'R', 1); } } @@ -951,7 +951,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("AlreadyPaid"), 0, 'L', 0); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle), 0, 'R', 0); + $pdf->MultiCell($largcol2, $tab2_hl, price($deja_regle, 0, $outputlangs), 0, 'R', 0); /* if ($object->close_code == 'discount_vat') @@ -963,7 +963,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("EscompteOffered"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc - $deja_regle, 0, $outputlangs), $useborder, 'R', 1); $resteapayer=0; } @@ -976,7 +976,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RemainderToPay"), $useborder, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer), $useborder, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($resteapayer, 0, $outputlangs), $useborder, 'R', 1); $pdf->SetFont('','', $default_font_size - 1); $pdf->SetTextColor(0,0,0); From 532c56002d35430225ed63579671464edfdcfefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 19:07:13 +0200 Subject: [PATCH 10/18] Entities problem with error message in predefined invoice creation --- htdocs/compta/facture/fiche-rec.php | 4 ++-- test/phpunit/NumberingModulesTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 54d0c800920..67b36fdc586 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -65,7 +65,7 @@ if ($action == 'add') { if (! GETPOST('titre')) { - setEventMessage($langs->trans("ErrorFieldRequired",$langs->trans("Title")), 'errors'); + setEventMessage($langs->transnoentities("ErrorFieldRequired",$langs->trans("Title")), 'errors'); $action = "create"; $error++; } @@ -138,7 +138,7 @@ if ($action == 'create') print ''; // Title - print ''.$langs->trans("Title").''; + print ''.$langs->trans("Title").''; print ''; print ''; diff --git a/test/phpunit/NumberingModulesTest.php b/test/phpunit/NumberingModulesTest.php index 5e93e32fe22..0700c784bae 100644 --- a/test/phpunit/NumberingModulesTest.php +++ b/test/phpunit/NumberingModulesTest.php @@ -212,9 +212,9 @@ class NumberingModulesTest extends PHPUnit_Framework_TestCase $this->assertEquals(1, $result); // Case 1 can be deleted (because there was a reset for case 2) // Try an offset when an invoice already exists - $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; - $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; - $result=$numbering->getNextValue($mysoc, $localobject2); + $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000+9990}'; + $conf->global->FACTURE_MERCURE_MASK_INVOICE='{yyyy}{mm}-{0000+9990}'; + $result=$numbering->getNextValue($mysoc, $localobject2); // Now we try with a different fiscal month (forced by mask) $conf->global->FACTURE_MERCURE_MASK_CREDIT='{yyyy}{mm}-{0000@6}'; From 3cff899b44d636eab5a3502918c223858b7344d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 20:01:51 +0200 Subject: [PATCH 11/18] Removed debug message and wrong translation key --- htdocs/compta/facture/stats/index.php | 6 +++--- htdocs/product/composition/fiche.php | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 4abff5b63be..895cadbf2d9 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -54,8 +54,8 @@ $endyear=$year; * View */ -$langs->load("bills"); -$langs->load("companies"); +$langs->load("bills"); +$langs->load("companies"); $form=new Form($db); @@ -233,7 +233,7 @@ print '
    '; print $form->select_company($socid,'socid',$filter,1); print ''; // User - print ''.$langs->trans("CreatedBy").''; + print ''.$langs->trans("Author").''; print $form->select_users($userid,'userid',1); print ''; // Year diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 71ce35c76e1..644c321b8bb 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -72,7 +72,6 @@ $cancel <> $langs->trans("Cancel") && $error=0; for($i=0;$i<$_POST["max_prod"];$i++) { - print "
    : ".$_POST["prod_id_chk".$i]; if ($_POST["prod_id_chk".$i] > 0) { if($product->add_sousproduit($id, $_POST["prod_id_".$i],$_POST["prod_qty_".$i]) > 0) From 000de9530d5d5bff59efe3d46d202c39224c3ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 20:15:48 +0200 Subject: [PATCH 12/18] Fixed wrong translation key and and improved es_ES translations --- htdocs/langs/es_ES/products.lang | 10 ++++++---- htdocs/product/fiche.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 66d64d3d4ff..f7ae35cc0db 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -84,10 +84,10 @@ ShowService=Mostrar servicio ProductsAndServicesArea=Área productos y servicios ProductsArea=Área Productos ServicesArea=Área Servicios -AddToMyProposals=Adjuntar a mis presupuestos -AddToOtherProposals=Adjuntar a otros presupuestos -AddToMyBills=Adjuntar a mis facturas -AddToOtherBills=Adjuntar a otras facturas +AddToMyProposals=Añadir a mis presupuestos +AddToOtherProposals=Añadir a otros presupuestos +AddToMyBills=Añadir a mis facturas +AddToOtherBills=Añadir a otras facturas CorrectStock=Corregir stock AddPhoto=Adjuntar una foto ListOfStockMovements=Listado de movimientos de stock @@ -114,6 +114,8 @@ AssociatedProductsAbility=Activar productos compuestos AssociatedProducts=Productos compuestos AssociatedProductsNumber=Nº de productos que componen este producto ParentProductsNumber=Nº de productos que este producto compone +IfZeroItIsNotAVirtualProduct=Si 0, este producto no es un producto virtual +IfZeroItIsNotUsedByVirtualProduct=Si 0, este producto no está siendo utilizado por ningún producto virtual EditAssociate=Componer Translation=Traducción KeywordFilter=Filtro por clave diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 0a8aed4634f..fa1f0fa5621 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -1417,7 +1417,7 @@ if ($object->id && ($action == '' || $action == 'view') && $object->status) $langs->load("bills"); $html .= ''; - $html .= ''.$langs->trans("AddToOtherOrders").''; + $html .= ''.$langs->trans("AddToOtherBills").''; $html .= ''; $html .= ''; From 17efbd41c75f6565cc1313f9c0f4dedcbab9a12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 20:18:09 +0200 Subject: [PATCH 13/18] Improved es_ES translation --- htdocs/langs/es_ES/products.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index f7ae35cc0db..fc9a1fb1d3c 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -91,7 +91,7 @@ AddToOtherBills=Añadir a otras facturas CorrectStock=Corregir stock AddPhoto=Adjuntar una foto ListOfStockMovements=Listado de movimientos de stock -NoPhotoYet=No hay fotografía disponible por el momento +NoPhotoYet=No hay fotografías disponibles por el momento BuyingPrice=Precio de compra SupplierCard=Ficha proveedor CommercialCard=Ficha comercial From cf6bfcc9c4aee94dd340ec73c69b61282ba2ece0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 20:31:39 +0200 Subject: [PATCH 14/18] Missing translations --- htdocs/comm/propal/stats/index.php | 3 ++- htdocs/commande/stats/index.php | 3 ++- htdocs/compta/facture/stats/index.php | 7 ++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index a4b7ad69d24..cb35f6c782a 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -53,7 +53,8 @@ $endyear=$year; $form=new Form($db); -$langs->load("propal"); +$langs->load('propal'); +$langs->load('other'); llxHeader(); diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 07dfb674c74..85bbaae9ef2 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -51,7 +51,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear; $startyear=$year-1; $endyear=$year; -$langs->load("orders"); +$langs->load('orders'); +$langs->load('other'); /* diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 895cadbf2d9..af45fb24ca7 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -54,8 +54,9 @@ $endyear=$year; * View */ -$langs->load("bills"); -$langs->load("companies"); +$langs->load('bills'); +$langs->load('companies'); +$langs->load('other'); $form=new Form($db); @@ -233,7 +234,7 @@ print '
    '; print $form->select_company($socid,'socid',$filter,1); print ''; // User - print ''.$langs->trans("Author").''; + print ''.$langs->trans("CreatedBy").''; print $form->select_users($userid,'userid',1); print ''; // Year From 3b28de0a077894e85c921740094aa322af1fe8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a?= Date: Sat, 8 Jun 2013 21:57:57 +0200 Subject: [PATCH 15/18] Fixed some translation problems --- htdocs/core/class/html.form.class.php | 18 +++++++++--------- htdocs/ecm/docmine.php | 1 + htdocs/fourn/commande/fiche.php | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 000f14ee59f..cb8bc2ee872 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -701,13 +701,13 @@ class Form $selected_input_value=$product->ref; } ======= - if ($selected && empty($selected_input_value)) - { - require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; - $product = new Product($this->db); - $product->fetch($selected); - $selected_input_value=$product->ref; - } + if ($selected && empty($selected_input_value)) + { + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; + $product = new Product($this->db); + $product->fetch($selected); + $selected_input_value=$product->ref; + } >>>>>>> refs/remotes/origin/3.3 // mode=1 means customers products $ajaxoptions=array(); @@ -1657,8 +1657,8 @@ class Form { $opt.= price($objp->fprice).' '.$currencytext."/".$objp->quantity; $outval.= price($objp->fprice).' '.$currencytextnoent."/".$objp->quantity; - $opt.= $langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding - $outval.=$langs->transnoentities("Units"); + $opt.= ' '.$langs->trans("Units"); // Do not use strtolower because it breaks utf8 encoding + $outval.= ' '.$langs->transnoentities("Units"); } if ($objp->quantity >= 1) diff --git a/htdocs/ecm/docmine.php b/htdocs/ecm/docmine.php index 23ac16e75fe..8ba84f6fc76 100644 --- a/htdocs/ecm/docmine.php +++ b/htdocs/ecm/docmine.php @@ -132,6 +132,7 @@ if ($action == 'confirm_deletedir' && $confirm == 'yes') } else { + $langs->load('errors'); setEventMessage($langs->trans($ecmdir->error,$ecmdir->label), 'errors'); } } diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 1bb3fa405af..8bdd44adcf3 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1109,7 +1109,7 @@ elseif (! empty($object->id)) //'text' => $langs->trans("ConfirmClone"), //array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1), //array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' => 1), - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockDecrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)) + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)) ); } From e85b72e4521943e9ba2135d7d2c9d52c41e82565 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jun 2013 15:59:51 +0200 Subject: [PATCH 16/18] Fix: Bad error management --- htdocs/fourn/class/fournisseur.commande.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 3374393310e..633115fa373 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -986,8 +986,7 @@ class CommandeFournisseur extends CommonOrder ); if ($result < 0) { - $this->error=$this->db->lasterror(); - dol_print_error($this->db); + dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error $this->db->rollback(); return -1; } @@ -1022,7 +1021,7 @@ class CommandeFournisseur extends CommonOrder } else if ($reshook < 0) $error++; } - + if (! $notrigger) { // Appel des triggers @@ -1441,7 +1440,7 @@ class CommandeFournisseur extends CommonOrder { $error++; } - + // Remove extrafields if ((! $error) && (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED))) // For avoid conflicts if trigger used { From a5f401f9138f3f75b66ff926f95a84aa683b2b57 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jun 2013 16:13:59 +0200 Subject: [PATCH 17/18] Fix: phpunit file --- test/phpunit/phpunittest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/test/phpunit/phpunittest.xml b/test/phpunit/phpunittest.xml index 424359786ae..35083cb6d0f 100644 --- a/test/phpunit/phpunittest.xml +++ b/test/phpunit/phpunittest.xml @@ -47,6 +47,7 @@ ../../htdocs/societe/canvas/ ../../htdocs/includes/ ../../htdocs/boutique/osc_master.inc.php + ../../htdocs/holiday/common.inc.php From 050819ce0b6e5a2ef0318c46e0f3fb38a75f1f8f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 9 Jun 2013 16:15:12 +0200 Subject: [PATCH 18/18] Fix: dead code --- htdocs/holiday/common.inc.php | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/htdocs/holiday/common.inc.php b/htdocs/holiday/common.inc.php index 072b4818be6..adf490b61a3 100644 --- a/htdocs/holiday/common.inc.php +++ b/htdocs/holiday/common.inc.php @@ -42,27 +42,4 @@ if (empty($conf->holiday->enabled)) exit(); } - -/*$sql = "SELECT value"; -$sql.= " FROM ".MAIN_DB_PREFIX."holiday_config"; -$sql.= " WHERE name = 'userGroup'"; - -$result = $db->query($sql); -$obj = $db->fetch_object($result); - -if ($obj->value == null || $obj->value < 0) -{ - llxHeader('',$langs->trans('CPTitreMenu')); - - $langs->load("errors"); - $warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete")); - print '
    '; - print $warnpicto.' '.$langs->trans("NotConfigModCP"); - print '
    '; - - llxFooter(); - exit(); -} -*/ - -?> +?> \ No newline at end of file