📄 ecrsys.h
字号:
word idx; // 为某种ID的序号
byte fill_color; // 背景填充颜色
byte font_color; // 字体颜色
}VIRTUAL_KEY_DEF; // 虚拟按键的结构体定义
typedef struct { /* 24 Departments */
byte pflag; /** flag
** Lo 4 bits: 0~7 ---- tax 1~3 or VAT 1~6
** Hi 4 bits: 0: normal; 1: single item
**/
byte pflag2; /** flag2
** low 4 bits: 0-normal / 1-Negative / 2-Gallonage
** High 4 bits: 0-No Age Limit / 1- First Age / 2-Snd Age
**/
BOOL sale; /* Allow sale or not */
byte group; /* The DEPT group number */
byte Hdlo; /* High digit lock out maximun digits */
long price; /* The price of department. */
byte fill_color;
byte font_color;
#ifdef AUTO_PER /* Support the department auto percent function */
long per_rate; /* The auto percent rate */
byte per_flag; /* The +% or the -%
0: +%
1: -%
*/
#endif /* End AUTO_PER */
#ifdef VER_RSNT /* Support the restaurant function */
byte send_kp_flag; /* Allow send the information to the kitchen printer flag
0: Not allow
1: allow
*/
#endif /* End VER_RSNT */
byte CkMsg[MAX_DEPT_CM_NO];
byte cm_cnt; /* Cooking Message counter */
long quantity; /* Sales quantity, contain 3 dots */
long amount; /* sales amount */
long PTD_quantity; /* The P-T-D department sales quantity, contain 3 dots. */
long PTD_amount; /* The P-T-D department sales amount. */
char desc[MAX_DESC_LEN_EX+1]; /* Deaprtments description */
}DEPTDEF; /* 35+5+1 bytes */
#ifdef REST_PLU_FUNC
typedef struct{
char mode: 2; /* 0:normal plu
1:description plu
2:gift plu
3:Reserved plu
*/
char inht: 1; /*0: Inhibit attribute
1: allow
*/
char res_bit3: 1; /* Reserved bit3 */
char res_bit4: 1; /* Reserved bit4 */
char res_bit5: 1; /* Reserved bit5 */
char res_bit6: 1; /* Reserved bit6 */
char res_bit7: 1; /* Reserved bit7 */
}PATTRDEF;
typedef struct{
byte table; /*the Relationship table number*/
int mainplu; /*the mainplu number*/
int slaveplu; /*the slaveplu number*/
}PLUTABDEF;
typedef struct {
long quantity; /* Sales quantity, contain 3 dots */
long amount; /* sales amount */
word count;
long PTD_quantity;
long PTD_amount;
word PTD_count;
word menu_plu[MAX_MEAL_ITEM];
}MENUPLUDEF;
#endif
typedef struct { /* 999 PLUS */
#ifdef SCANNER /* Support the scanner function */
byte barcode[BAR_BUFF_LEN]; /* PLU bar code, use the BCD code */
#endif /* End SCANNER */
#ifdef STOCK /* Support the stock function */
long inventory; /* The inventory of PLU */
long saft_Stock;
#endif /* End STOCK */
byte plink; /* dept link(1~50) */
#ifdef REST_PLU_FUNC
PATTRDEF attr; /* Comment adds… */
#else
byte reserved; /* The reserved area */
#endif
byte group;
byte fill_color;
byte font_color;
long price; /* The price of PLU. */
long price2;
long price3;
long quantity; /* Sales quantity, contain 3 dots */
long amount; /* sales amount */
#ifdef PLU_PTD_RPT
long PTD_quantity; /* The P-T-D PLU sales quantity, contain 3 dots */
long PTD_amount; /* The P-T-D PLU sales amount. */
#endif
char desc[MAX_DESC_LEN_EX+1]; /* The PLUs description */
}PLUDEF; /* 33+7+4-8+1 bytes */
typedef struct{ /* 15 clerks */
word secret; /* the password of clerk, max is 4 */
word count; /* The clerk operation count */
long amount; /* The clerk operation amount */
word PTD_count; /* The P-T-D clerk operation count; */
long PTD_amount; /* The P-T-D clerk operation amount. */
char desc[MAX_DESC_LEN]; /* Description */
}CLERKDEF; /* 26 bytes */
#ifdef VER_RSNT /* Support the restaurant function */
typedef struct{
word secret; /* the password of waiter, max is 4 */
word count; /* The waiter operation count */
long amount; /* The waiter operation amount */
word TipInCount;
long TipInAmount;
word TipOutCount;
long TipOutAmount;
char desc[MAX_DESC_LEN]; /* Description */
}WAITERDEF; /* 32 bytes */
#endif /* End VER_RSNT */
typedef struct{
byte flag; /* status sutl% item% +/-
0 y y + 0000B
1 y y - 0001B
2 y n + 0010B
3 y n - 0011B
4 n y + 0100B
5 n y - 0101B
6 n n + 0110B
7 n n - 0111B
6&7 have no practical meaning
*/
long rate;
byte round; /* b1 b0:
0 0: Round (1.544=1.54, 1.545=1.55 ) 0
0 1: Round up (1.544=1.55, 1.545=1.55 ) 1
1 0: Cuf off (1.544=1.54, 1.545=1.54 ) 2
*/
long amount;
char desc[MAX_DESC_LEN]; /* Description */
}PERDEF; /* 22 bytes */
typedef struct {
byte reserve; /* The reserve byte */
byte flag; /* use to tex*/
long price; /* The refund value */
long HALO; /* the coupoe halo*/
char desc[MAX_DESC_LEN]; /* Description */
}RFNDDEF; /* 18 bytes */
#if SW_VER == SW_NE2
typedef struct{
byte rate;
char desc[MAX_DESC_LEN]; /* Descriptior */
}TVATDEF;
#else
typedef struct{
long rate;
char desc[MAX_DESC_LEN]; /* Descriptior */
}TVATDEF;
#endif
#ifdef FCE_FUNC /* Support the FCE function */
typedef struct {
byte flag; /* Indicate the FCE rate operation:
0: rate
1: 1/rate
*/
byte round; /* FCE roundings:
00: Round
01: Round up
10: Round off
*/
byte symbol; /*current FC sybbol*/
byte dot; /* FCE dot: The dot of the rate */
long rate; /* FCE rate */
long local;
word count; /* FCE transaction count */
long ttlindwr; /* FCE total in drawer */
long chg; /* The change */
word PTD_count; /* P-T-D FCE transaction count */
long PTD_ttlindwr; /* P-T-D FCE total in drawer */
long PTD_chg; /* P-T-D FCE change */
char desc[MAX_DESC_LEN]; /* Description */
}FCEDEF; /* 38 bytes */
#endif /* End FCE_FUNC */
typedef struct{ /* Preset CASH structure define */
long price; /* The preset price */
char desc[MAX_DESC_LEN]; /* Description */
}PCASHDEF;
#ifdef ELEC_JRNL /* Support the electronic journal function */
typedef struct{
byte ID; /* Low 5 bits: TS_SALE_JRNL // Sale journal
TS_DC_JRNL // Discount journal
TS_RM_JRNL // R.M. journal
High 3 bits: 0, Indicate the next buffer not to record
the VAT/Tax information. (The VAT/Tax rate is 0)
1, Indicate the next buffer record the tax information.
2, Indicate the next 2 buffers record the VAT informaion.
Note: This is only used for the sales journal, the discount
journal and the return merchandise journal is always 0.
*/
word receipt_no; /* Receipt number */
byte clerk_no; /* Clerk number */
// byte waiter_no; /* Waiter number */
byte reserved; /* Reserved */
byte table_no; /* Table number */
byte year; /* Year, 00~99, take up low 7 bits */
byte month; /* Month, 01~12, take up low 4 bits */
byte day; /* Day, 01~31, take up low 5 bits */
byte hour; /* Hour, 00~23, take up low 5 bits */
byte minute; /* Minute, 00~59, take up low 6 bits */
byte length; /* The total length (Include the head buffer and the VAT/Tax buffer)
of each journal */
}ELECJRNLHEADDEF; /* The head of the electronic journal head's structure */
/* 12 bytes */
typedef struct{
byte ID; /* TS_ELEC_JRNL_TVAT */
byte round; /* The VAT/Tax roundings,
00: round,
01: round up,
02: cut off
*/
// byte reserved[2]; /* Reserved area */
// long rate[2]; /* The max tax number is 2 */
byte reserved; /* Reserved area */
byte rate[3][3]; /* The max tax number is 3 */
// 注: 在WD1+软件版本中, 曾经把VAT与Tax的数量都增加了, 所以这里把VAT的格式更改成为压缩BCD码的格式 */
}ELECJRNLTVATDEF; /* The electronic jornal VAT/Tax information buffer's structure */
/* 12 bytes */
typedef struct{
byte ID; /* TS_ELEC_JRNL_TVAT2 */
// byte reserved[3]; /* Reserved area */
// long rate[2];
byte reserved[2]; /* Reserved area */
byte rate[3][3];
}ELECJRNLTVATDEF2; /* The electronic jornal VAT information buffer's (The second VAT
informaion buffer) structure. (For the max VAT number is 4) */
/* 12 bytes */
#endif /* End ELEC_JRNL */
typedef struct{
byte ID; /* Indicate the operation, Low 5 bits:
TS_DEPT // Department normal operation
TS_PLU // PLU normal operation
TS_VD_DEPT // Department VOID operation
TS_VD_PLU // PLU VOID operation
TS_RM_DEPT // Department RETURN operation
TS_RM_PLU // PLU RETURN operation
TS_RF_ITEM_DEPT // Department Refund after item operation
TS_RF_ITEM_PLU // PLU Refund after item operation
TS_RF_SUBT // Refund after sub total operation
TS_PER_ITEM_DEPT // Department Percent after item operation
TS_PER_ITEM_PLU // PLU Percent after item operation
TS_PER_SUBT // Percent after sub total operation
TS_EC // Error correct operation
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -