package api type BaseResponse struct { Task int `json:"task"` Type int `json:"type"` Ver int `json:"ver"` Source string `json:"source"` Device string `json:"device"` Tag string `json:"tag"` Dt string `json:"dt"` Res int `json:"res"` ResAction int `json:"res_action"` Errortxt string `json:"errortxt"` Warnings []string `json:"warnings"` ErrorExtra interface{} `json:"error_extra"` } func (r *BaseResponse) HasError() bool { return r.Res != 0 } func (r *BaseResponse) Error() string { if r.Errortxt != "" { return r.Errortxt } return "" } type SellResponse struct { BaseResponse Info SellInfo `json:"info"` } type SellInfo struct { Task int `json:"task"` Fisid string `json:"fisid"` Dataid int `json:"dataid"` Doccode string `json:"doccode"` Docno interface{} `json:"docno"` Dt string `json:"dt"` Cashier string `json:"cashier"` Dtype int `json:"dtype"` Isprint int `json:"isprint"` Isoffline bool `json:"isoffline"` Safe float64 `json:"safe"` ShiftLink int `json:"shift_link"` ShiftPrevLink int `json:"shift_prev_link"` ShiftID string `json:"shift_id"` OpenShiftDt string `json:"open_shift_dt"` Cancelid string `json:"cancelid,omitempty"` SafeStartShift float64 `json:"safe_start_shift"` } type ZReportResponse struct { BaseResponse Info ZReportInfo `json:"info"` } type ZReportInfo struct { Task int `json:"task"` Fisid string `json:"fisid"` Dataid int `json:"dataid"` Doccode string `json:"doccode"` Docno interface{} `json:"docno"` Dt string `json:"dt"` Cashier string `json:"cashier"` Dtype int `json:"dtype"` Isprint int `json:"isprint"` Isoffline bool `json:"isoffline"` Safe float64 `json:"safe"` ShiftLink int `json:"shift_link"` Receipt ZReportReceipt `json:"receipt"` Summary ZReportSummary `json:"summary"` Taxes []ZReportTax `json:"taxes"` Pays []ZReportPay `json:"pays"` Money []ZReportMoney `json:"money"` Cash []ZReportMoney `json:"cash"` MoneyTransfer []interface{} `json:"money_transfer"` } type ZReportReceipt struct { CountP int `json:"count_p"` CountM int `json:"count_m"` Count14 int `json:"count_14"` CountTransfer int `json:"count_transfer"` LastDocnoP int `json:"last_docno_p"` LastDocnoM int `json:"last_docno_m"` } type ZReportSummary struct { BaseP float64 `json:"base_p"` BaseM float64 `json:"base_m"` TaxexP float64 `json:"taxex_p"` TaxexM float64 `json:"taxex_m"` DiscP float64 `json:"disc_p"` DiscM float64 `json:"disc_m"` } type ZReportTax struct { GrCode int `json:"gr_code"` BaseSumP float64 `json:"base_sum_p"` BaseSumM float64 `json:"base_sum_m"` BaseTaxSumP float64 `json:"base_tax_sum_p"` BaseTaxSumM float64 `json:"base_tax_sum_m"` BaseExSumP float64 `json:"base_ex_sum_p"` BaseExSumM float64 `json:"base_ex_sum_m"` TaxName string `json:"tax_name"` TaxFname string `json:"tax_fname"` TaxLit string `json:"tax_lit"` TaxPercent float64 `json:"tax_percent"` TaxSumP float64 `json:"tax_sum_p"` TaxSumM float64 `json:"tax_sum_m"` ExName string `json:"ex_name"` ExPercent float64 `json:"ex_percent"` ExSumP float64 `json:"ex_sum_p"` ExSumM float64 `json:"ex_sum_m"` } type ZReportPay struct { Type int `json:"type"` Name string `json:"name"` SumP float64 `json:"sum_p"` SumM float64 `json:"sum_m"` RoundPu float64 `json:"round_pu"` RoundPd float64 `json:"round_pd"` RoundMu float64 `json:"round_mu"` RoundMd float64 `json:"round_md"` } type ZReportMoney struct { Type int `json:"type"` Name string `json:"name"` SumP float64 `json:"sum_p"` SumM float64 `json:"sum_m"` RoundPu float64 `json:"round_pu"` RoundPd float64 `json:"round_pd"` RoundMu float64 `json:"round_mu"` RoundMd float64 `json:"round_md"` }