1234567891011121314151617181920212223242526272829 |
- package models_func
- import (
- "errors"
- e "github.com/dabory/abango-rest/etc"
- "github.com/go-xorm/xorm"
- )
- type VatRateSelect struct {
- Id int `xorm:"not null pk autoincr INT(10)"`
- VatName string `xorm:"VARCHAR(21)"`
- IsIncluded string `xorm:"not null default '0' CHAR(4)"`
- VatRate string `xorm:"not null DECIMAL(4,2)"`
- }
- type VatRateSelectPage struct {
- Page []VatRateSelect
- }
- func GetVatRateSelect(YDB *xorm.Engine, sel *VatRateSelectPage, filter string) error {
- qry := *YDB.Table("dbr_vat_rate").Asc("sort_no").Where(filter)
- if err := qry.Find(&sel.Page); err == nil {
- e.FuncRun("234adsrared", e.CurrFuncName())
- return nil
- } else {
- return errors.New("ltrysgaera" + e.CurrFuncName() + err.Error())
- }
- }
|