function paystate_view($fields, $i) { $fieldvalue = $fields['value']['ifpay']; $fieldvalue = paystate_value($fieldvalue, $fields, $i); $shouname = "回款"; if ($fields['value']['supplyid'] != '') { $shouname = "付款"; } $Text = "<TR><TD class=TableContent noWrap>{$shouname}:</TD>\n\n\t\t<TD class=TableContent noWrap>{$fieldvalue}</TD></TR>\n"; return $Text; }
} else { $title = '采购明细'; } if (!empty($_GET['supplyid'])) { $supplyid = $_GET['supplyid']; } else { exit('缺少参数'); } $sql = "SELECT a.daohuodate,a.caigoudate,a.createman,a.supplyid,a.ifpay,a.oddment,a.billid,c.supplyname,a.zhuti,a.totalmoney,a.paymoney,a.rukumoney,a.shoupiaostate,a.shoupiaomoney,b.USER_NAME,a.user_flag,a.state FROM buyplanmain a left JOIN `user` b on a.createman=b.USER_ID left JOIN supply c on a.supplyid=c.ROWID where a.user_flag>0 and " . $where . " a.supplyid='" . $supplyid . "' AND a.caigoudate>='" . $start_time . "' AND a.caigoudate<='" . $end_time . "'"; //exit($sql); $rs = $db->Execute($sql); $rs_a = $rs->GetArray(); $i = 0; foreach ($rs_a as $row) { $rs_a[$i]['user_flag'] = sellonePriv_value($row['user_flag'], '', ''); $rs_a[$i]['ifpay'] = paystate_value($row['ifpay'], '', ''); $rs_a[$i]['state'] = buyplanstate_value($row['state'], '', ''); $rs_a[$i]['shoupiaostate'] = kaipiaostate_value($row['shoupiaostate'], '', ''); $i++; } $head = array("supplyname" => "供应商", "billid" => "单号", "zhuti" => "主题", "caigoudate" => "采购日期", "daohuodate" => "预计到货日期", "USER_NAME" => "创建人", "totalmoney" => "总金额", "oddment" => "去零金额", "paymoney" => "已付金额", "rukumoney" => "已入库金额", "shoupiaomoney" => "已收票金额", "user_flag" => "单据状态", "ifpay" => "付款状态", "state" => "收货状态", "shoupiaostate" => "收票状态"); $headtype = array("supplyname" => "string", "billid" => "char", "zhuti" => "string", "caigoudate" => "string", "daohuodate" => "string", "USER_NAME" => "char", "totalmoney" => "float", "oddment" => "float", "paymoney" => "float", "rukumoney" => "float", "shoupiaomoney" => "float", "user_flag" => "char", "ifpay" => "char", "state" => "char", "shoupiaostate" => "char"); $title = "供应商供货明细"; $sumcol = array("totalmoney" => "", "oddment" => "", "paymoney" => "", "rukumoney" => "", "shoupiaomoney" => ""); if ($_GET['out_excel'] == 'true') { export_XLS($head, $rs_a, $title, $sumcol); exit; } ?> <html> <head>
' . $_GET['billid']; $rs = $db->Execute($sql); $order_info = $rs->GetArray(); $user_flag = $order_info[0]['user_flag']; require_once './userdefine/paystate.php'; require_once './userdefine/kaipiaostate.php'; require_once './userdefine/sellonePriv.php'; require_once './userdefine/fahuostate.php'; require_once './userdefine/sellplanstate.php'; $order_info[0]['user_flag'] = sellplanstate_value($order_info[0]['user_flag'], '', ''); $order_info[0]['user_flag'] = htmlspecialchars_decode($order_info[0]['user_flag']); $order_info[0]['user_flag'] = preg_replace("/<(.*?)>/", "", $order_info[0]['user_flag']); $order_info[0]['fahuostate'] = fahuostate_value($order_info[0]['fahuostate'], '', ''); $order_info[0]['fahuostate'] = htmlspecialchars_decode($order_info[0]['fahuostate']); $order_info[0]['fahuostate'] = preg_replace("/<(.*?)>/", "", $order_info[0]['fahuostate']); $order_info[0]['ifpay'] = paystate_value($order_info[0]['ifpay'], '', ''); $order_info[0]['ifpay'] = htmlspecialchars_decode($order_info[0]['ifpay']); $order_info[0]['ifpay'] = preg_replace("/<(.*?)>/", "", $order_info[0]['ifpay']); $order_info[0]['kaipiaostate'] = kaipiaostate_value($order_info[0]['kaipiaostate'], '', ''); $order_info[0]['kaipiaostate'] = htmlspecialchars_decode($order_info[0]['kaipiaostate']); $order_info[0]['kaipiaostate'] = preg_replace("/<(.*?)>/", "", $order_info[0]['kaipiaostate']); @($ini_file = @parse_ini_file("../Framework/sellone_print_config.ini", true)); $sell_order_field_config = $ini_file['sell_order_print_field']; $sell_order_detail_field_config = $ini_file['sell_order_detail_print_field']; asort($sell_order_field_config); asort($sell_order_detail_field_config); //$order_print_paper_width = $ini_file['section']['order_print_paper_width']; // 销售单打印字段配置 $customer_columns = returntablecolumn('v_sellone'); @($customer_ini_file = @parse_ini_file('./Model/sellone_newai.ini', true)); $customer_showlistfieldlist = explode(',', $customer_ini_file['view_default']['showlistfieldlist']);