⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ecrsys.h

📁 一款收款机C源代码!因为是几年前的代码了
💻 H
📖 第 1 页 / 共 5 页
字号:
																TS_AUTO_PER_DEPT	// Department Auto Percent function
																TS_AUTO_PER_PLU	// PLU Auto Percent function
															High 3 bits is used for the percent operations index number.
					               					*/
					byte	flag;						/* High 4 bits:
																The operation roundings.
															Low 4 bits:
																The VAT or tax included.
															*/
					word	nth;						/* The transaction index number */
					long	price;					/* The transaction item price */
					long	quantity;				/* The transaction quantity */
				}TRANSBUFFDEF;	/* transaction buffer definition (12 bytes) */
									/* Note: In percent operation or the auto percent operation, 
												The price mean the rebate price, and the quantity
												mean the percent rate.
												The quantity is always positive, except if it store the percent rate.
												The price is signed.
												*/


typedef struct{
					byte	flag;						/* VAT/TAX flag, indicate the VAT or the tax,
															0: VAT
															1: TAX
															*/
					byte	round;					/* VAT/Tax round */
					byte	table_no;				/* Used in the Restaurant funciton, save the table information */
					long	rate[MAX_VAT_NUM];	/* The VAT or the tax rate */
				}TRANSTVATDEF;		/* 19+8 bytes */


typedef struct{
               int	nth;						/* The sales index number */
               long	price;   				/* The sales item price */
               long	count;   				/* The sales quantity */
               long	amount;					/* The sales total amount */
            }Transaction;	/* 14 bytes */


typedef  struct{
					long	saleAmt_TVAT[MAX_VAT_NUM];		/* VAT or tax sales able amount in one transaction */
					long	TVATAmt[MAX_VAT_NUM];			/* VAT or tax sales value in one tranaction */
               long	netamt;					/* Net sales amount in one transaction */
               long	subtotal;				/* Sub total in one transaction */
            }Inter_Var; 	/* 40+8+8 bytes  */


#ifdef VER_RSNT /* Support the restaurant function */
typedef struct{
                    byte year;
                    byte month;
                    byte day;
                    byte hour;
                    byte minute;
                    byte second;
                    byte waiter;
                    byte last_len;  // 在这次开台之前的以前的交易长度
}TABLE_DETAIL_DEF;      // 台的详细结构,包括每一次的开单时间,以及开台时候的收银员
#define MAX_TABLE_DETAIL        10      // 最多只让它有开台10次的机会,如果超过10次,全部算到最后一次上面
typedef struct{		/* The restaurant mode table structure */
					byte				status;				/* The tabel activity status
																	0: Not active
																	1: Active
																	*/
					byte				clerkno;				/* Open this table's clerk */
					byte				waiterno;			/* This table's waiter */

					/* - - - - - - - - - - - - - - - - - - - - - */
					TRANSBUFFDEF	tablebuff[MAX_TABLE_BUFF_NUM];		/* The table transaction buffer */
					byte				bufflen;				/* the table transaction buffer length */
					TRANSTVATDEF	tabletvat;
					Transaction		trans;
					Inter_Var		tmpvars;
					byte				VAT_Idx;
                    byte                TaxFlag[MAX_TAX_NUM];
//					byte				Tax1Flag;
//					byte				Tax2Flag;
//					byte				Tax3Flag;
					/* - - - - - - - - - - - - - - - - - - - - - */
					byte				reserve[18];		/* The reserved cell */

					long				Logi_No;				/* The table's logical number, 001 ~ max */
					word				count;				/* The table report of total count */
					long				amount;				/* The table report of total amount */

                    byte                fill_color;     /* 背景填充颜色 */
                    byte                font_color;     /* 字体填充颜色 */
                    byte                split_cnt;      /* 分台数量 */

                    TABLE_DETAIL_DEF    detail[MAX_TABLE_DETAIL];   /* The table detail, contains date, time, clerk */
                    byte                open_times;     // 开台次数

					char	desc[MAX_DESC_LEN];			/* The table's description */
				}TABLEDEF;		/* 1369 (1200+169) bytes, max 100 tables */
#endif /* End VER_RSNT */


typedef	struct{
					byte				id;					/* Weight bar PLU ID, 20~29, 99 */
					byte				len;					/* Weight bar PLU length, 1~9 */
					byte				flag;					/* Weight bar PLU flag, 0: Price, 1: Weight */

					// The next structure is used for the sale temporary data.
					byte				reg_flag;
					long				reg_count;
					long				reg_amount;
				}WGT_BAR_DEF;

#define MAX_PORT_NUM	4

typedef struct {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
		Terminal status 1 -- print set parameters
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */	
    byte    date_prn;       //print date on the receipt? 			0-NO / 1-YES 
    byte    time_prn;       //Print Time on reeipt?      			0-NO / 1-YES 
    byte    clerk_prn;      //Print Clerk on receipt?    			0-NO / 1-YES                   
    byte    Header_prn;     //Print Header on receipt?   			0-NO / 1-YES                 
    byte    footer_prn;     //Print footer on receipt?      		        0-NO / 1-YES                
    byte    Tax_prn;        //Print Tax Amount on receipt?  		0-NO / 1-YES                   
    byte    Tax_Ttl_prn;    //Print Tax Total on receipt?   		        0-NO / 1-YES                      
    byte    Blank_Line_prn; //Print Blank line on receipt?  		        0-NO / 1-YES                  
    byte    Subt_PressPrn;       /**  Print the subttl data when press the subttl key
                                 **  in the REGISTER mode flag
                                 **  0: Do not print the subttldata when press the subttl key
                                 **  1: Print the subttl data when press the subttl key
                                 **/ 
    byte    Subt_Prn;      // print the subttl Info. on the receipt: 0-NO/ 1-YES                           
    byte    Mche_Num_prn;   //Print the machine No. on receipt?         0-NO / 1-YES      
    byte    Rcpt_Num_prn;   //Print the receipt No. on receipt?           0-NO / 1-YES
    byte    zero_skip;      //Zero item skip when X/Z report printing?    0-NO / 1-YES
    byte    Z_Rpt_Reprn;    //Z report second copy Active or not?    0-NO / 1-YES
    byte    Rcpt_Reprn;     //Multiple receipt allow or not?                0-NO / 1-YES
    byte    Z_Cntr_prn;     //Print the Z counter to Z report?            0-NO / 1-YES
    byte    RPLDP_flag;     //Print Dept No. when PLU sale?                     0-NO / 1-YES
    byte    NS_switch;      //Print the receipt when #/NS key is depressed?0-NO / 1-YES
    byte    Rcpt_prn;       //Print the sale receipt or not?                0-NO / 1-YES
    byte    Crncy_Symbl_Prn; //Print Local Currency Symbol                     0-NO / 1-YES
    byte    PLU_Prn_Fmt;    /*  PLU sale's print format 
                                0-name and price only
                                1-barcode and PLU # only
                                2-name and PLU#/Barcode only
                            */
    byte    Logo_Prn_Flag;//    {"Picture Logo active"},                            0-NO / 1-YES
    byte    LogoPosi_Flag;   //Position of picture logo select      0-NO / 1-YES
                                                               
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
          Terminal status 2 -- system config parameters 
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */   

    byte    datefmt;             // Date Format: 0: MM-DD-YY/ 1: DD-MM-YY/ 2: YY-MM-DD
    byte    timefmt;             //Time Format:  0: 24 hour / 1: 12 hour with AM/PM
    byte    Language;            //Language choice (0: English/1: French/2: Spanish)  
    byte    Tax_System;          //Tax system (0: USA Tax/1: VAT/2: GST-PST)     //暂时为(0:VAT /1:TAX/ 2:GST)               
    byte    sysdots;             /** decimal point(0~3) **/   
    byte    Power_Save;          //Power saving                                    
    byte    Bright;              //Brightless of TFT display                       

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
          Terminal status 3 -- system sections parameters 
 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */   
        
    byte dept_shift;            //    {"Dept Shift key active"},
    byte DPLU_shift;            //    {"DPLU shift key active"},
    byte PLU_Stock_Flag;        //    {"Inventory function active"},
    byte zero_trans_flag;       //    {"Zero price for Dept/PLU sale"},
//    #ifdef ELEC_JRNL
    byte Log_Atv_Flag;          //    {"EJ features active"},
//    #endif
    byte Cmpls_Amt_Mode;        //    {"Compulsory amount tend when payment"},
    byte DPAmt_Per_Ttl_Flag;    //    {"% IN DEPT for report"},//部门所占销售总额的百分比.
    byte z_reset_rcpt_no;       //    {"Reset the receipt# after daily Z report printed"},
    byte Rst_ZCntr_Flag;        //    {"Reset the Z counter aftere daily Z report printed"},
    byte Rst_GndTt_Flag;        //    {"Reset the Ground Total after daily Z report printed"},
    byte clerk_mode;            //    {"Clerk System active"},
    byte Clerk_Pscd_Flag;       //    {"Clerk passcode active"},
    byte Screen_Saver;           //    {"Screen Saver selects        "},
    byte Crncy_Symbol;          //    {"Currency Symbol Choice      "},
                
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
      Terminal status 4 -- system parameters 
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */   
    long    CouponHalo;
    long    HaloNum;              /** High amount lock out number **/  
    byte    CurrLogoNo;             /* The current logo unmber */               
    word    McheNum;              /** Machine number **/                       
    long    RcptNum;            /** Recepit number **/
    long    top_cash_ttl;         /* The top cash total in drawer */
    DoubleLong GrandTotal;

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
      Terminal status 5 -- Weight Barcode ID 
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */   
    WGT_BAR_DEF   wgt_bar;            /* The weight bar PLU structure */    

    long        XPasscode;
    long        PZPasscode;
    long        TraningPscd;
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
               reserved Terminal status 
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */                           
 					byte	Prn_Bar_Flag;			/**	Print the PLU bar code flag **/
        word    Security;               /** Used in the soft control lock mode, for input the 
                                             ** password in the P mode and Z mode.
                                             ** Note: when the value is 0, no need to input the password.
                                             **/
        dword LCD_BL_Time;          /* The LCD backlight time */
        word    set_timmer;
        
        byte    tax_shift_mode;         /**  When press tax shift key, the function is ont shot or stay down
                                        **  0:  Tax shift one-shot
                                    **  1:  Tax shift stay-down
                                    **/
        
        byte    tax_round;              /** Tax or VAT rounding
                                     ** 00:  Round 2 decimal places             round
                                     ** 01:  Round up to 2 decimal places       round up
                                     ** 10:  Round off 2 decimal places  (10)   cut off
                                     **/ 
        byte  pplus_tax;             /**  0:  Make percent + key registration non-taxable
                                 **  1:  Program percent + key registration taxable Bit 0 ~ 3 used for tax 1 ~4
                                 **/

        byte  pminus_tax;            /**  0:  Make percent - key registration non-taxable
                                 **  1:  Program percent - key registration taxable Bit 0 ~ 3 used for tax 1 ~4
                                 **/

        byte  RF_grand_prnz;         /**  Hi 4 : grand_prnz
                               **  0:  Do not print Grand Sales Total on the Z-report
                               **  1:  Print Grand Sales Total on the Z-report
                                   Lo 4 : RF_prnxz;
                               **  0:  Print RF Mode refund count/amount on X/Z reports
                               **  1:  Do not Print RF Mode refund count/amount on X/Z
                               **      reports
                               **/


        //                  #ifdef VER_RSNT     /* Support the restaurant function */
        byte Rsnt_OneKey;            /**  The restaurant mode Used one key replace the 3 keys function.
                                     ** Open Table:     [Table No] + [KEY]
                                     ** Close Table:    [0] + [KEY];
                                     ** Transfer Table:[Source] + [XTIME] + [Destination] + [KEY]
                                     ** 0:  Do not support the one key function
                                     ** 1: Support the one key function
                                     **/

        byte Rsnt_RcptAdj;           /**  The restaurant mode and in the sale mode, the whole receipt
                                     ** print is adjust or not(When adjust it, it will print
                                     ** the same department information in one line)
                                     ** 0:  Not adjust the receipt print
                                     ** 1: Adjust the receipt print
                                     **/

        byte    Cut_Mant;               /**  The restaurant mode and in the sale mode, cut the mantissa
                                             **     Automatically or not.
                                             **     0:  Not automatically cut the mantissa
                                             ** 1: Cut the mantissa automatically
                                             **/
        //               #endif /* End VER_RSNT */
					byte	check_clerk;			/**  When open the table, checking the clerk's password or not
														 **  0: Not to check the clerk.
														 **  1: Check the clerk's password when open the table.
														 **/
					byte	soft_lock_flag;		/**  Soft control lock used flag,
														 **  0: Not use the soft control lock.
														 **  1: Use the soft control lock.
														 **/
					byte	xCount_round;			/** The REGISTER mode do the multiplucation roundings.
		                                     ** 00:  Round    (1.544=1.54, 1.545=1.55)
		                                     ** 01:  Round up (1.544=1.55, 1.545=1.55)
		                                     ** 10:  Cut off  (1.544=1.54, 1.545=1.54)
		                                     **/
 
        byte  LineFeedCnt;                  /* The line feed counter */
        byte    Auto_Per_Use_Flag;  /**  Use the auto percent function or not flag
                                          **  0: Not use the auto percent function.
                                          **  1: Use the auto percent function.
                                          **/
        byte    Auto_Per_Prn_Flag;  /**  When print the department's attribute, print the auto
                                          **  percent rate or not.
                                          **  0:  Can not print the auto percent rate.
                                          **  1:  Must print the auto percent rate.
                                 **/
                  byte    Input_Bar_Mode;     /**  Input the PLU's barcode mode or not flag, 
                                             

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -