efs

package module
v0.0.0-...-f30a2ea Latest Latest
Warning

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

Go to latest
Published: May 19, 2016 License: Apache-2.0 Imports: 13 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 CloseDb

func CloseDb()

func DB

func DB() *orm.DataContext

func Delete

func Delete(o orm.IModel) error

func Find

func Find(o orm.IModel, filter *dbox.Filter, config toolkit.M) (dbox.ICursor, error)

func Get

func Get(o orm.IModel, id interface{}) error

func GetOpeningInOutBalace

func GetOpeningInOutBalace(data string, atype AccountTypeEnum, startdate, enddate time.Time) (opening, in, out, balance float64)

func LedgerFindByEnable

func LedgerFindByEnable(enable bool, order []string, skip, limit int) dbox.ICursor

func LedgerFindByTitle

func LedgerFindByTitle(title string, order []string, skip, limit int) dbox.ICursor

func Save

func Save(o orm.IModel) error

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) Delete

func (a *Accounts) Delete() error

func (*Accounts) RecordID

func (e *Accounts) RecordID() interface{}

func (*Accounts) Save

func (a *Accounts) Save(ls *LedgerSummary) error

save account with initial summary

func (*Accounts) TableName

func (e *Accounts) TableName() string

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

func Getcomment(arrid []string) (arrcom []Comments)

func (*Comments) Delete

func (c *Comments) Delete() error

func (*Comments) RecordID

func (e *Comments) RecordID() interface{}

func (*Comments) Save

func (c *Comments) Save() error

func (*Comments) TableName

func (e *Comments) TableName() string

type CondFormula

type CondFormula struct {
	Logic       string
	Value       float64
	TrueVal     float64
	FalseVal    float64
	SubFormulas []*CondFormula
	BaseOp      string

	Txt string
}

type ElementTypeEnum

type ElementTypeEnum int

type Fn

type Fn func(tkm toolkit.M, formula string) interface{}

type Formula

type Formula struct {
	Parm        string
	Value       float64
	Negate      bool
	Divide      bool
	Power       bool
	SubFormulas []*Formula
	BaseOp      string

	Txt string
}

func NewFormula

func NewFormula(formulaTxt string) (*Formula, error)

func (*Formula) Run

func (f *Formula) Run(in toolkit.M) float64

type Ledger

type Ledger struct {
	orm.ModelBase `bson:"-",json:"-"`
	ID            string `json:"_id",bson:"_id"`
	Title         string
	Enable        bool
	Group         string
}

func LedgerGetByID

func LedgerGetByID(id string) *Ledger

func NewLedger

func NewLedger() *Ledger

func (*Ledger) RecordID

func (e *Ledger) RecordID() interface{}

func (*Ledger) TableName

func (e *Ledger) TableName() string

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 MapFn

type MapFn map[string]Fn

func (MapFn) Addfunction

func (m MapFn) Addfunction(name string, fn Fn) MapFn

func (MapFn) Has

func (m MapFn) Has(name string) bool

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

type VersionElement struct {
	StatementElement *StatementElement
	IsTxt            bool
	Formula          []string
	ValueTxt         string
	ValueNum         float64
	ImageName        string
	Comments         []string
}

Directories

Path Synopsis
webapp
ptgcc command

Jump to

Keyboard shortcuts

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