📄 ftype.h
字号:
/*
* Module: FTYPE.H
* Modified by: X.C.Zheng WeiHua
* Modified on: Date: 03-8-11 14:02
* Copyright(c) WeiHua Tech Ltd.
*/
/*************************************************************************
The software interrelatived function
*************************************************************************/
#ifndef ___FTYPE_H___
#define ___FTYPE_H___
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Common used functions
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void lock(void);
byte CMOS_Legl_Chk(void);
void CMOS_Legl_Set(void);
void CMOS_Illegal(void);
byte Isp_CmosChk(void);
void Isp_ClrCmos(void);
//-------- initial -------------------------
void master_reset(void);
void protest(void);
void Rst_Dept(byte clr_rpt_flag);
void Rst_PLU(byte clr_rpt_flag);
void Rst_Clerk(byte clr_rpt_flag);
void Rst_Sysflag(byte flag);
void Rst_Prog_Other(byte clr_rpt_flag);
void init_ori_str(void);
void Data_Initial(void);
void Init_Alloc(byte clr_rpt_flag);
#ifndef WD1VER /* The WD1-E version */
dword Mem_Alloc(void);
byte Do_Alloc(byte flag);
void prn_Alloc(void);
#endif /* End WD1VER */
//------------- display func ---------------------------
void error(void);
void errorMsg(char *str);
void errorType(word type);
void errorType_Ex(word type);
void errorMsg_Ex(char *str);
byte Get_Max_Len(byte Idx_Step);
long asc2long(void);
void ltoa(unsigned long data, char *addr, char len);
byte Cal_Len(long num);
//--------------- accessorial Function --------------------------
byte Isdigit(word key_code, const word *str);
byte en_dec_chk(word key);/*检测是否允许小数点输入*/
byte getDept(void);
word getDPLU(void);
byte get_PCASH(void);
CHR leapyear(CHR year);
CHR IsDay(byte year, byte month, byte day);
int Comp_Date(byte Fst_Year, byte Fst_Month, byte Fst_Day, byte Snd_Year, byte Snd_Month, byte Snd_Day);
byte Secr_Pass(void);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Program mode used functions
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void progmain(void);
byte pTime_Date(byte step);
void prn_Prog_Time_Date(void);
void pDept(word ch);
void prn_Dept(byte Dept_No);
void Dbin2asc(word idx);
byte Dasc2bin(word idx);
void prn_PLU( word Idx );
void pPLU_Group( void );
void Group_Print( byte idx );
byte Group_Len( byte Idx );
void pClerk(byte Idx_Step);
void pWaiter(byte Idx_Step);
void prn_Clerk(byte Idx);
void prn_Waiter(byte Idx);
void pPer(void);
void prn_Per(byte Idx);
void pREFUND(void);
void prn_Rfnd(void);
void pVAT_Tax(byte vatnum);
void prn_VAT_Tax(byte Idx);
#ifdef FCE_FUNC /* Support the FCE function */
void pFCE(byte Idx);
void prn_FCE(byte Idx);
void prnFCErate(byte Idx);
#endif /* End FCE_FUNC */
void Version_Check(void);
void Version_Cs_Chk(byte flag);
WORD Get_CS(void);
void prn_Ver(void);
void pPCASH(byte Idx_Step);
void prn_PCASH(byte Idx);
void pCHECK(byte Idx_Step);
void prn_CHECK(byte Idx);
void pCHARGE(byte Idx_Step);
void prn_CHARGE(byte Idx);
void pWlcm_Msg( byte Idx_Step );
void prn_Wlcm_Msg(byte Idx);
void prn_Btm_Msg(byte Idx);
void pBtm_Msg(byte Idx_Step);
void pFFkey(void);
void FF_Tmpkey_Init(byte flag);
void prn_FFkey(void);
byte FFkey_GetIn(void);
byte Get_Desc(byte *desc_str, byte desc_len, byte mode);
void Disp_Desc_Len(byte *disp_str, byte disp_len, byte mode);
byte Get_Desc_Len(byte *disp_str, byte disp_len);
void pSyspara(byte Idx_Step);
void prn_Syspara(byte Idx);
void pVer(void);
void Adjust_DeptLTax(void);
void prn_All_Error(void);
void pProgAble_Desc(byte Idx_Step);
void prn_ProgAble_Desc(byte Idx);
#ifdef VER_RSNT /* Support the restaurant function */
void pTable( byte Idx_Step );
void prn_Table(byte Idx, byte flag);
void pSendKPDesc(byte Idx_Step);
void prn_Send_KP_Desc(byte Idx);
void Set_KP_Type(void);
void Set_KP_Line_Feed_Cnt(void);
#endif
#ifdef REST_PLU_FUNC
byte getmenu(void);
void pPLUTAB(byte idx);
void Disp_Plutab(char idx);
byte Updata_Plutab(char idx);
void prn_PLUTAB(char idx,byte prn_flag);
void PMENU_TAB(byte Idx);
byte Menu_Len( byte Idx );
void Prn_Menu( byte idx );
byte Menu_Curr_Delete( byte Idx, byte Posi );
void Del_Main_Slave_PLU(byte idx);
byte Chk_MenuBuff_Full(byte tmp_length);
void prn_Sngl_MENU_Rep(byte Idx);
byte cal_menu_len(word Idx,byte length);
void do_menu_plu(word Idx);
byte cal_sale_plu_length(word Idx);
void Do_MENU_Rep(byte mode);
void clr_menu_rpt(byte mode);
void Do_PTD_MENU_Rep(void);
void Do_Daily_MENU_Rep(void);
byte get_last_oper_id(void);
#endif
void pDPLU(void);
void SetBaudRate(byte port);
void Set_Port_Used(void);
void QA_Check(byte num);
void Qa_HighLowTemperatureTest(void);
void SetBaudMode(byte port);
void SelOutPrint(void);
void SelPortUse(void);
void SelPrintType(void);
void SelHandMtd(void);
void SetCutPaper(void);
byte Prn_SetHeatTime(word addTime);
byte Prn_GetHeatTime(word *addTime);
void Change_Heat_Time(void);
/*** The Weight PLU Funcitons ***/
void do_bar_adj(void);
byte Judge_Weight_PLU(byte *scode);
void Do_Weight_PLU(byte *scode, byte *obj_code);
byte Weight_PLU_Process(void);
long get_wgt_pric(byte *scode);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Sale mode used functions
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void salemain(void);
void Cont_Sale_Check(void);
byte clerkpass(void);
void Do_Cash(void);
#ifdef FCE_FUNC /* Support the FCE function */
void Do_FCE(void);
byte getFCE(void);
void Do_XCH(void);
#endif /* End FCE_FUNC */
void Do_RA(void);
void Do_PO(void);
void Do_RA_Ex(void);
void Do_PO_Ex(void);
void Do_NS(void);
void Do_Dept(byte ch);
void Do_PLUcr(void);
void Do_PLU(void);
void Do_xTime(void);
void Do_STAXSFT(word KeyCode);
void Do_STAXEMP(void);
void Do_Shift(byte);
void Do_Shift1(void);
void Do_Shift2(void);
void Do_Shift3(void);
void Do_TaxEmp(void);
void Clr_Shift(void);
void Clr_Tax_Flag(void);
void Clr_Staus_Flag(void);
void Do_Tax_Flag(void);
void Do_Subttl(void);
void Do_Rfnd(void);
void Do_Void(void);
void Do_Per(void);
void Do_Auto_Per(byte flag, int idx);
void Do_RM(void);
void Do_EC(void);
void Do_TSVD(void);
void DisTime(void);
byte get_dept_price(byte ch);
long Get_Price(long quantity, long amount);
void Inquire_PLU_Price(void);
void Inquire_PLU_Stock(void);
void Get_TVAT(void);
void Update_TVAT_Buff(void);
void Update_Tmpvars(TRANSBUFFDEF tsbf, byte sign);
byte maxcheck(byte nth, byte flag);
long calPrtAmt(byte Flag, word Idx);
long calTotQty(TRANSBUFFDEF *transbuff, byte TnsBf_Len);
long caltax(char flag,byte taxno,long sum);
long calVAT(byte idx, long sum);
void InitTrans(void);
void Update_Clerk_Rpt(void);
void Update_Hour_Rpt(void);
void Sale_Prn(TRANSBUFFDEF tsbf);
void Sale_Dsp(TRANSBUFFDEF tsbf);
void prn_Logo(void);
void prn_Tot_Info_Ex(char *str, long total, byte flag);
void prn_Cash_Info(char *str, byte slen, long payment, byte dots, byte flag);
void prn_Tot_Qty(TRANSBUFFDEF *tsbf, byte tsbf_len);
void prn_Date_Time(byte year, byte month, byte day, byte hour, byte minute);
void prn_Clerk_McheNum(void);
void prn_Tral_Msg(void);
void Calc(void);
void GndTtl_OvrFlw_Deal(void);
byte Chk_Buff_Full(void);
#ifdef STOCK /* Support the stock function */
long calTotStk(word idx);
void Prompt_Stock_Empty(void);
#endif /* End STOCK */
void Update_Cash_Rpt(void);
void Update_Sale_Rpt(void);
#ifdef VER_RSNT /* Support the restaurant function */
void Do_Open(void);
void Do_Suspend(void);
void Do_Tnsfer(void);
void Clr_Table(byte Idx);
byte Get_Table(long num, int *pidx);
byte waiterpass(void);
void Do_TipIn(void);
void Do_TipOut(void);
#endif
#ifdef RCPT_REPRN /* Support the receipt reprint function */
void RePrn_Rcpt(byte new_disp_flag);
#endif /* End RCPT_REPRN */
void prn_REG_TVAT(void);
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
Report mode used funcions
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
void xzrepmain(void);
byte Do_Daily_Rpt(void);
byte Do_PTD_Rpt(void);
void Do_XZrep(REPORT *report, byte mode);
void Do_Check_Rep(REPORT *report);
void Do_Charge_Rep(REPORT *report);
void Do_ClrGndTtl(byte flag);
void Do_Daily_Dept_Rpt(void);
void Do_PTD_Dept_Rpt(void);
void Do_Dept_Rep(byte mode);
byte Do_Daily_Dept_Group_Rpt(void);
byte Do_PTD_Dept_Group_Rpt(void);
void Do_Dept_Group_Rep(byte Idx, byte mode);
byte Do_Daily_PLU_Rpt(void);
byte Do_PTD_PLU_Rpt(void);
void Do_PLU_Rep( word Start, word End, byte mode );
void Do_PLU_Area_Rpt(void);
void prn_PLU_Area_Rep(word Start, word End);
byte Do_Daily_PLU_Group_Rpt(void);
byte Do_PTD_PLU_Group_Rpt(void);
void Do_PLU_Group_Rep( byte Idx, byte mode );
byte Get_Dept_PLU_Group_Num(byte mode);
void Do_Daily_Clerk_Rpt(void);
void Do_PTD_Clerk_Rpt(void);
void Do_Clerk_Rep(byte mode);
void Do_Hourly_Rpt(void);
void prn_Idvul_Head( byte HeadNo );
void Do_Idvul_Rpt( word Idx );
void prn_Idvul_Tail(byte Idvul_Flag);
void Do_PLU_Stock_Rpt(void);
void Rpt_Prn(char *src_str, byte str_len, long Cnt_Qtt, byte flag, long amount, byte dots);
void Rep_Head_Prn(void);
void Clr_Full_Rpt(REPORT *report, byte mode);
void Clr_PLU_Rpt(byte mode);
void Clr_Clerk_Rpt(byte mode);
void Clr_Hourly_Rpt(void);
void Clr_Table_Rpt(void);
void Clr_Waiter_Rpt(void);
#ifdef FCE_FUNC /* Support the FCE function */
void Do_FCE_Rep(byte mode);
#endif /* End FCE_FUNC */
void Do_Top_PLU_Amt(byte mode);
void Do_Top_PLU_Qty(byte mode);
void prn_Top_PLU(int *top_plu, byte length, byte mode);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -