tax

package
v0.210704.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2021 License: CC0-1.0 Imports: 18 Imported by: 0

Documentation

Overview

Sends tax information to state. Executes tax_job queue in DB.

Index

Constants

View Source
const CmdName = "tax"

Variables

View Source
var Cmd = cli.Cmd{
	Name:   CmdName,
	Desc:   "execute tax jobs",
	Action: taxMain,
}

Functions

This section is empty.

Types

type MTaxJob

type MTaxJob struct {
	Id        int64 `pg:",pk"`
	State     string
	Created   time.Time
	Modified  time.Time
	Scheduled time.Time
	Worker    string
	Processor string
	ExtId     string
	Ops       []TaxJobOp `pg:"ops"`
	Data      *TaxJobData
	Notes     []string `pg:",array"`
	Gross     int32
}

func (*MTaxJob) OpKeysString

func (tj *MTaxJob) OpKeysString() string

func (*MTaxJob) Update

func (tj *MTaxJob) Update(conn *pg.Conn, assign string, params ...interface{}) error

func (*MTaxJob) UpdateFinal

func (tj *MTaxJob) UpdateFinal(conn *pg.Conn, note string) error

func (*MTaxJob) UpdateScheduleLater

func (tj *MTaxJob) UpdateScheduleLater(conn *pg.Conn) error

type TaxJobData

type TaxJobData struct {
	Ru2019 struct {
		OpTime  string `json:"optime,omitempty"`
		DocNum  uint32 `json:"docnum,omitempty"`
		DocType uint16 `json:"doctype,omitempty"`

		FSStatus struct {
			FSNum            string `json:"fsnum,omitempty"`
			CycleOpen        bool   `json:"cycle_open,omitempty"`
			LastDocNumber    uint32 `json:"last_doc,omitempty"`
			UnsentDocNumber  uint32 `json:"unsent_doc,omitempty"`
			OfflineDocsCount uint32 `json:"offline_docs,omitempty"`
		} `json:"fss,omitempty"`
	} `json:"ru2019,omitempty"`
}

func (*TaxJobData) String

func (d *TaxJobData) String() string

type TaxJobOp

type TaxJobOp struct {
	Time   string  `json:"time"`
	Name   string  `json:"name"`
	Code   string  `json:"code"`
	Amount float64 `json:"amount"`
	Price  uint32  `json:"price"`
	Vmid   int32   `json:"vmid"`

	Method vender_api.PaymentMethod `json:"method"`
}

func (*TaxJobOp) KeyString

func (o *TaxJobOp) KeyString() string

Jump to

Keyboard shortcuts

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