昆仑会员此打印方式只针对用会员卡结账的消费,放开限制解决方案
在这个function里面
function PrintDialog() { var print_card_fee = "<%=print_card_fee %>" //alert(print_card_fee) var balance=JStrToMoney(form1.net.value); var last_balance=parseFloat(balance)+parseFloat(print_card_fee); this.ReturnValue = "0"; this.card_no = "<%=rs_his("card_no")%>" ; this.member_name = form1.chname.value; this.card_type = form1.card_type.value ; this.expirydate=form1.expiry_date.value ; this.trade_type = "<%=f_glo("SH01135")%>"; this.fee = JStrToMoney(form1.total_rev.value); this.last_balance = JStrToMoney(last_balance); this.balance = JStrToMoney(balance); this.check_Date = new Date(<%=year(dt)%>,<%=month(dt)-1%>,<%=day(dt)%>,<%=hour(dt)%>,<%=minute(dt)%>) ; this.operator = "<%=session("user_code")%>"; this.user_code = "<%=session("user_code")%>"; this.print_time = form1.print_time.value; this.place_code = "<%=place_name %>"; this.room_number="<%=room_number %>"; if (form1.payment.value=="<%=pay_svc%>") { var url = "../m_fee/print.asp?type_flag=R"; showModalDialog(url,this,"dialogWidth:320px;dialogHeight:500px;help:no;scroll:yes;status:no;"); } else { alert("<%=f_glo("SH01134")%>"); } }
把下面这段修改一下
if (form1.payment.value=="<%=pay_svc%>") { var url = "../m_fee/print.asp?type_flag=R"; showModalDialog(url,this,"dialogWidth:320px;dialogHeight:500px;help:no;scroll:yes;status:no;"); } else { alert("<%=f_glo("SH01134")%>"); }
修改结果如下,别问我为毛在else里面又写一次,这个锅是IE的,哈哈哈哈。
if (form1.payment.value=="<%=pay_svc%>") { var url = "../m_fee/print.asp?type_flag=R"; showModalDialog(url,this,"dialogWidth:320px;dialogHeight:500px;help:no;scroll:yes;status:no;"); } else { var url = "../m_fee/print.asp?type_flag=R"; showModalDialog(url,this,"dialogWidth:320px;dialogHeight:500px;help:no;scroll:yes;status:no;"); }
svc\m_history\his_room_detail.asp
<%Option Explicit%> <% dim whether_bucket '是否决定用子账单结帐 whether_bucket=trim(fn_get_param_value("WHETHER_BUCKET",""))'子账单结帐标志(Y:是,N:否) dim user_code dim continue_do dim templet_id '打印模板 templet_id=trim(request("templet_id")) continue_do= trim(request("continue_do")) dim detail_id,sql_del_detail detail_id=trim(request("detail_id")) if detail_id<>"" then sql_del_detail="delete member_history_svc_pms_detail where id='" & detail_id & "'" conn.execute(sql_del_detail) end if user_code=session("user_code") dim rs,rs_his,sql,sqlstr1,rs1 dim id,show id=trim(request("id")) show=trim(request("show")) dim overdraft_mod '透支额度按照主持卡人还是使用者有效 overdraft_mod=fn_get_param_value("OVERDRAFT_MOD","") if overdraft_mod="" or overdraft_mod="null" then overdraft_mod="MAIN" end if dim gh_no,membership,sub_name,balance,deposit,overdraft_spend,payment_name,dt,card_points,his_points,net dim arrival,departure,room_type,room_number,rate_code,room_rate,booker_no,booker_name,special dim room_rev,fb_rev,other_rev,total_rev,payment,discount,discount_real dim old_total_rev,from,operator_no,operator,check_no,check_no_spend,sweep_flag,sweep_code,entry,points,credit_no,place_name dim card_password,expiry_date,card_type,sql_temp,rs_temp,total_tax dim channel_code,market_code,source_code dim fee_id '此笔消费记录的卡值ID dim remark dim main_card_no '主账单的卡号 dim is_complete '子账单是否结完 dim promotion_code '促销代码 dim trace_code '客人得知促销的渠道 dim guests sql_temp="select code,name from dic_card_membership order by sort_id" set rs_temp=conn.execute(sql_temp) sql="select h.guests,s.id as fee_id,isnull(m.card_no,x.card_no) as card_no,isnull(m.card_password,x.card_password) as card_password,dp.name as place_name," sql=sql &" h.gh_no,h.points as his_points,isnull(h.dt,getdate()) as dt,h.points," sql=sql &" convert(varchar(10),h.arrival,120) as arrival,isnull(m.expiry_date,x.expiry_date) as expiry_date," sql=sql &" convert(varchar(10),h.departure,120) as departure," sql=sql &" h.nights,h.room_number,h.room_rate,h.room_type,h.rate_code," sql=sql &" h.channel_code,h.market_code,h.source_code," sql=sql &" h.total_rev,h.room_rev,h.fb_rev,h.other_rev,h.total_tax,h.special,h.payment,isnull(d.name,'') as payment_name," sql=sql &" isnull(m.points,x.points) as card_points,isnull(m.balance,x.balance) as balance,isnull(m.deposit,x.deposit) as deposit," sql=sql &" h.discount,isnull(m.membership_type,x.membership_type) as membership,isnull(m.sub_type,x.sub_type) as entry ," sql=sql &" h.booker_card_no as booker_no,isnull(m1.chname,'') as booker_name," sql=sql &" h.sub_name,h.remark,h.is_complete," if overdraft_mod="MAIN" then sql= sql & " isnull(e.overdraft_spend,0) as overdraft_spend ," else sql= sql & " isnull(sub.overdraft_spend,0) as overdraft_spend ," end if sql=sql &" h.operator_id,isnull(a.name,'') as username, " sql=sql &" h.check_no,h.check_no_spend,(case h.sweep_flag when '1' then '" & f_glo("SH00142") & "' else '" & f_glo("SH00143") & "'" sql=sql &" end) as sweep_flag,h.sweep_flag as sweep_code,h.credit_no as credit_no," sql=sql &" isnull(s.last_balance,isnull(m.balance,x.balance)) as last_balance," sql=sql &" isnull(s.this_balance,isnull(m.balance,x.balance)) as this_balance,h.promotion_code,dm.private_info,h.trace_code " sql=sql &" from member_history_svc h left join member_Card_fee s on cast(h.id as varchar)=s.from_id and h.his_type=s.from_type and h.card_no=s.card_no" sql=sql &" left join member_info_sub sub on h.gh_no=sub.parent_gh_no and h.sub_name=sub.sub_name" sql=sql &" left join member_info_svc m1 on h.booker_card_no=m1.card_no left join dic_payment d on h.payment=d.code," sql=sql &" member_info_svc x left join member_info_svc m on x.main_gh_no=m.gh_no,users a,dic_card_membership dm,dic_place dp," sql=sql &" (select parent_gh_no,overdraft_spend from member_info_sub where main_flag='1') e " sql=sql &" where h.gh_no=isnull(m.gh_no,x.gh_no) and h.card_no=x.card_no and a.code=h.operator_id and dp.code=h.place_code " sql=sql &" and x.gh_no=e.parent_gh_no and dm.code=x.membership_type" sql=sql &" and h.id=" & id set rs_his=conn.execute(sql) if rs_his.recordcount>0 then rs_his.movefirst fee_id=trim(rs_his("fee_id")) membership=trim(rs_his("membership")) entry=trim(rs_his("entry")) gh_no=trim(rs_his("gh_no")) sub_name=trim(rs_his("sub_name")) balance=trim(rs_his("balance")) deposit=trim(rs_his("deposit")) overdraft_spend=trim(rs_his("overdraft_spend")) dt=trim(rs_his("dt")) payment=trim(rs_his("payment")) payment_name=trim(rs_his("payment_name")) card_points=trim(rs_his("card_points")) his_points=trim(rs_his("his_points")) old_total_rev=trim(rs_his("total_rev")) main_card_no=trim(rs_his("card_no")) operator_no=trim(rs_his("operator_id")) operator=trim(rs_his("username")) check_no=trim(rs_his("check_no")) check_no_spend=trim(rs_his("check_no_spend")) sweep_flag=trim(rs_his("sweep_flag")) sweep_code=trim(rs_his("sweep_code")) points=trim(rs_his("points")) credit_no = trim(rs_his("credit_no")) is_complete = trim(rs_his("is_complete")) if check_no_spend = null then check_no_spend = 0 end if booker_no=trim(rs_his("booker_no")) card_password=trim(rs_his("card_password")) expiry_date=rs_his("expiry_date") remark=trim(rs_his("remark")) place_name=trim(rs_his("place_name")) if rs_temp.recordcount>0 then do while not rs_temp.EOF if trim(rs_his("membership"))=trim(rs_temp("code")) then card_type=rs_temp("name") end if rs_temp.movenext loop end if arrival=trim(rs_his("arrival")) departure=trim(rs_his("departure")) room_type=trim(rs_his("room_type")) room_number=trim(rs_his("room_number")) rate_code=trim(rs_his("rate_code")) if isnull(rate_code) then rate_code="" end if room_rate=trim(rs_his("room_rate")) special=trim(rs_his("special")) room_rev=trim(rs_his("room_rev")) fb_rev=trim(rs_his("fb_rev")) other_rev=trim(rs_his("other_rev")) total_tax=trim(rs_his("total_tax")) total_rev=trim(rs_his("total_rev")) booker_no=trim(rs_his("booker_no")) booker_name=trim(rs_his("booker_name")) discount_real=trim(rs_his("discount")) channel_code=trim(rs_his("channel_code")) market_code=trim(rs_his("market_code")) source_code=trim(rs_his("source_code")) promotion_code=trim(rs_his("promotion_code")) trace_code=trim(rs_his("trace_code")) guests=trim(rs_his("guests")) else %> <% response.End end if 'response.Write is_complete from = trim(request("from")) if from="discount" then'由计算折扣,刷新界面迩来 arrival=trim(request("arrival")) departure=trim(request("departure")) room_type=trim(request("room_type")) room_number=trim(request("room_number")) rate_code=trim(request("rate_code")) room_rate=trim(request("room_rate")) special=trim(request("special")) room_rev=trim(request("room_rev")) fb_rev=trim(request("fb_rev")) other_rev=trim(request("other_rev")) total_tax=trim(request("total_tax")) total_rev=trim(request("total_rev")) booker_no=trim(request("booker_no")) booker_name=trim(request("booker_name")) discount_real=trim(request("discount_real")) channel_code=trim(request("channel_code")) market_code=trim(request("market_code")) source_code=trim(request("source_code")) promotion_code=trim(request("promotion_code")) trace_code=trim(request("trace_code")) '得到扣率 if discount_real=0 then '得到扣率 sql="exec sp_get_discount_by_rule '11','" & membership & "','','',0" set rs=conn.execute(sql) if not rs.eof then discount=cdbl(rs("discount")) else discount =0 end if if discount=0 then discount_real=0 else discount_real=Round((discount)*cdbl(room_rev),2) room_rev=Round((1-discount)*cdbl(room_rev),2) end if total_rev=cdbl(room_rev) + cdbl(fb_rev) + cdbl(other_rev)+ cdbl(total_tax) end if end if if room_rate="" then room_rate=0 end if if room_rev="" then room_rev=0 end if if fb_rev="" then fb_rev=0 end if if other_rev="" then other_rev=0 end if if total_tax="" then total_tax=0 end if if total_rev="" then total_rev=0 end if if discount_real="" then discount_real=0 end if dim sql_merge,rs_merge sql_merge="select promotion_trace_code from [dbo].[fn_promotion_trace_merge]('"&promotion_code&"','"&trace_code&"')" set rs_merge=conn.execute(sql_merge) '从sysparam取得CASH所对应的付款方式 dim sql_sys,rs_sys,pay_svc,pay_cash,v_param,n pay_svc=fn_get_param_value("PAY_SVC","") pay_cash=fn_get_param_value("PAY_CASH","") dim prt_type prt_type=fn_get_param_value("PRT_TYPE",session("hotel_code")) '打印单据的选择方式 '补打用的fee dim rs_fee,print_card_fee sql= " select distinct f.fee from member_card_fee f " sql=sql & " inner join member_history_svc h on f.gh_no=h.gh_no " sql=sql & " left join member_history_svc_pms_detail d on h.id= d.his_id " sql=sql & " left join member_info_svc m on m.card_no=d.card_no and m.gh_no=f.gh_no " sql=sql & " where f.from_id=cast(h.id as varchar) and f.gh_no='"&gh_no&"' " sql=sql & " and h.id='"&id&"' " 'response.Write sql set rs_fee = conn.execute(sql) if rs_fee.recordcount>0 then print_card_fee = 0-cdbl(rs_fee("fee")) end if if print_card_fee="" then print_card_fee=0 end if %> "http://www.w3.org/1999/xhtml">"Content-Type" content="text/html; charset=gb2312" /> "stylesheet" type="text/css" href="../../include/main.css" /> <%include_jquery() ' 引入jquery.js%> "h_cele_date();"> <%=f_glo("SH00100")%>