修改税费

master
kanade 3 years ago
parent 883728c999
commit 6cc6e1c4ea

@ -740,9 +740,9 @@ func (o logic) CompanyAllAmount(id uint) (res Data) {
for _, v := range record {
res.Balance = res.Balance.Add(v.Income)
if v.Type == order.Card {
res.TaxAmount = v.Income.Mul(cr).Round(2)
res.TaxAmount = res.TaxAmount.Add(v.Income.Mul(cr).Round(2))
} else {
res.TaxAmount = v.Income.Mul(rate).Round(2)
res.TaxAmount = res.TaxAmount.Add(v.Income.Mul(rate).Round(2))
}
}
res.ActualAmount = res.Balance.Sub(res.TaxAmount)

@ -44,7 +44,7 @@ func (r GysGoodsSkuTempModel) TableName() string {
//调整库存通过code来匹配
func (r *GysGoodsSkuModel) SetInventoryByCode(code string, inventory uint) {
r.GetDb().Model(&GysGoodsSkuModel{}).Where("code=?", code).Update("inventory=?", inventory)
r.GetDb().Model(&GysGoodsSkuModel{}).Where("code=?", code).Update("inventory", inventory)
}
func (r *GysGoodsSkuModel) Create(data *GysGoodsSkuModel) {

Loading…
Cancel
Save