types

package
v0.0.0-...-18a056e Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SimplePrecision = 2
	DoublePrecision = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

type Bool bool

func (Bool) EncodeValues

func (b Bool) EncodeValues(key string, v *url.Values) error

func (Bool) MarshalJSON

func (b Bool) MarshalJSON() ([]byte, error)

func (*Bool) UnmarshalJSON

func (b *Bool) UnmarshalJSON(data []byte) error

type Client

type Client struct {
	ClientID string `json:"clientId,omitempty"`
	CIF      string `json:"cif,omitempty"`
	Name     string `json:"name,omitempty"`
	RC       string `json:"rc,omitempty"`
	Code     string `json:"code,omitempty"`
	Address  string `json:"address,omitempty"`
	State    string `json:"state,omitempty"`
	City     string `json:"city,omitempty"`
	Country  string `json:"country,omitempty"`
	IBAN     string `json:"iban,omitempty"`
	Bank     string `json:"bank,omitempty"`
	Email    string `json:"email,omitempty"`
	Phone    string `json:"phone,omitempty"`
	Contact  string `json:"contact,omitempty"`
	VATPayer Bool   `json:"vatPayer,omitempty"`
}

type Collect

type Collect struct {
	Type           CollectType `json:"type,omitempty"`
	SeriesName     string      `json:"seriesName,omitempty"`
	DocumentNumber string      `json:"documentNumber,omitempty"`
	Value          int         `json:"value,omitempty"`
	IssueDate      Date        `json:"issueDate,omitempty"`
	Mentions       string      `json:"mentions,omitempty"`
}

type CollectType

type CollectType string
const (
	ReceiptCollectType        CollectType = "Chitanta"
	TaxReceiptCollectType     CollectType = "Bon fiscal"
	CashCollectType           CollectType = "Alta incasare numerar"
	PaymentOrderCollectType   CollectType = "Ordin de plata"
	PostalOrderCollectType    CollectType = "Mandat postal"
	CardCollectType           CollectType = "Card"
	CheckCollectType          CollectType = "CEC"
	PromissoryNoteCollectType CollectType = "Bilet ordin"
	BankCollectType           CollectType = "Alta incasare banca"
)

type Company

type Company struct {
	CIF            string `json:"cif,omitempty"`
	Company        string `json:"company,omitempty"`
	UserTypeAccess string `json:"userTypeAccess,omitempty"`
	UseStock       Bool   `json:"useStock,omitempty"`
}

type Date

type Date time.Time

func NewDate

func NewDate(year, month, day int) Date

func Today

func Today() Date

func (Date) AsTime

func (d Date) AsTime() time.Time

func (Date) EncodeValues

func (d Date) EncodeValues(key string, v *url.Values) error

func (Date) IsZero

func (d Date) IsZero() bool

func (Date) MarshalJSON

func (d Date) MarshalJSON() ([]byte, error)

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

type Discount

type Discount struct {
	RefItem          string       `json:"refItem,omitempty"`
	Name             string       `json:"name,omitempty"`
	Discount         int          `json:"discount,omitempty"`
	DiscountType     DiscountType `json:"discountType,omitempty"`
	DiscountAllAbove Bool         `json:"discountAllAbove,omitempty"`
}

type DiscountType

type DiscountType string
const (
	PercentageDiscountType DiscountType = "procentual"
	FlatDiscountType       DiscountType = "valoric"
)

type Document

type Document struct {
	DocumentType string    `json:"documentType,omitempty"`
	SeriesName   string    `json:"seriesName,omitempty"`
	Number       string    `json:"number,omitempty"`
	Link         string    `json:"link,omitempty"`
	EInvoice     string    `json:"einvoice,omitempty"`
	Total        string    `json:"total,omitempty"`
	Collects     []Collect `json:"collects,omitempty"`
}

func (*Document) GetID

func (d *Document) GetID() (string, error)

type DocumentRow

type DocumentRow interface {
	// contains filtered or unexported methods
}

type Int

type Int int

func (Int) MarshalJSON

func (i Int) MarshalJSON() ([]byte, error)

func (*Int) UnmarshalJSON

func (i *Int) UnmarshalJSON(data []byte) error

type Invoice

type Invoice struct {
	ID                 string    `json:"id,omitempty"`
	Draft              Bool      `json:"draft,omitempty"`
	Canceled           Bool      `json:"canceled,omitempty"`
	Collected          Bool      `json:"collected,omitempty"`
	SeriesName         string    `json:"seriesName,omitempty"`
	Number             string    `json:"number,omitempty"`
	IssueDate          Date      `json:"issueDate,omitempty"`
	DueDate            Date      `json:"dueDate,omitempty"`
	Precision          Int       `json:"precision,omitempty"`
	Currency           string    `json:"currency,omitempty"`
	ExchangeRate       string    `json:"exchangeRate,omitempty"`
	Total              string    `json:"total,omitempty"`
	IssuerName         string    `json:"issuerName,omitempty"`
	IssuerID           string    `json:"issuerId,omitempty"`
	NoticeNumber       string    `json:"noticeNumber,omitempty"`
	DeputyName         string    `json:"deputyName,omitempty"`
	DeputyIdentityCard string    `json:"deputyIdentityCard,omitempty"`
	DeputyAuto         string    `json:"deputyAuto,omitempty"`
	Mentions           string    `json:"mentions,omitempty"`
	UseStock           Bool      `json:"useStock,omitempty"`
	Type               string    `json:"type,omitempty"`
	Link               string    `json:"link,omitempty"`
	EInvoice           string    `json:"einvoice,omitempty"`
	Client             Client    `json:"client,omitempty"`
	Products           []Product `json:"products,omitempty"`
}

type Language

type Language struct {
	Code string `json:"code,omitempty"`
	Name string `json:"name,omitempty"`
}

type Management

type Management struct {
	Management     string `json:"management,omitempty"`
	WorkStation    string `json:"workStation,omitempty"`
	ManagementType string `json:"managementType,omitempty"`
}

type Marshaler

type Marshaler interface {
	json.Marshaler
	json.Unmarshaler
}

type Product

type Product struct {
	Name          string      `json:"name,omitempty"`
	Code          string      `json:"code,omitempty"`
	Description   string      `json:"description,omitempty"`
	MeasuringUnit string      `json:"measuringUnit,omitempty"`
	ProductType   ProductType `json:"productType,omitempty"`
	Stock         []Stock     `json:"stock,omitempty"`
	Price         string      `json:"price,omitempty"`
	Currency      string      `json:"currency,omitempty"`
	VATName       string      `json:"vatName,omitempty"`
	VATPercentage Int         `json:"vatPercentage,omitempty"`
	VATIncluded   Bool        `json:"vatIncluded,omitempty"`
	Active        Bool        `json:"active,omitempty"`
	Image         string      `json:"image,omitempty"`
}

type ProductRow

type ProductRow struct {
	Product

	Item       string `json:"item,omitempty"`
	Management string `json:"management,omitempty"`
	Quantity   int    `json:"quantity,omitempty"`
	Save       Bool   `json:"save,omitempty"`
}

type ProductType

type ProductType string
const (
	MerchandiseProductType  ProductType = "Marfa"
	ServiceProductType      ProductType = "Serviciu"
	RawProductType          ProductType = "Materii prime"
	ConsumableProductType   ProductType = "Materiale consumabile"
	SemiProductType         ProductType = "Semifabricate"
	FinishedProductType     ProductType = "Produs finit"
	WasteProductType        ProductType = "Produs rezidual"
	AgriculturalProductType ProductType = "Produse agricole"
	LivestockProductType    ProductType = "Animale si pasari"
	PackingProductType      ProductType = "Ambalaje"
	InventoryProductType    ProductType = "Obiecte de inventar"
	NoneProductType         ProductType = "-"
)

type ReferenceDocument

type ReferenceDocument struct {
	Type       string `json:"type,omitempty"`
	SeriesName string `json:"seriesName,omitempty"`
	Number     int    `json:"number,omitempty"`
}

type Series

type Series struct {
	Type    string `json:"type,omitempty"`
	Name    string `json:"name,omitempty"`
	Start   string `json:"start,omitempty"`
	Next    string `json:"next,omitempty"`
	Default bool   `json:"default,omitempty"`
}

type Stock

type Stock struct {
	WorkStation   string `json:"workStation,omitempty"`
	Management    string `json:"management,omitempty"`
	Quantity      int    `json:"quantity,omitempty"`
	Price         string `json:"price,omitempty"`
	Currency      string `json:"currency,omitempty"`
	VATName       string `json:"vatName,omitempty"`
	VATPercentage int    `json:"vatPercentage,omitempty"`
	VATIncluded   bool   `json:"vatIncluded,omitempty"`
}

type VATRate

type VATRate struct {
	Name    string `json:"name,omitempty"`
	Percent int    `json:"percent,omitempty"`
	Default bool   `json:"default,omitempty"`
}

Jump to

Keyboard shortcuts

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