주문내역 엑셀 업로드기능에서 공백제거 추가, 주문내역에서 품목정보 생성하는 기능 추가(관리자)

This commit is contained in:
chi
2024-01-26 11:33:04 +09:00
parent 5d7945d5c9
commit d2c5ed6bd4
39 changed files with 1198 additions and 968 deletions

View File

@@ -163,24 +163,24 @@ namespace FCOMMON
public int PR { get; set; }
public int PO { get; set; }
public int Received { get; set; }
public int Cancled { get; set; }
//public int Cancled { get; set; }
public int Total_Request { get; set; }
public int Total_Buy { get; set; }
public int Total_Ipko { get; set; }
public int Total_Remain { get; set; }
}
public static buyinfo GetPartBuyInfo(int project, string sid = null)
{
var sql =
" select " +
" isnull(sum(case when[state] = 'PR' then 0 when[state] = 'PO' then 0 when[state] = 'Received' then 0 when[state] = 'Cancled' then 0 else pumqtyReq end),0) as Request," +
" isnull(sum(case when[state] = 'PR' then pumqty else 0 end),0) as PR," +
" isnull(sum(case when[state] = 'PO' then pumqty else 0 end),0) as PO," +
" isnull(sum(case when[state] = 'PR' then 0 when[state] = 'PO' then 0 when[state] = 'Received' then 0 when[state] = 'Cancled' then 0 else pumqty end),0) as Request," +
" isnull(sum(case when[state] = 'PR' then pumqtyReq else 0 end),0) as PR," +
" isnull(sum(case when[state] = 'PO' then pumqtyReq else 0 end),0) as PO," +
" isnull(sum(case when[state] = 'Received' then inqty else 0 end),0) as Received," +
" isnull(sum(case when[state] = 'Cancled' then pumqtyReq else 0 end),0) as Cancled," +
" isnull(sum(isnull(pumqty,pumqtyreq)),0) as Total_Request," +
" isnull(sum(inqty),0) as Total_Buy," +
" isnull(sum(pumqty) - sum(inqty),0) as Total_Remain" +
" isnull(sum(isnull(pumqty,pumqtyreq)) - sum(inqty),0) as Total_Remain" +
" from EETGW_PurchaseCR" +
" where gcode = @gcode and state <> 'Cancled'" +
" and projectidx = @project" +
@@ -202,7 +202,7 @@ namespace FCOMMON
var o_pr = rdr["PR"];
var o_po = rdr["PO"];
var o_received = rdr["Received"];
var o_cancled = rdr["Cancled"];
//var o_cancled = rdr["Cancled"];
var o_totalrequest = rdr["Total_Request"];
var o_totalbuy = rdr["Total_Buy"];
@@ -212,9 +212,9 @@ namespace FCOMMON
if (o_pr != null) retval.PR = int.Parse(o_pr.ToString());
if (o_po != null) retval.PO = int.Parse(o_po.ToString());
if (o_received != null) retval.Received = int.Parse(o_received.ToString());
if (o_cancled != null) retval.Cancled = int.Parse(o_cancled.ToString());
//if (o_cancled != null) retval.Cancled = int.Parse(o_cancled.ToString());
if (o_totalrequest != null) retval.Total_Request = int.Parse(o_totalrequest.ToString());
if (o_totalbuy != null) retval.Total_Buy = int.Parse(o_totalbuy.ToString());
if (o_totalbuy != null) retval.Total_Ipko = int.Parse(o_totalbuy.ToString());
if (o_totalremain != null) retval.Total_Remain = int.Parse(o_totalremain.ToString());
}
rdr.Close();
@@ -1146,14 +1146,14 @@ namespace FCOMMON
{
System.Data.DataTable retval = new System.Data.DataTable();
retval.Columns.Add("Code");
retval.Columns.Add("Value");
retval.Columns.Add("SValue");
retval.Columns.Add("FValue");
retval.Columns.Add("Code", typeof(string));
retval.Columns.Add("Value", typeof(string));
retval.Columns.Add("SValue",typeof(string));
retval.Columns.Add("FValue", typeof(float));
var cn = getCn();
cn.Open();
var sql = "select isnull(code,''),isnull(memo ,''),isnull(svalue,''),isnull(fvalue,'')" +
var sql = "select isnull(code,''),isnull(memo ,''),isnull(svalue,''),isnull(fvalue,0)" +
" from common" +
" where gcode='" + FCOMMON.info.Login.gcode + "' and grp = '" + GroupCode + "'" +
" and isnull(code,'') <> ''" +