Skip to content
Snippets Groups Projects
Commit de2a5a88 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #843 from marcosgdf/bug-828

Fixed bug #828: Error when code_region is not a number in llx_c_regions ...
parents 50ec96d3 becd40a8
No related branches found
No related tags found
No related merge requests found
...@@ -19,11 +19,12 @@ English Dolibarr ChangeLog ...@@ -19,11 +19,12 @@ English Dolibarr ChangeLog
- Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price - Fix: [ bug #806 ] Margins module with orders2invoice does not respect cost price
- Fix: Orderstoinvoice didn't act as expected when no order was checked - Fix: Orderstoinvoice didn't act as expected when no order was checked
- Fix: Bad link to all proposals into Third party card if customer is prospect - Fix: Bad link to all proposals into Third party card if customer is prospect
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #789 ] VAT not being calculated in POS - Fix: [ bug #789 ] VAT not being calculated in POS
- Fix: [ bug #794 ] Lost filter on zipcode in prospect list - Fix: [ bug #794 ] Lost filter on zipcode in prospect list
- Fix: [ bug #774 ] Bug on creating event with box "all day" crossed
- Fix: [ bug #810 ] Cannot update ODT template path - Fix: [ bug #810 ] Cannot update ODT template path
- Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary - Fix: [ bug #824 ] MAIN_DB_PREFIX not use into dictionnary
- Fix: [ bug #828 ] Error when code_region is not a number in llx_c_regions (with postgres)
***** ChangeLog for 3.3.1 compared to 3.3 ***** ***** ChangeLog for 3.3.1 compared to 3.3 *****
......
...@@ -383,7 +383,7 @@ if ($id == 11) ...@@ -383,7 +383,7 @@ if ($id == 11)
// Define localtax_typeList (used for dictionnary "c_tva") // Define localtax_typeList (used for dictionnary "c_tva")
$localtax_typeList = array(); $localtax_typeList = array();
if (GETPOST("id") == 10) if ($id == 10)
{ {
$localtax_typeList = array( $localtax_typeList = array(
"0" => $langs->trans("No"), "0" => $langs->trans("No"),
...@@ -433,7 +433,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) ...@@ -433,7 +433,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; if ($fieldnamekey == 'position') $fieldnamekey = 'Position';
if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode'; if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode';
$msg.=$langs->trans("ErrorFieldRequired",$langs->transnoentities($fieldnamekey)).'<br>'; $msg.=$langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)).'<br>';
} }
} }
// Other checks // Other checks
...@@ -441,14 +441,24 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) ...@@ -441,14 +441,24 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$ok=0; $ok=0;
$msg.="Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record.<br>"; $msg.="Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record.<br>";
} }
if (isset($_POST["code"]) && $_POST["code"]=='0') { if (isset($_POST["code"])
$ok=0; {
$msg.="Code can't contains value 0<br>"; if ($_POST["code"]=='0')
{
$ok=0;
$msg.="Code can't contains value 0<br>";
}
if (!is_numeric($_POST['code']))
{
$ok = 0;
$msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'<br />';
}
} }
if (isset($_POST["pays"]) && $_POST["pays"]=='0') { if (isset($_POST["pays"]) && $_POST["pays"]=='0') {
$ok=0; $ok=0;
$msg.=$langs->trans("ErrorFieldRequired",$langs->trans("Country")).'<br>'; $msg.=$langs->transnoentities("ErrorFieldRequired",$langs->transnoentities("Country")).'<br>';
} }
// Clean some parameters // Clean some parameters
if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0 if (isset($_POST["localtax1"]) && empty($_POST["localtax1"])) $_POST["localtax1"]='0'; // If empty, we force to 0
if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0 if (isset($_POST["localtax2"]) && empty($_POST["localtax2"])) $_POST["localtax2"]='0'; // If empty, we force to 0
...@@ -510,7 +520,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) ...@@ -510,7 +520,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
else else
{ {
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
$msg=$langs->trans("ErrorRecordAlreadyExists").'<br>'; $msg=$langs->transnoentities("ErrorRecordAlreadyExists").'<br>';
} }
else { else {
dol_print_error($db); dol_print_error($db);
...@@ -580,7 +590,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete ...@@ -580,7 +590,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete
{ {
if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') if ($db->errno() == 'DB_ERROR_CHILD_EXISTS')
{ {
$msg='<div class="error">'.$langs->trans("ErrorRecordIsUsedByChild").'</div>'; $msg='<div class="error">'.$langs->transnoentities("ErrorRecordIsUsedByChild").'</div>';
} }
else else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment