X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=includes%2Fui%2Fui_input.inc;h=59064f82de031820d3c698b0995031687840cfad;hb=b17df731b4bb055c2fdd568bc4be9e5caa0ee07b;hp=230dd495b325439db6a65c82a1372d6c2cb50230;hpb=361aac31df66f513fc014aee6adc9f1e30dd18a7;p=fa-stable.git
diff --git a/includes/ui/ui_input.inc b/includes/ui/ui_input.inc
index 230dd495..59064f82 100644
--- a/includes/ui/ui_input.inc
+++ b/includes/ui/ui_input.inc
@@ -1,4 +1,14 @@
.
+***********************************************************************/
function get_post($name, $dflt='')
{
@@ -71,7 +81,7 @@ function simple_page_mode($numeric_id = true)
//
function input_num($postname=null, $dflt=null)
{
- if (!isset($_POST[$postname]))
+ if (!isset($_POST[$postname]) || $_POST[$postname] == "")
return $dflt;
return user_numeric($_POST[$postname]);
@@ -101,13 +111,13 @@ function submit($name, $value, $echo=true, $title=false, $async=false, $icon=fal
default_focus($name);
$submit_str = "\n";
if ($echo)
echo $submit_str;
@@ -194,7 +204,7 @@ function submit_return($name, $value, $title=false, $async=false)
}
}
//---------------------------------------------------------------------------------
-
+/*
function button($name, $value, $onclick, $title=false)
{
default_focus($name);
@@ -209,7 +219,7 @@ function button_cell($name, $value, $onclick, $title=false)
button($name, $value, $onclick, $title);
echo "\n";
}
-
+*/
//-----------------------------------------------------------------------------------
function check_value($name)
@@ -294,7 +304,7 @@ function percent_cell($label, $bold=false, $id=null)
// 2008-06-15. Changed
function qty_cell($label, $bold=false, $dec=null, $id=null)
{
- if ($dec == null)
+ if (!isset($dec))
$dec = get_qty_dec();
if ($bold)
label_cell("".number_format2($label, $dec)."", "nowrap align=right", $id);
@@ -488,9 +498,10 @@ function amount_cells_ex($label, $name, $size, $max=null, $init=null, $params=nu
echo "";
- if ($post_label)
- echo " " . $post_label;
-
+ if ($post_label) {
+ echo " $post_label";
+ $Ajax->addUpdate($name, '_'.$name.'_label', $post_label);
+ }
echo "\n";
$Ajax->addUpdate($name, $name, $_POST[$name]);
$Ajax->addAssign($name, $name, 'dec', $dec);