Documentation
¶
Index ¶
- Constants
- func CloseDb()
- func DB() *orm.DataContext
- func Delete(o orm.IModel) error
- func Find(o orm.IModel, filter *dbox.Filter, config toolkit.M) (dbox.ICursor, error)
- func Get(o orm.IModel, id interface{}) error
- func GetOpeningInOutBalace(data string, atype AccountTypeEnum, startdate, enddate time.Time) (opening, in, out, balance float64)
- func LedgerFindByEnable(enable bool, order []string, skip, limit int) dbox.ICursor
- func LedgerFindByTitle(title string, order []string, skip, limit int) dbox.ICursor
- func Save(o orm.IModel) error
- func SetDb(conn dbox.IConnection) error
- type AccountTypeEnum
- type Accounts
- type Comments
- type CondFormula
- type ElementTypeEnum
- type Fn
- type Formula
- type Ledger
- type LedgerSummary
- type LedgerTrans
- type LedgerTransFile
- func (ltf *LedgerTransFile) Delete() error
- func (ltf *LedgerTransFile) GetAccountFile(loc, connector string) (err error)
- func (ltf *LedgerTransFile) ProcessFile(loc, connector string) (err error)
- func (e *LedgerTransFile) RecordID() interface{}
- func (ltf *LedgerTransFile) Save() error
- func (e *LedgerTransFile) TableName() string
- type MapFn
- type StatementElement
- type StatementVersion
- type Statements
- type TimeReadTypeEnum
- type TransactionReadTypeEnum
- type VersionElement
Constants ¶
View Source
const ( ElementNone ElementTypeEnum = 0 ElementCoA = 1 ElementGroup = 2 ElementFromTo = 3 ElementParmNumber = 10 ElementParmDate = 11 ElementParmString = 12 ElementFormula = 50 )
View Source
const ( ReadOpening TransactionReadTypeEnum = 0 ReadBalance = 1 ReadIn = 2 ReadOut = 3 ReadMovement = 4 )
View Source
const ( Timemtd TimeReadTypeEnum = 0 Timeqtd = 1 Timeytd = 2 TimeLastMonth = 3 TimeLastQuarter = 4 TimeLastYear = 5 )
Variables ¶
This section is empty.
Functions ¶
func DB ¶
func DB() *orm.DataContext
func GetOpeningInOutBalace ¶
func GetOpeningInOutBalace(data string, atype AccountTypeEnum, startdate, enddate time.Time) (opening, in, out, balance float64)
func LedgerFindByEnable ¶
func LedgerFindByTitle ¶
func SetDb ¶
func SetDb(conn dbox.IConnection) error
Types ¶
type AccountTypeEnum ¶
type AccountTypeEnum int
const ( Account AccountTypeEnum = iota Group )
func (AccountTypeEnum) String ¶
func (a AccountTypeEnum) String() string
type Accounts ¶
type Accounts struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Title string `json:"title",bson:"title"`
Type AccountTypeEnum `json:"type",bson:"type"`
Group []string `json:"group",bson:"group"`
}
func (*Accounts) Save ¶
func (a *Accounts) Save(ls *LedgerSummary) error
save account with initial summary
type Comments ¶
type Comments struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Name string `json:"name",bson:"name"`
Text string `json:"text",bson:"text"`
Time time.Time `json:"time",bson:"time"`
}
func Getcomment ¶
type CondFormula ¶
type ElementTypeEnum ¶
type ElementTypeEnum int
type Formula ¶
type Formula struct {
Parm string
Value float64
Negate bool
Divide bool
Power bool
SubFormulas []*Formula
BaseOp string
Txt string
}
func NewFormula ¶
type Ledger ¶
type Ledger struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Title string
Enable bool
Group string
}
func LedgerGetByID ¶
type LedgerSummary ¶
type LedgerSummary struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
SumDate time.Time `json:"sumdate",bson:"sumdate"`
Account string `json:"account",bson:"account"`
Opening float64 `json:"opening",bson:"opening"`
In float64 `json:"in",bson:"in"`
Out float64 `json:"out",bson:"out"`
Balance float64 `json:"balance",bson:"balance"`
}
func NewLedgerSummary ¶
func NewLedgerSummary() *LedgerSummary
func (*LedgerSummary) GetLast ¶
func (l *LedgerSummary) GetLast(ssumdate, lsumdate time.Time, taccount string) (err error)
func (*LedgerSummary) RecordID ¶
func (e *LedgerSummary) RecordID() interface{}
func (*LedgerSummary) Save ¶
func (l *LedgerSummary) Save() error
func (*LedgerSummary) TableName ¶
func (e *LedgerSummary) TableName() string
type LedgerTrans ¶
type LedgerTrans struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Company string `json:"company",bson:"company"`
JournalNo string `json:"journalno",bson:"journalno"`
TransDate time.Time `json:"transdate",bson:"transdate"`
Amount float64 `json:"amount",bson:"amount"`
Account string `json:"account",bson:"account"`
ProfitCenter string `json:"profitcenter",bson:"profitcenter"`
CostCenter string `json:"costcenter",bson:"costcenter"`
}
func NewLedgerTrans ¶
func NewLedgerTrans() *LedgerTrans
func (*LedgerTrans) Delete ¶
func (l *LedgerTrans) Delete() error
func (*LedgerTrans) RecordID ¶
func (e *LedgerTrans) RecordID() interface{}
func (*LedgerTrans) Save ¶
func (l *LedgerTrans) Save() error
func (*LedgerTrans) TableName ¶
func (e *LedgerTrans) TableName() string
type LedgerTransFile ¶
type LedgerTransFile struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Filename string `json:"filename",bson:"filename"`
PhysicalName string `json:"physicalname",bson:"physicalname"`
Desc string `json:"desc",bson:"desc"`
Date time.Time `json:"date",bson:"date"`
Account []string `json:"account",bson:"account"`
Datacount float64 `json:"datacount",bson:"datacount"`
Process float64 `json:"process",bson:"process"` // 0
Status string `json:"status",bson:"status"` // ready, done, failed, onprocess, rollback
Note string `json:"note",bson:"note"`
Pid string `json:"pid",bson:"pid"`
}
func (*LedgerTransFile) Delete ¶
func (ltf *LedgerTransFile) Delete() error
func (*LedgerTransFile) GetAccountFile ¶
func (ltf *LedgerTransFile) GetAccountFile(loc, connector string) (err error)
func (*LedgerTransFile) ProcessFile ¶
func (ltf *LedgerTransFile) ProcessFile(loc, connector string) (err error)
Validasi check account, change status,
func (*LedgerTransFile) RecordID ¶
func (e *LedgerTransFile) RecordID() interface{}
func (*LedgerTransFile) Save ¶
func (ltf *LedgerTransFile) Save() error
func (*LedgerTransFile) TableName ¶
func (e *LedgerTransFile) TableName() string
type StatementElement ¶
type StatementElement struct {
Eid string
Index int
Title1 string
Title2 string
Type ElementTypeEnum
DataValue []string
Show bool
Showformula bool
Bold bool
NegateValue bool
NegateDisplay bool
Column int
Formula []string
TransactionReadType TransactionReadTypeEnum
TimeReadType TimeReadTypeEnum
}
type StatementVersion ¶
type StatementVersion struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Title string `json:"title",bson:"title"`
Rundate time.Time `json:"rundate",bson:"rundate"`
StatementID string `json:"statementid",bson:"statementid"`
Element []*VersionElement
}
func NewStatementVersion ¶
func NewStatementVersion() *StatementVersion
func (*StatementVersion) RecordID ¶
func (e *StatementVersion) RecordID() interface{}
func (*StatementVersion) TableName ¶
func (e *StatementVersion) TableName() string
type Statements ¶
type Statements struct {
orm.ModelBase `bson:"-",json:"-"`
ID string `json:"_id",bson:"_id"`
Title string `json:"title",bson:"title"`
Enable bool `json:"enable",bson:"enable"`
Elements []*StatementElement `json:"elements",bson:"elements"`
ImageName string `json:"imagename",bson:"imagename"`
}
func NewStatements ¶
func NewStatements() *Statements
func (*Statements) NewStatementVersion ¶
func (e *Statements) NewStatementVersion() (sv *StatementVersion)
func (*Statements) RecordID ¶
func (e *Statements) RecordID() interface{}
func (*Statements) Run ¶
func (e *Statements) Run(ins toolkit.M) (sv *StatementVersion, comments []Comments, err error)
mode : open/find, fullrun, basic
func (*Statements) Save ¶
func (e *Statements) Save() error
func (*Statements) TableName ¶
func (e *Statements) TableName() string
type TimeReadTypeEnum ¶
type TimeReadTypeEnum int
type TransactionReadTypeEnum ¶
type TransactionReadTypeEnum int
type VersionElement ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.