if ($label != null)
echo "<td>$label</td>\n";
echo sales_items_list($name, $selected_id, $all_option, $submit_on_change,
if ($label != null)
echo "<td>$label</td>\n";
echo sales_items_list($name, $selected_id, $all_option, $submit_on_change,
}
function sales_kits_list($name, $selected_id=null, $all_option=false, $submit_on_change=false)
}
function sales_kits_list($name, $selected_id=null, $all_option=false, $submit_on_change=false)
( SELECT stock_id FROM ".TB_PREF."stock_moves WHERE (type=".ST_CUSTDELIVERY." OR type=".ST_INVADJUST.") AND qty!=0 )";
$year = get_current_fiscalyear();
( 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));
- $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."'";
function users_list_cells($label, $name, $selected_id=null, $submit_on_change=false, $spec_opt=true)
{
$where = false;
function users_list_cells($label, $name, $selected_id=null, $submit_on_change=false, $spec_opt=true)
{
$where = false;