{if $stockinfo.image}
{$stockinfo.name}
{/if} {foreach from=$list_fields_array item=name key=key} {strparse var=fmt value=$name} {/foreach} {foreach from=$ls item=row} {foreach from=$list_fields_array item=name key=key} {strparse var=fmt value=$name} {if $key == "storehouse_id"} {elseif $key == "username"} {elseif $key == "branch_id"} {elseif in_array($key,array("in_number","out_number","bad_number","balance_number","place_number","pins_number","batch_number"))} {elseif $key == "stock_age"} {else} {/if} {*合计字段处理开始*} {if $fmt.sum} {php} $key = $this->_tpl_vars["key"]; $value = $this->_tpl_vars["row"][$key]; $_total_list_array[$key] += $value +0; $this->_tpl_vars["_total_list_array"] = $_total_list_array; $_total_single_list_array[$key] += $value +0; $this->_tpl_vars["_total_single_list_array"] = $_total_single_list_array; {/php} {/if} {*合计字段处理结束*} {/foreach} {/foreach} {if !$smarty.request.show_batch} {foreach from=$uls item=row} {foreach from=$list_fields_array item=name key=key} {strparse var=fmt value=$name} {if $key == "storehouse_id"} {elseif $key == "way_number" OR $key == "user_number" OR $key == "bad_number" OR $key == "balance_number"} {else} {/if} {*合计字段处理开始*} {if $fmt.sum} {php} $key = $this->_tpl_vars["key"]; $value = $this->_tpl_vars["row"][$key]; $_total_list_array[$key] += $value +0; $this->_tpl_vars["_total_list_array"] = $_total_list_array; $_total_single_list_array[$key] += $value +0; $this->_tpl_vars["_total_single_list_array"] = $_total_single_list_array; {/php} {/if} {*合计字段处理结束*} {/foreach} {/foreach} {/if} {foreach from=$list_fields_array item=name key=key name="listeach"} {strparse var=fmt value=$name} {if $smarty.foreach.listeach.first} {elseif $fmt.sum} {else} {/if} {if $fmt.sum} {php} $key = $this->_tpl_vars["key"]; $_total_single_list_array[$key] = 0; {/php} {/if} {/foreach}
{$sort.$key|default:$fmt.title}
{assign var="tmpval" value=$row.$key}{$storehouse_array[$tmpval]|del:$row.disabled}({assign var="tmpval2" value=$row.storehouse_id}{$storehouse_branch_array[$tmpval2]|del:$row.disabled}) {$row.$key|del:$row.disabled}({$branch_array[$row.branch_id]|del:$row.disabled}){assign var="tmpval2" value=$row.storehouse_id}{$storehouse_branch_array[$tmpval2]|del:$row.disabled}{if $row.$key > 0}{/if}{$row.$key|string_format:"%.02f"|del:$row.disabled}{if $row.$key}{/if}{$row.$key|del:$row.disabled} 天{$row.$key|del:$row.disabled}
{assign var="tmpval" value=$row.user_id}{$user_array[$tmpval]|del:$row.disabled}{if $row.$key > 0}{/if}{$row.$key|string_format:"%.02f"|del:$row.disabled}{if $row.$key}{/if}{$row.$key|del:$row.disabled}
合计{$_total_single_list_array.$key|default:'0'|string_format:'%.02f'} 
{if $stockinfo.image}
{/if}