} $t->set_block("paymoneylist", "prolist", "prolists"); $query = "select fd_agpm_bkntno as bkntno,fd_pymyltdetail_id as agpmid,\tfd_agpm_shoucardno as shoucardno,\n fd_agpm_shoucardbank as shoucardbank,fd_agpm_shoucardman as shoucardman,\n fd_agpm_shoucardmobile as shoucardmobile,\n fd_agpm_paymoney as paymoney,fd_agpm_paydate as paydate \n from tb_paymoneylistdetail left join tb_agentpaymoneylist on fd_pymyltdetail_agpmid = fd_agpm_id order by fd_agpm_no"; $db->query($query); $arr_result = $db->getFiledData(''); //echo var_dump($arr_result); foreach ($arr_result as $val) { $t->set_var($val); $t->parse("prolists", "prolist", true); } if (empty($arr_result)) { $t->parse("prolists", "", true); } if (empty($listno)) { //显示暂时的单据编号 $listno = listnumber_view("9"); } if (empty($listid)) { //如果已经暂存,提交跟删除按钮可用,否则不可用 $tijiao_dis = "disabled"; } else { $tijiao_dis = ""; } $t->set_var("tijiao_dis", $tijiao_dis); //echo $sqorganid; //require ("ypaylist.php"); --暂时屏蔽掉 $t->set_var("tijiao_dis", $tijiao_dis); //单据id $t->set_var("sqorganid", $sqorganid); //单据id $t->set_var("listid", $listid);
$db->query($query); if ($db->nf()) { $db->next_record(); $yfk_show = $db->f(fd_ysyfm_money) + 0; } else { $yfk_show = "0"; } $arr_temp = explode("-", $date); $year = $arr_temp[0]; $month = $arr_temp[1]; $day = $arr_temp[2]; } } if (empty($listno)) { //显示暂时的单据编号 $listno = listnumber_view("8"); } //查询帐户下拉框 $query = "select * from tb_account where fd_account_isstop = '0'"; $db->query($query); if ($db->nf()) { while ($db->next_record()) { $arr_accid[] = $db->f(fd_account_id); $arr_acc[] = $db->f(fd_account_name); } } $accountid = makeselect($arr_acc, $accountid, $arr_accid); $arr_clienttype = array("客户", "供应商"); $arr_clientid = array("1", "2"); $clienttype = makeselect($arr_clienttype, $clienttype, $arr_clientid); $t->set_var("listid", $listid);
$s = 0; } else { $bgcolor = "#ffffff"; $s = 1; } $t->set_var(array("trid" => $trid, "imgid" => $imgid, "vid" => $vid, "count" => $count, "vquantity" => $vquantity, "vpaycardid" => $vpaycardid, "vmemo" => $vmemo, "bgcolor" => $bgcolor, "vprice" => $vprice, "rowcount" => $count, "vmoney" => $vmoney, "vbatches" => $vbatches, "vproductid" => $vproductid)); $t->parse("prolists", "prolist", true); $save_dis = ""; } } else { $save_dis = "disabled"; $t->parse("prolists", "", true); } if (empty($listno)) { //显示暂时的单据编号 $listno = listnumber_view("2"); } $vallmoney = number_format($vallmoney, 2, ".", ""); $t->set_var("ishavepaycard", $ishavepaycard); //商品ID $t->set_var("listid", $listid); //单据id $t->set_var("id", $id); //id $t->set_var("listno", $listno); //单据编号 $t->set_var("suppid", $suppid); //供应商id号 $t->set_var("suppno", $suppno); //供应商编号 $t->set_var("suppname", $suppname);
$s = 1; } $t->set_var(array("trid" => $trid, "imgid" => $imgid, "vid" => $vid, "count" => $count, "vquantity" => $vquantity, "vmemo" => $vmemo, "bgcolor" => $bgcolor, "vprice" => $vprice, "rowcount" => $count, "vmoney" => $vmoney, "vbatches" => $vbatches, "vcommname" => $vcommname, "vcommno" => $vcommno, "vcommtype" => $vcommtype, "vpaycardid" => $vpaycardid)); $t->parse("prolists", "prolist", true); } $isendsave = ''; } else { $isendsave = 'disabled'; $trid = "tr1"; $imgid = "img1"; $t->set_var(array("trid" => $trid, "imgid" => $imgid, "vid" => "", "count" => "", "vquantity" => "", "vmemo" => "", "bgcolor" => "#ffffff", "vproductid" => "", "vprice" => "", "vbatches" => "", "rowcount" => "", "vmoney" => "", "vcommname" => "", "vcommno" => "", "vcommtype" => "", "vpaycardid" => "")); $t->parse("prolists", "prolist", true); } if (empty($listno)) { //显示暂时的单据编号 $listno = listnumber_view("1"); } $vallmoney = number_format($vallmoney, 2, ".", ""); $t->set_var("isendsave", $isendsave); $t->set_var("tijiao_dis", $tijiao_dis); $t->set_var("listid", $listid); $t->set_var("id", $id); $t->set_var("listno", $listno); $t->set_var("suppid", $suppid); $t->set_var("suppno", $suppno); $t->set_var("suppname", $suppname); $t->set_var("memo_z", $memo_z); $t->set_var("dealwithman", $dealwithman); $t->set_var("ldr", $loginstaname); $t->set_var("startpaycardid", $startpaycardid); $t->set_var("endpaycardid", $endpaycardid);
$bgcolor = "#F1F4F9"; $s = 0; } else { $bgcolor = "#ffffff"; $s = 1; } $t->set_var(array("trid" => $trid, "imgid" => $imgid, "vid" => $vid, "count" => $count, "vquantity" => $vquantity, "vpaycardid" => $vpaycardid, "vmemo" => $vmemo, "bgcolor" => $bgcolor, "vprice" => $vprice, "rowcount" => $count, "vmoney" => $vmoney, "vproductid" => $vproductid)); $t->parse("prolists", "prolist", true); } } else { $t->parse("prolists", "", true); $save_dis = "disabled"; } //获取单据编号 if (empty($listno)) { $listno = listnumber_view(3); } //收款方式 $arr_skfs = array("现金", "支票", "电汇", "承兑", "在线支付"); $arr_skfsval = array("1", "2", "3", "4", "5"); $skfs = makeselect($arr_skfs, $skfs, $arr_skfsval); $arr_type = array("auto", "app"); $arr_typeval = array("系统补货", "自订"); $type = makeselect($arr_typeval, $type, $arr_type); /* //查询客户的受信额度 $query = "select fd_cus_credit , fd_cus_custypeid from tb_customer where fd_cus_id = '$cusid'"; $db->query($query); if($db->nf()){ $db->next_record(); $cus_credit = $db->f(fd_cus_credit);
$s = 0; } else { $bgcolor = "#ffffff"; $s = 1; } $t->set_var(array("trid" => $trid, "imgid" => $imgid, "vid" => $vid, "count" => $count, "vquantity" => $vquantity, "vpaycardid" => $vpaycardid, "vmemo" => $vmemo, "bgcolor" => $bgcolor, "vprice" => $vprice, "rowcount" => $count, "vmoney" => $vmoney, "vproductid" => $vproductid)); $t->parse("prolists", "prolist", true); $save_dis = ""; } } else { $save_dis = "disabled"; $t->parse("prolists", "", true); } //获取单据编号 if (empty($listno)) { $listno = listnumber_view(4); } //收款方式 $arr_skfs = array("现金", "支票", "电汇", "承兑"); $arr_skfsval = array("1", "2", "3", "4"); $skfs = makeselect($arr_skfs, $skfs, $arr_skfsval); /* //查询客户的受信额度 $query = "select fd_cus_credit , fd_cus_custypeid from tb_customer where fd_cus_id = '$cusid'"; $db->query($query); if($db->nf()){ $db->next_record(); $cus_credit = $db->f(fd_cus_credit); $cus_typeid = $db->f(fd_cus_custypeid); if(empty($error) && $cus_typeid==4){ $error = "这个客户已经被总部列入黑名单!请注意!";