From 5838fa1229f648f38ace8966a0d13ac21abee319 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 24 Sep 2019 14:20:45 +0200 Subject: [PATCH] Fix az09 -> aZ09 --- htdocs/categories/viewcat.php | 2 +- htdocs/comm/action/index.php | 2 +- htdocs/fourn/class/fournisseur.product.class.php | 11 ++++++++--- htdocs/public/ticket/create_ticket.php | 6 +++--- htdocs/ticket/card.php | 6 +++--- htdocs/website/index.php | 8 ++++---- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 67ef7905235..787e158670f 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -36,7 +36,7 @@ $langs->load("categories"); $id = GETPOST('id', 'int'); $label = GETPOST('label', 'alpha'); -$type = GETPOST('type', 'az09'); +$type = GETPOST('type', 'aZ09'); $removeelem = GETPOST('removeelem', 'int'); $elemid = GETPOST('elemid', 'int'); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index d42b1b7d134..a2328dd9ca4 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -87,7 +87,7 @@ $week=GETPOST("week", "int")?GETPOST("week", "int"):date("W"); $day=GETPOST("day", "int")?GETPOST("day", "int"):date("d"); $pid=GETPOST("search_projectid", "int", 3)?GETPOST("search_projectid", "int", 3):GETPOST("projectid", "int", 3); $status=GETPOST("search_status", 'aZ09')?GETPOST("search_status", 'aZ09'):GETPOST("status", 'aZ09'); // status may be 0, 50, 100, 'todo' -$type=GETPOST("search_type", 'az09')?GETPOST("search_type", 'az09'):GETPOST("type", 'az09'); +$type=GETPOST("search_type", 'aZ09')?GETPOST("search_type", 'aZ09'):GETPOST("type", 'aZ09'); $maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 6847af5edf1..10233924d4a 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -273,10 +273,9 @@ class ProductFournisseur extends Product $buyprice=price2num($buyprice, 'MU'); $charges=price2num($charges, 'MU'); $qty=price2num($qty); - $error=0; - $unitBuyPrice = price2num($buyprice/$qty, 'MU'); + $error=0; $now=dol_now(); $newvat = $tva_tx; @@ -298,6 +297,12 @@ class ProductFournisseur extends Product if (empty($localtax1)) $localtax1=0; // If = '' then = 0 if (empty($localtax2)) $localtax2=0; // If = '' then = 0 + // Check parameters + if ($buyprice != '' && ! is_numeric($buyprice)) + { + + } + $this->db->begin(); if ($this->product_fourn_price_id > 0) @@ -331,7 +336,7 @@ class ProductFournisseur extends Product $sql.= " SET fk_user = " . $user->id." ,"; $sql.= " ref_fourn = '" . $this->db->escape($ref_fourn) . "',"; $sql.= " desc_fourn = '" . $this->db->escape($desc_fourn) . "',"; - $sql.= " price = ".price2num($buyprice).","; + $sql.= " price = ".$buyprice.","; $sql.= " quantity = ".$qty.","; $sql.= " remise_percent = ".$remise_percent.","; $sql.= " remise = ".$remise.","; diff --git a/htdocs/public/ticket/create_ticket.php b/htdocs/public/ticket/create_ticket.php index b7d17244c2a..b2434e7d826 100644 --- a/htdocs/public/ticket/create_ticket.php +++ b/htdocs/public/ticket/create_ticket.php @@ -138,9 +138,9 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) { $object->message = GETPOST("message", "none"); $object->origin_email = $origin_email; - $object->type_code = GETPOST("type_code", 'az09'); - $object->category_code = GETPOST("category_code", 'az09'); - $object->severity_code = GETPOST("severity_code", 'az09'); + $object->type_code = GETPOST("type_code", 'aZ09'); + $object->category_code = GETPOST("category_code", 'aZ09'); + $object->severity_code = GETPOST("severity_code", 'aZ09'); if (is_array($searched_companies)) { $object->fk_soc = $searched_companies[0]->id; } diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index b770e2fec40..2c52ec513ff 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -570,9 +570,9 @@ if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') & { $object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha')); - $object->type_code = GETPOST('update_value_type', 'az09'); - $object->severity_code = GETPOST('update_value_severity', 'az09'); - $object->category_code = GETPOST('update_value_category', 'az09'); + $object->type_code = GETPOST('update_value_type', 'aZ09'); + $object->severity_code = GETPOST('update_value_severity', 'aZ09'); + $object->category_code = GETPOST('update_value_category', 'aZ09'); $ret = $object->update($user); if ($ret > 0) { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 6394428bd42..db5ecd2ca7a 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2237,7 +2237,7 @@ if (! GETPOST('hide_websitemenu')) $formquestion = array( array('type' => 'checkbox', 'name' => 'delete_also_js', 'label' => $langs->trans("DeleteAlsoJs"), 'value' => 0), array('type' => 'checkbox', 'name' => 'delete_also_medias', 'label' => $langs->trans("DeleteAlsoMedias"), 'value' => 0), - //array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'az09')?GETPOST('newlang', 'az09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')), + //array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'aZ09')?GETPOST('newlang', 'aZ09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')), //array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)) ); @@ -2252,7 +2252,7 @@ if (! GETPOST('hide_websitemenu')) $formquestion = array( array('type' => 'text', 'name' => 'siteref', 'label'=> $langs->trans("WebSite") ,'value'=> 'copy_of_'.$object->ref), //array('type' => 'checkbox', 'name' => 'is_a_translation', 'label' => $langs->trans("SiteIsANewTranslation"), 'value' => 0), - //array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'az09')?GETPOST('newlang', 'az09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')), + //array('type' => 'other','name' => 'newlang','label' => $langs->trans("Language"), 'value' => $formadmin->select_language(GETPOST('newlang', 'aZ09')?GETPOST('newlang', 'aZ09'):$langs->defaultlang, 'newlang', 0, null, '', 0, 0, 'minwidth200')), //array('type' => 'other','name' => 'newwebsite','label' => $langs->trans("WebSite"), 'value' => $formwebsite->selectWebsite($object->id, 'newwebsite', 0)) ); @@ -2266,7 +2266,7 @@ if (! GETPOST('hide_websitemenu')) // Confirmation to clone if ($action == 'createpagefromclone') { // Create an array for form - $preselectedlanguage = GETPOST('newlang', 'az09') ? GETPOST('newlang', 'az09') : ($objectpage->lang ? $objectpage->lang : $langs->defaultlang); + $preselectedlanguage = GETPOST('newlang', 'aZ09') ? GETPOST('newlang', 'aZ09') : ($objectpage->lang ? $objectpage->lang : $langs->defaultlang); $formquestion = array( array('type' => 'hidden', 'name' => 'sourcepageurl', 'value'=> $objectpage->pageurl), array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0), @@ -3319,7 +3319,7 @@ if ($action == 'replacesite' || $action == 'replacesiteconfirm') print ''; print ''.$answerrecord['type'].''; print ''; - $backtopageurl = $_SERVER["PHP_SELF"].'?action=replacesiteconfirm&searchstring='.urlencode($searchkey).'&optioncontent='.GETPOST('optioncontent', 'az09').'&optionmeta='.GETPOST('optionmeta', 'az09').'&optionsitefiles='.GETPOST('optionsitefiles', 'az09'); + $backtopageurl = $_SERVER["PHP_SELF"].'?action=replacesiteconfirm&searchstring='.urlencode($searchkey).'&optioncontent='.GETPOST('optioncontent', 'aZ09').'&optionmeta='.GETPOST('optionmeta', 'aZ09').'&optionsitefiles='.GETPOST('optionsitefiles', 'aZ09'); print 'ref.'&backtopage='.urlencode($backtopageurl).'">'.$langs->trans("EditCss").''; print ''; print '';