X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Fui%2Fui_lists.inc;h=55ef6777d5d004a40c4fbcfa8c82cadde687713c;hb=159af00183e3732314b508729b06eae88721954c;hp=c7c5a4061bb80b2449fa96886a35a1c7faf27402;hpb=db103dd1d931a0c49fada9e5e8076b9a1add1db8;p=fa-stable.git
diff --git a/includes/ui/ui_lists.inc b/includes/ui/ui_lists.inc
index c7c5a406..55ef6777 100644
--- a/includes/ui/ui_lists.inc
+++ b/includes/ui/ui_lists.inc
@@ -365,7 +365,7 @@ $opts = array( // default options
$selector .= ' '.$opts['editlink'];
if ($search_box && $opts['cells'])
- $str = ($edit_entry!='' ? "
$edit_entry | " : '')."$selector$img | ";
+ $str = ($edit_entry!='' ? "$edit_entry | " : '')."$selector$img | ";
else
$str = $edit_entry.$selector.$img;
return $str;
@@ -944,7 +944,7 @@ function sales_items_list_cells($label, $name, $selected_id=null, $all_option=fa
if ($label != null)
echo "$label | \n";
echo sales_items_list($name, $selected_id, $all_option, $submit_on_change,
- '', array('cells'=>true));
+ '', array('cells'=>true, 'max'=>50)); // maximum is set to 50 and not default 255.
}
function sales_kits_list($name, $selected_id=null, $all_option=false, $submit_on_change=false)
@@ -1152,11 +1152,12 @@ function stock_depreciable_fa_list_cells($label, $name, $selected_id=null,
( SELECT stock_id FROM ".TB_PREF."stock_moves WHERE (type=".ST_CUSTDELIVERY." OR type=".ST_INVADJUST.") AND qty!=0 )";
$year = get_current_fiscalyear();
- $y = date('Y', strtotime($year['end']));
+ $begin = date2sql(add_months(sql2date($year['begin']), -1));
+ $end = date2sql(add_months(sql2date($year['end']), -1));
// check if current fiscal year
- $where_opts[] = "depreciation_date < '".$y."-12-01'";
- $where_opts[] = "depreciation_date >= '".($y-1)."-12-01'";
+ $where_opts[] = "depreciation_date <= '".$end."'";
+ $where_opts[] = "depreciation_date >= '".$begin."'";
$where_opts[] = "material_cost > 0";
$where_opts[] = "mb_flag='F'";
@@ -2690,7 +2691,7 @@ function accounts_type_list_row($label, $name, $selected_id=null)
function users_list_cells($label, $name, $selected_id=null, $submit_on_change=false, $spec_opt=true)
{
$where = false;
- $sql = " SELECT user_id, real_name FROM ".TB_PREF."users";
+ $sql = " SELECT user_id, IF(real_name = '', user_id, real_name) FROM ".TB_PREF."users";
if ($label != null)
echo "$label | \n";