|
@@ -101,7 +101,7 @@ public class StoreApplyHelper
|
|
|
usercondition = " and UserId=" + UId;
|
|
|
}
|
|
|
//上月出货额度
|
|
|
- DataTable dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (1,2,4,6,7,8,10) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
|
|
|
+ DataTable dt = CustomerSqlConn.dtable("select StoreId,count(Id) from StoreStockChange where Id>=528358 and CreateDate>='" + start + "' and CreateDate<'" + end + "' and BrandId in (1,2,4,6,7,8,10,12) and TransType in (10,11,2) and StoreId>0" + condition + " group by StoreId", connstr);
|
|
|
foreach(DataRow dr in dt.Rows)
|
|
|
{
|
|
|
int StoreId = int.Parse(function.CheckInt(dr["StoreId"].ToString()));
|
|
@@ -176,7 +176,7 @@ public class StoreApplyHelper
|
|
|
}
|
|
|
decimal AmountMore = 0;
|
|
|
//仓库中机具占用额度+小分仓机具占用额度
|
|
|
- DataTable dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (1,2,4,6,7,8,10) and `Status`>-1", connstr);
|
|
|
+ DataTable dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PosMachinesTwo pos where StoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BuyUserId=0 and BrandId in (1,2,4,6,7,8,10,12) and `Status`>-1", connstr);
|
|
|
if(dtmore.Rows.Count > 0)
|
|
|
{
|
|
|
AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
@@ -187,7 +187,7 @@ public class StoreApplyHelper
|
|
|
AmountMore += decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
|
}
|
|
|
//除开小分仓中带“授”标记机具占用额度
|
|
|
- dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (1,2,4,6,7,8,10) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
|
|
|
+ dtmore = CustomerSqlConn.dtable("select count(Id)*200 from PreSendStockDetail pos where FromStoreId in (select Id from StoreHouse where UserId=" + UserId + " and Sort=0) and BrandId in (1,2,4,6,7,8,10,12) and AuthFlag=1 and ApplyFlag=0 and `Status`>-1 and `Status`<2", connstr);
|
|
|
if(dtmore.Rows.Count > 0)
|
|
|
{
|
|
|
AmountMore -= decimal.Parse(function.CheckNum(dtmore.Rows[0][0].ToString()));
|
|
@@ -304,7 +304,7 @@ public class StoreApplyHelper
|
|
|
if(prepos.AuthFlag == 0)
|
|
|
{
|
|
|
PosMachinesTwo pos = db.PosMachinesTwo.FirstOrDefault(m => m.Id == SnId) ?? new PosMachinesTwo();
|
|
|
- if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 10)
|
|
|
+ if(pos.BrandId == 1 || pos.BrandId == 2 || pos.BrandId == 4 || pos.BrandId == 6 || pos.BrandId == 7 || pos.BrandId == 8 || pos.BrandId == 10 || pos.BrandId == 12)
|
|
|
{
|
|
|
Amount += 200;
|
|
|
}
|
|
@@ -331,7 +331,7 @@ public class StoreApplyHelper
|
|
|
if(store != null)
|
|
|
{
|
|
|
decimal Amount = 0;
|
|
|
- if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8 || BrandId == 10)
|
|
|
+ if(BrandId == 1 || BrandId == 2 || BrandId == 4 || BrandId == 6 || BrandId == 7 || BrandId == 8 || BrandId == 10 || BrandId == 12)
|
|
|
{
|
|
|
Amount += 200 * OpStoreNum;
|
|
|
}
|