forked from free-lancers/electricity_bill_calc_service
fix(#17):修复有绑定表计的商户迁出时无法迁出的错误
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"electricity_bill_calc/model"
|
||||
"electricity_bill_calc/types"
|
||||
"fmt"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
@@ -19,7 +18,8 @@ type MeterReadingForm struct {
|
||||
|
||||
func (r MeterReadingForm) Validate() bool {
|
||||
flat := r.Overall.Sub(r.Critical).Sub(r.Peak).Sub(r.Valley)
|
||||
return flat.GreaterThanOrEqual(decimal.Zero)
|
||||
b := flat.GreaterThanOrEqual(decimal.Zero)
|
||||
return b
|
||||
}
|
||||
|
||||
type MeterReadingFormWithCode struct {
|
||||
|
||||
Reference in New Issue
Block a user