門診收費票據列印程式碼,望大家指正
string ls_name,ls_sex,ls_age,ls_type,ls_menzrq,ls_menzsj,ls_menzfl,ls_menzks,ls_zhuanj,ls_guahf,ls_caozy,c2
ls_name=trim(sle_2.text)
ls_sex=trim(ddplb_1.text)
ls_age=trim(sle_13.text)
ls_type=trim(ddplb_2.text)
select to_char(sysdate,'yyyy-mm-dd') into :ls_menzrq from dual;
ls_menzfl="普通"
ls_menzks="0013"
ls_zhuanj=""
ls_guahf=""
ls_caozy=gl_code
Declare myfun Procedure for
GetMenZH(
:ls_name,
:ls_sex,
:ls_age,
:ls_type,
:ls_menzrq,
:ls_menzsj,
:ls_menzfl,
:ls_menzks,
:ls_zhuanj,
:ls_guahf,
:ls_caozy
) using sqlca;
execute myfun;
Fetch myfun into :c2;
close myfun;
long ls_mzh,ls_update,ll_len,i,j
string ls_menzhenhao
select to_number(max(menzh)) into :ls_mzh from ghxx;
ls_menzhenhao=string(ls_mzh)
ll_len=len(string(ls_mzh))
for j=1 to 8 - ll_len
ls_menzhenhao="0"+ls_menzhenhao
next
dw_1.scrolltorow(1)
for i=1 to dw_1.rowcount( )
dw_1.setitem(dw_1.getrow(), "menzh", string(ls_menzhenhao))
dw_1.setitem(dw_1.getrow(), "xuh", "01")
dw_1.setitem(dw_1.getrow(), "mingxh", string(dw_1.getrow( )))
dw_1.setitem(dw_1.getrow(), "menzh", string(ls_menzhenhao))
dw_1.setitem(dw_1.getrow(), "chufh", "1")
dw_1.setitem(dw_1.getrow(), "yijzx", "×")
dw_1.setitem(dw_1.getrow(), "yijtf", "×")
dw_1.setitem(dw_1.getrow(), "zkl", 1.00)
dw_1.setitem(dw_1.getrow(), "fus", 1)
dw_1.scrollnextrow( )
next
//掛號資訊需要插入的資料有:menzh,xuh,faph,fukfs,lurrq,caozy,yijsf,shouksj,shoukr
string ls_sysdate //lurrq,shouksj 因為程式只要列印發票,錄入的時間就是收款的時間
select to_char(sysdate,'yyyy-mm-dd,hh:mm:ss') into :ls_sysdate from dual;
insert into mzhj
(menzh,xuh,faph,fukfs,lurrq,caozy,yijsf,shouksj,shoukr)
values
(
:ls_menzhenhao,
'01',
'',
'現金',
:ls_sysdate,
:gl_code,
'√',
:ls_sysdate,
:gl_code
);
commit using sqlca;
long ll_update
ll_update=dw_1.update( )
if ll_update<>1 then
messagebox("系統提示","資料儲存失敗")
rollback;
return;
end if
commit;
string ls_ghxx
select max(ghxx.menzh) into:ls_ghxx from ghxx for update ; //鎖ghxx表,當多個客戶機同時修改表時,鎖定表,該條資料儲存後,方可解鎖
commit; //解鎖
ib_new=false
//建立動態資料視窗,列印發票
datastore fp_print
fp_print=create datastore
fp_print.dataobject="db_free_fp"
fp_print.settransobject(sqlca);
//......................................................................................//
//取患者姓名,流水號,伺服器時間,操作員
string ls_hname,ls_liush,ls_serverdate,ls_cname
ls_hname=trim(sle_2.text)
select max(menzh) into :ls_liush from v_mzhjmx using sqlca;
select to_char(sysdate,'yyyy-mm-dd') into :ls_serverdate from dual;
ls_cname=gl_username
dw_2.retrieve()
long ll_rowcount,ll_dw_2_insert
integer k,li_getrow,li_setnull
setnull(li_setnull)
string ls_fenl,ls_ksmc
decimal ld_jine,ld_xiaox
ll_rowcount=dw_2.rowcount()
ll_dw_2_insert=fp_print.insertrow(0)
for k=1 to ll_rowcount
ls_fenl=dw_2.getitemstring(dw_2.getrow(),"fenl")
ls_ksmc=dw_2.getitemstring(dw_2.getrow(),"kesmc")
ld_jine=round(dw_2.getitemdecimal(dw_2.getrow(),"jine"),2)
fp_print.setitem(ll_dw_2_insert,"type1",ls_fenl)
fp_print.setitem(ll_dw_2_insert,"type2",ls_ksmc)
fp_print.setitem(ll_dw_2_insert,"type3",ld_jine)
fp_print.setitem(ll_dw_2_insert,"xingm",ls_hname)
fp_print.setitem(ll_dw_2_insert,"liush",ls_liush)
fp_print.setitem(ll_dw_2_insert,"systime",ls_serverdate)
fp_print.setitem(ll_dw_2_insert,"caozy",ls_cname)
fp_print.setitem(ll_dw_2_insert, "type4","")
fp_print.setitem(ll_dw_2_insert, "type5","作廢")
fp_print.setitem(ll_dw_2_insert, "type6",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type7","")
fp_print.setitem(ll_dw_2_insert, "type8","作廢")
fp_print.setitem(ll_dw_2_insert, "type9",li_setnull)
if dw_2.getrow()=ll_rowcount then
ld_xiaox=round(fp_print.getitemdecimal(ll_dw_2_insert, "type3"),1)
fp_print.setitem(ll_dw_2_insert,"xiaox",string(ld_xiaox))
fp_print.print()
exit
end if
dw_2.scrollnextrow()
ls_fenl=dw_2.getitemstring(dw_2.getrow(),"fenl")
ls_ksmc=dw_2.getitemstring(dw_2.getrow(),"kesmc")
ld_jine=round(dw_2.getitemdecimal(dw_2.getrow(),"jine"),2)
fp_print.setitem(ll_dw_2_insert,"type4",ls_fenl)
fp_print.setitem(ll_dw_2_insert,"type5",ls_ksmc)
fp_print.setitem(ll_dw_2_insert,"type6",ld_jine)
fp_print.setitem( ll_dw_2_insert, "type7","")
fp_print.setitem( ll_dw_2_insert, "type8","作廢")
fp_print.setitem( ll_dw_2_insert, "type9",li_setnull)
if dw_2.getrow()=ll_rowcount then
fp_print.print()
exit
end if
dw_2.scrollnextrow()
ls_fenl=dw_2.getitemstring(dw_2.getrow(),"fenl")
ls_ksmc=dw_2.getitemstring(dw_2.getrow(),"kesmc")
ld_jine=round(dw_2.getitemdecimal(dw_2.getrow(),"jine"),2)
fp_print.setitem(ll_dw_2_insert,"type7",ls_fenl)
fp_print.setitem(ll_dw_2_insert,"type8",ls_ksmc)
fp_print.setitem(ll_dw_2_insert,"type9",ld_jine)
fp_print.print()
if dw_2.getrow()=ll_rowcount then
exit
end if
dw_2.scrollnextrow()
next
fp_print.setitem(ll_dw_2_insert, "type1",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type2",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type3",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type4",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type5",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type6",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type7",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type8",li_setnull)
fp_print.setitem(ll_dw_2_insert, "type9",li_setnull)
fp_print.setitem(ll_dw_2_insert,"liush",li_setnull)
fp_print.setitem(ll_dw_2_insert,"systime",li_setnull)
fp_print.setitem(ll_dw_2_insert,"caozy",li_setnull)
destroy fp_print
messagebox("系統提示","資料儲存並列印完畢!")
//dw_2.retrieve( )
//dw_2.print( )
相關文章
- ESC/P 列印指令使用,3種票據列印方法(轉)
- Java財政票據查驗介面、醫療票據查驗、發票驗真介面Java
- 100元收一張 Gopherchina 大會門票Go
- Spring Boot中基於HTML發票/收據生成和下載功能Spring BootHTML
- 大家都在用的熱門免費APIAPI
- 票據系統設計
- 票據的關係人
- 百望雲釋出中國數字化票 據中心白皮書,開啟數字經濟新篇章
- 聚焦醫療電子票據改革,護航醫療行業票據業務安全行業
- 高等幾何——周興和答案1(自己寫的,非標準答案,望指正)
- 簡單票據檢測方法
- 機房收費系統總結——窗體程式碼框架框架
- 列印交易票功能操作手冊
- 列印電子發票調整格式
- 在做一個support,今天看程式碼的過程中遇到個問題,望大家給點指點。
- 票據鏈優勢和區塊鏈票據的未來應用場景預測區塊鏈
- “碼”上贏門票——TDengine開發者大會購票福利第二彈
- PictureToTv 程式分析--請前輩指正
- [翻譯]用dede破解-另一篇~請大家指正~~ (5千字)
- Python火車票程式碼薦Python
- 證據就在程式碼裡
- 怎麼做能列印發票的軟體?
- 完美破解ip-tools2.04,不對之處請大家指正. (8千字)
- CSS世界頭號黑客來京啦,宅客有免費門票!CSS黑客
- postgresql收費嗎SQL
- PB列印斑馬條碼程式
- MultiRow發現之旅(六)- 使用MultiRow開發票據應用(附原始碼)原始碼
- abap 列印smartforms不預覽連線列印 (設定 程式碼)ORM
- 門診住院流程圖流程圖
- 分享 vxe-table 實現列印出貨單、自定義列印單據
- 3D列印結束時候,讓列印頭抬起的程式碼(cura的結束程式碼)3D
- 根據api檔案生成程式碼API
- C#條碼生成及列印例項程式碼C#
- 免費開源的程式碼審計工具 Gosec 入門使用Go
- 【ERROR】Oracle列印錯誤程式碼解釋ErrorOracle
- 前端開發程式碼模版收錄前端
- 門票銷售計算器
- 整理了一些熱門、含免費次數的api,分享給大家API