|
@@ -3835,7 +3835,7 @@ func GetCancelStockOrderPrintOne(idstr []string, orgid int64) (info []*models.Ca
|
3835
|
3835
|
|
3836
|
3836
|
func GetCancelOutTotalCount(startime int64, endtime int64, orgid int64) (info []*models.VmCancelStockInfo, err error) {
|
3837
|
3837
|
|
3838
|
|
- db := XTReadDB().Table("xt_cancel_stock_info as x").Where("x.status = 1")
|
|
3838
|
+ db := readDb2.Table("xt_cancel_stock_info as x").Where("x.status = 1")
|
3839
|
3839
|
|
3840
|
3840
|
if startime > 0 {
|
3841
|
3841
|
db = db.Where("x.ctime >=?", startime)
|
|
@@ -4987,3 +4987,9 @@ func UpdateWarehouseInfoByGoodIdOne(info models.WarehousingInfo, id int64) error
|
4987
|
4987
|
err := XTWriteDB().Model(&info).Where("id =? and status = 1", id).Updates(map[string]interface{}{"warehousing_count": info.WarehousingCount, "stock_count": info.StockCount, "price": info.Price, "number": info.Number, "product_date": info.ProductDate, "expiry_date": info.ExpiryDate, "license_number": info.LicenseNumber, "manufacturer": info.Manufacturer, "dealer": info.Dealer, "remark": info.Remark}).Error
|
4988
|
4988
|
return err
|
4989
|
4989
|
}
|
|
4990
|
+
|
|
4991
|
+func UpdatedStockFlowByGoodId(warehousing_id int64, good_id int64, flow models.VmStockFlow) error {
|
|
4992
|
+
|
|
4993
|
+ err := XTWriteDB().Model(&flow).Where("warehousing_id = ? and good_id = ? and status = 1", warehousing_id, good_id).Updates(map[string]interface{}{"count": flow.Count}).Error
|
|
4994
|
+ return err
|
|
4995
|
+}
|