{foreach from=$dump_fields_array item=name key=key}{strparse var=fmt value=$name}{$fmt.title},{/foreach} {foreach from=$ls item=row} {php} global $module; switch($module) { case "institution": $list_type_array = $this->_tpl_vars['list_type_array']; $this->_tpl_vars['row']['list_type']=$list_type_array[$this->_tpl_vars['row']['list_type']]; break; case "visit": $list_status_array=$this->_tpl_vars['list_status_array']; $this->_tpl_vars['row']['list_status']=$list_status_array[$this->_tpl_vars['row']['list_status']]; break; default: $workflow_status_array=$this->_tpl_vars['workflow_status_array']; $this->_tpl_vars['row']['list_status']=$workflow_status_array[$this->_tpl_vars['row']['list_status']]; break; } $storehouse_array = $this->_tpl_vars['storehouse_array']; $this->_tpl_vars['row']['storehouse_id']=$storehouse_array[$this->_tpl_vars['row']['storehouse_id']]; $priority_array = $this->_tpl_vars['priority_array']; $this->_tpl_vars['row']['priority']=$priority_array[$this->_tpl_vars['row']['priority']]; $work_range_array = $this->_tpl_vars['work_range_array']; $this->_tpl_vars['row']['h_work_range']=$work_range_array[$this->_tpl_vars['row']['h_work_range']]; $warranty_array = $this->_tpl_vars['warranty_array']; $this->_tpl_vars['row']['warranty']=$warranty_array[$this->_tpl_vars['row']['warranty']]; $this->_tpl_vars['row']['machine_warranty']=$warranty_array[$this->_tpl_vars['row']['machine_warranty']]; $branch_array = $this->_tpl_vars['branch_array']; $this->_tpl_vars['row']['branch_id'] = $branch_array[$this->_tpl_vars['row']['branch_id']]; $this->_tpl_vars['row']['current_branch_id'] = $branch_array[$this->_tpl_vars['row']['current_branch_id']]; $vendor_array = $this->_tpl_vars['vendor_array']; $factory_array = $this->_tpl_vars['factory_array']; $this->_tpl_vars['row']['vendor_id'] = $vendor_array[$this->_tpl_vars['row']['vendor_id']]; $this->_tpl_vars['row']['factory_id'] = $factory_array[$this->_tpl_vars['row']['factory_id']]; $this->_tpl_vars['row']['customer_id']=$this->_tpl_vars['row']['company']; $role_array = $this->_tpl_vars['role_array']; $this->_tpl_vars['row']['role_id']=$role_array[$this->_tpl_vars['row']['role_id']]; $visit_form_array = $this->_tpl_vars['visit_form_array']; $this->_tpl_vars['row']['form_id']=$visit_form_array[$this->_tpl_vars['row']['form_id']]; $this->_tpl_vars['row']['overtime']=translate_overtime_hour($this->_tpl_vars['row']['create_date'],$this->_tpl_vars['row']['finish_date']); $this->_tpl_vars['row']['press_hour']=translate_hour($this->_tpl_vars['row']['press_date'],$this->_tpl_vars['row']['finish_date']); $this->_tpl_vars['row']['history_hour']=translate_hour($this->_tpl_vars['row']['create_date'],$this->_tpl_vars['row']['finish_date']); {/php}{foreach from=$dump_fields_array item=name key=key}{$row.$key|escape:'csv'},{/foreach} {/foreach}