models

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	XMLName xml.Name `xml:"Error"`
	Text    string   `xml:",chardata"`
	Message string   `xml:"Message"`
}

type ITEM

type ITEM struct {
	XMLName xml.Name `xml:"ITEM"`
	Text    string   `xml:",chardata"`
	ID      string   `xml:"ID"`
	DESC    string   `xml:"DESC"`
	QTY     float64  `xml:"QTY"`
	TAXCODE int64    `xml:"TAXCODE"`
	AMT     float64  `xml:"AMT"`
}

type ITEMS

type ITEMS struct {
	XMLName xml.Name `xml:"ITEMS"`
	Text    string   `xml:",chardata"`
	ITEM    []*ITEM  `xml:"ITEM"`
}

type PAYMENT

type PAYMENT struct {
	XMLName   xml.Name `xml:"PAYMENT"`
	Text      string   `xml:",chardata"`
	PMTTYPE   string   `xml:"PMTTYPE"`
	PMTAMOUNT string   `xml:"PMTAMOUNT"`
}

type PAYMENTS

type PAYMENTS struct {
	XMLName xml.Name   `xml:"PAYMENTS"`
	Text    string     `xml:",chardata"`
	PAYMENT []*PAYMENT `xml:"PAYMENT"`
}

type RCT

type RCT struct {
	XMLName    xml.Name  `xml:"RCT"`
	Text       string    `xml:",chardata"`
	DATE       string    `xml:"DATE"`
	TIME       string    `xml:"TIME"`
	TIN        string    `xml:"TIN"`
	REGID      string    `xml:"REGID"`
	EFDSERIAL  string    `xml:"EFDSERIAL"`
	CUSTIDTYPE int64     `xml:"CUSTIDTYPE"`
	CUSTID     string    `xml:"CUSTID"`
	CUSTNAME   string    `xml:"CUSTNAME"`
	MOBILENUM  string    `xml:"MOBILENUM"`
	RCTNUM     string    `xml:"RCTNUM"`
	DC         int64     `xml:"DC"`
	GC         int64     `xml:"GC"`
	ZNUM       string    `xml:"ZNUM"`
	RCTVNUM    string    `xml:"RCTVNUM"`
	ITEMS      ITEMS     `xml:"ITEMS"`
	TOTALS     TOTALS    `xml:"TOTALS"`
	PAYMENTS   PAYMENTS  `xml:"PAYMENTS"`
	VATTOTALS  VATTOTALS `xml:"VATTOTALS"`
}

func (*RCT) RoundOff

func (r *RCT) RoundOff()

RoundOff is a helper function to round off the all the values of RCT with float64 as a Data Type to 2 decimal places.

type RCTACK

type RCTACK struct {
	XMLName xml.Name `xml:"RCTACK"`
	Text    string   `xml:",chardata"`
	RCTNUM  int64    `xml:"RCTNUM"`
	DATE    string   `xml:"DATE"`
	TIME    string   `xml:"TIME"`
	ACKCODE int64    `xml:"ACKCODE"`
	ACKMSG  string   `xml:"ACKMSG"`
}

RCTACK is the receipt acknowledge received from vfd server after successfully receipt upload request

type RCTACKEFDMS

type RCTACKEFDMS struct {
	XMLName        xml.Name `xml:"EFDMS"`
	Text           string   `xml:",chardata"`
	RCTACK         RCTACK   `xml:"RCTACK"`
	EFDMSSIGNATURE string   `xml:"EFDMSSIGNATURE"`
}

type REGDATA

type REGDATA struct {
	XMLName xml.Name `xml:"REGDATA"`
	Text    string   `xml:",chardata"`
	TIN     string   `xml:"TIN"`
	CERTKEY string   `xml:"CERTKEY"`
}

type REGDATAEFDMS

type REGDATAEFDMS struct {
	XMLName        xml.Name `xml:"EFDMS"`
	Text           string   `xml:",chardata"`
	REGDATA        REGDATA  `xml:"REGDATA"`
	EFDMSSIGNATURE string   `xml:"EFDMSSIGNATURE"`
}

type REGDATARESP

type REGDATARESP struct {
	XMLName     xml.Name `xml:"EFDMSRESP"`
	Text        string   `xml:",chardata"`
	ACKCODE     string   `xml:"ACKCODE"`
	ACKMSG      string   `xml:"ACKMSG"`
	REGID       string   `xml:"REGID"`
	SERIAL      string   `xml:"SERIAL"`
	UIN         string   `xml:"UIN"`
	TIN         string   `xml:"TIN"`
	VRN         string   `xml:"VRN"`
	MOBILE      string   `xml:"MOBILE"`
	ADDRESS     string   `xml:"ADDRESS"`
	STREET      string   `xml:"STREET"`
	CITY        string   `xml:"CITY"`
	COUNTRY     string   `xml:"COUNTRY"`
	NAME        string   `xml:"NAME"`
	RECEIPTCODE string   `xml:"RECEIPTCODE"`
	REGION      string   `xml:"REGION"`
	ROUTINGKEY  string   `xml:"ROUTINGKEY"`
	GC          int64    `xml:"GC"`
	TAXOFFICE   string   `xml:"TAXOFFICE"`
	USERNAME    string   `xml:"USERNAME"`
	PASSWORD    string   `xml:"PASSWORD"`
	TOKENPATH   string   `xml:"TOKENPATH"`
	TAXCODES    TAXCODES `xml:"TAXCODES"`
}

REGDATARESP is the response message received from the VFD after a successful registration.

type REGRESPACK

type REGRESPACK struct {
	XMLName        xml.Name    `xml:"EFDMS"`
	Text           string      `xml:",chardata"`
	EFDMSRESP      REGDATARESP `xml:"EFDMSRESP"`
	EFDMSSIGNATURE string      `xml:"EFDMSSIGNATURE"`
}

type REPORTTOTALS

type REPORTTOTALS struct {
	XMLName          xml.Name `xml:"TOTALS"`
	Text             string   `xml:",chardata"`
	DAILYTOTALAMOUNT float64  `xml:"DAILYTOTALAMOUNT"`
	GROSS            float64  `xml:"GROSS"`
	CORRECTIONS      float64  `xml:"CORRECTIONS"`
	DISCOUNTS        float64  `xml:"DISCOUNTS"`
	SURCHARGES       float64  `xml:"SURCHARGES"`
	TICKETSVOID      int64    `xml:"TICKETSVOID"`
	TICKETSVOIDTOTAL float64  `xml:"TICKETSVOIDTOTAL"`
	TICKETSFISCAL    int64    `xml:"TICKETSFISCAL"`
	TICKETSNONFISCAL int64    `xml:"TICKETSNONFISCAL"`
}

type ReportAckEFDMS

type ReportAckEFDMS struct {
	XMLName        xml.Name `xml:"EFDMS"`
	Text           string   `xml:",chardata"`
	ZACK           ZACK     `xml:"ZACK"`
	EFDMSSIGNATURE string   `xml:"EFDMSSIGNATURE"`
}

type TAXCODES

type TAXCODES struct {
	XMLName xml.Name `xml:"TAXCODES"`
	Text    string   `xml:",chardata"`
	CODEA   string   `xml:"CODEA"`
	CODEB   string   `xml:"CODEB"`
	CODEC   string   `xml:"CODEC"`
	CODED   string   `xml:"CODED"`
}

type TOTALS

type TOTALS struct {
	XMLName      xml.Name `xml:"TOTALS"`
	Text         string   `xml:",chardata"`
	TOTALTAXEXCL float64  `xml:"TOTALTAXEXCL"`
	TOTALTAXINCL float64  `xml:"TOTALTAXINCL"`
	DISCOUNT     float64  `xml:"DISCOUNT"`
}

type VATTOTAL

type VATTOTAL struct {
	XMLName    xml.Name `xml:"VATTOTAL"`
	Text       string   `xml:",chardata"`
	VATRATE    string   `xml:"VATRATE"`
	NETTAMOUNT string   `xml:"NETTAMOUNT"`
	TAXAMOUNT  string   `xml:"TAXAMOUNT"`
}

type VATTOTALS

type VATTOTALS struct {
	XMLName  xml.Name    `xml:"VATTOTALS"`
	Text     string      `xml:",chardata"`
	VATTOTAL []*VATTOTAL `xml:"VATTOTAL"`
}

type ZACK

type ZACK struct {
	XMLName xml.Name `xml:"ZACK"`
	Text    string   `xml:",chardata"`
	ZNUMBER int64    `xml:"ZNUMBER"`
	DATE    string   `xml:"DATE"`
	TIME    string   `xml:"TIME"`
	ACKCODE int64    `xml:"ACKCODE"`
	ACKMSG  string   `xml:"ACKMSG"`
}

ZACK is the Z report acknowledge received from vfd server after successfully Z report upload request

type ZREPORT

type ZREPORT struct {
	XMLName xml.Name `xml:"ZREPORT"`
	Text    string   `xml:",chardata"`
	DATE    string   `xml:"DATE"`
	TIME    string   `xml:"TIME"`
	HEADER  struct {
		Text string   `xml:",chardata"`
		LINE []string `xml:"LINE"`
	} `xml:"HEADER"`
	VRN              string       `xml:"VRN"`
	TIN              string       `xml:"TIN"`
	TAXOFFICE        string       `xml:"TAXOFFICE"`
	REGID            string       `xml:"REGID"`
	ZNUMBER          string       `xml:"ZNUMBER"`
	EFDSERIAL        string       `xml:"EFDSERIAL"`
	REGISTRATIONDATE string       `xml:"REGISTRATIONDATE"`
	USER             string       `xml:"USER"`
	SIMIMSI          string       `xml:"SIMIMSI"`
	TOTALS           REPORTTOTALS `xml:"TOTALS"`
	VATTOTALS        VATTOTALS    `xml:"VATTOTALS"`
	PAYMENTS         PAYMENTS     `xml:"PAYMENTS"`
	CHANGES          struct {
		Text          string `xml:",chardata"`
		VATCHANGENUM  string `xml:"VATCHANGENUM"`
		HEADCHANGENUM string `xml:"HEADCHANGENUM"`
	} `xml:"CHANGES"`
	ERRORS     string `xml:"ERRORS"`
	FWVERSION  string `xml:"FWVERSION"`
	FWCHECKSUM string `xml:"FWCHECKSUM"`
}

func (*ZREPORT) RoundOff

func (z *ZREPORT) RoundOff()

RoundOff is a helper function to round off all the ZREPORT values with data type float64 to 2 decimal places

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL