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 1/2] 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 2/2] 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)