Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Act ¶
type Act struct {
Contractor Party `json:"contractor"`
Customers map[string]Party `json:"customers"`
Documents map[string]Document `json:"documents"`
Meta struct {
AuthorFmt string `json:"AuthorFmt"`
SubjectFmt string `json:"SubjectFmt"`
TitleFmt string `json:"TitleFmt"`
Creator string `json:"Creator"`
Font string `json:"Font"`
Keywords string `json:"Keywords"`
} `json:"meta"`
Names struct {
Resume string `json:"Resume"`
Sign string `json:"Sign"`
Stamp string `json:"Stamp"`
TitleFmt string `json:"TitleFmt"`
TotalTax string `json:"TotalTax"`
TotalTitle string `json:"TotalTitle"`
TotalWordsFmt string `json:"TotalWordsFmt"`
ZeroTax string `json:"ZeroTax"`
} `json:"names"`
Services map[string]CustomerServices
}
Act - подготовленные для формирования документа атрибуты акта
type ActDef ¶
type ActDef struct {
ID string `json:"id"`
Title string `json:"title"`
Customer string `json:"customer"`
Contractor string `json:"contractor"`
Date Date `json:"date"`
ConfirmDate Date `json:"confirm"`
Amount float64 `json:"amount"`
Tax float64 `json:"tax"`
}
ActDef - атрибуты акта для сохранения в json
type CustomerServices ¶
type CustomerServices map[string]ServiceDef
CustomerServices - описание услуги для каждого кода
type Date ¶
Date - тип для работы в json с датами вида 2006-01-02
func (Date) MarshalJSON ¶
MarshalJSON форматирует дату для экспорта в json
func (*Date) UnmarshalJSON ¶
UnmarshalJSON парсит дату из json
type Document ¶
type Document struct {
ID string `json:"id"`
Customer string `json:"customer"`
Date Date `json:"date"`
Tax float64 `json:"tax"`
ConfirmDate Date `json:"confirmed"`
Services []struct {
Amount float64 `json:"Amount"`
Code string `json:"Code"`
} `json:"services"`
}
Document - атрибуты акта
type Party ¶
type Party struct {
ID string `json:"Id"`
Address string `json:"Address"`
Bank string `json:"Bank"`
Bik string `json:"Bik"`
Inn string `json:"Inn"`
Kpp string `json:"Kpp"`
Ks string `json:"Ks"`
Name string `json:"Name"`
NameFull string `json:"NameFull"`
NameLong string `json:"NameLong"`
Phone string `json:"Phone"`
Rs string `json:"Rs"`
Title string `json:"Title"`
}
Party - сторона акта (заказчик или исполнитель)
type ServiceDef ¶
type ServiceDef struct {
Name string `json:"name"` // наименование
Units string `json:"units"` // единица измерения
Price float64 `json:"price"` // стоимость
}
ServiceDef - атрибуты оказываемых услуг
Click to show internal directories.
Click to hide internal directories.