실구매수량 항목 추가

This commit is contained in:
chi
2023-08-17 11:48:28 +09:00
parent fed728d82f
commit 299fce9038
13 changed files with 353 additions and 315 deletions

View File

@@ -1041,14 +1041,14 @@
numberCellType2.ShowSeparator = true;
numberCellType2.ShrinkToFit = true;
this.fpSpread1_Sheet1.Columns.Get(14).CellType = numberCellType2;
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "pumqty";
this.fpSpread1_Sheet1.Columns.Get(14).DataField = "pumqtyReq";
this.fpSpread1_Sheet1.Columns.Get(14).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(14).Label = "수량\r\n(요청)";
this.fpSpread1_Sheet1.Columns.Get(14).Tag = "pumqty";
this.fpSpread1_Sheet1.Columns.Get(14).Width = 51F;
numberCellType3.DecimalPlaces = 0;
this.fpSpread1_Sheet1.Columns.Get(15).CellType = numberCellType3;
this.fpSpread1_Sheet1.Columns.Get(15).DataField = "pumqtyReq";
this.fpSpread1_Sheet1.Columns.Get(15).DataField = "pumqty";
this.fpSpread1_Sheet1.Columns.Get(15).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center;
this.fpSpread1_Sheet1.Columns.Get(15).Label = "수량\r\n(구매)\r\n";
this.fpSpread1_Sheet1.Columns.Get(15).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center;

View File

@@ -93,7 +93,8 @@ namespace FEQ0000
e.Row["wdate"] = DateTime.Now;
e.Row["pumunit"] = "EA";
e.Row["state"] = "---";
e.Row["pumqty"] = 1;
e.Row["pumqty"] = 0;
e.Row["pumqtyreq"] = 0;
e.Row["pumprice"] = 0;
e.Row["pumamt"] = 0;
e.Row["request"] = FCOMMON.info.Login.nameK;
@@ -764,6 +765,7 @@ namespace FEQ0000
newdr.po = string.Empty;
newdr.indate = string.Empty;
newdr.edate = string.Empty;
newdr.pumqty = 0; //실구매수량은 제거
newdr.idx = -1;
newdr.EndEdit();

View File

@@ -57,7 +57,7 @@
this.tbPumName = new System.Windows.Forms.TextBox();
this.tbPumModel = new System.Windows.Forms.TextBox();
this.tbPumUnit = new System.Windows.Forms.TextBox();
this.tbPumQty = new System.Windows.Forms.TextBox();
this.tbQtyReq = new System.Windows.Forms.TextBox();
this.tbPumPrice = new System.Windows.Forms.TextBox();
this.tbPumAmt = new System.Windows.Forms.TextBox();
this.tbSupply = new System.Windows.Forms.TextBox();
@@ -78,6 +78,7 @@
this.chkExp = new System.Windows.Forms.CheckBox();
this.btSaveAdd = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.tbQtyReal = new System.Windows.Forms.TextBox();
this.btSIDChk = new System.Windows.Forms.Button();
this.tbLineCode = new System.Windows.Forms.TextBox();
this.tbStorage = new System.Windows.Forms.TextBox();
@@ -92,14 +93,13 @@
this.tbInQty = new System.Windows.Forms.TextBox();
this.tbOrderNo = new System.Windows.Forms.TextBox();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.tbBigoChk = new System.Windows.Forms.TextBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.chk2 = new System.Windows.Forms.CheckBox();
this.chk1 = new System.Windows.Forms.CheckBox();
this.dsPurchase = new FEQ0000.dsPurchase();
this.purchaseBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.purchaseTableAdapter = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter();
this.tbBigoChk = new System.Windows.Forms.TextBox();
this.tbpumqtyReq = new System.Windows.Forms.TextBox();
receiveLabel = new System.Windows.Forms.Label();
scLabel = new System.Windows.Forms.Label();
sidLabel = new System.Windows.Forms.Label();
@@ -332,6 +332,27 @@
label11.TabIndex = 33;
label11.Text = "Cost Center";
//
// label12
//
label12.AutoSize = true;
label12.Location = new System.Drawing.Point(13, 564);
label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label12.Name = "label12";
label12.Size = new System.Drawing.Size(119, 20);
label12.TabIndex = 5;
label12.Text = "구매담당자 비고";
this.toolTip1.SetToolTip(label12, resources.GetString("label12.ToolTip"));
//
// label13
//
label13.AutoSize = true;
label13.Location = new System.Drawing.Point(242, 152);
label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label13.Name = "label13";
label13.Size = new System.Drawing.Size(89, 20);
label13.TabIndex = 14;
label13.Text = "실 구매수량";
//
// tbSC
//
this.tbSC.Location = new System.Drawing.Point(104, 61);
@@ -384,16 +405,16 @@
this.tbPumUnit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.toolTip1.SetToolTip(this.tbPumUnit, "단위");
//
// tbPumQty
// tbQtyReq
//
this.tbPumQty.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tbPumQty.Location = new System.Drawing.Point(94, 148);
this.tbPumQty.Margin = new System.Windows.Forms.Padding(4);
this.tbPumQty.Name = "tbPumQty";
this.tbPumQty.Size = new System.Drawing.Size(133, 27);
this.tbPumQty.TabIndex = 13;
this.tbPumQty.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tbPumQty.TextChanged += new System.EventHandler(this.tbPumQty_TextChanged);
this.tbQtyReq.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.tbQtyReq.Location = new System.Drawing.Point(94, 148);
this.tbQtyReq.Margin = new System.Windows.Forms.Padding(4);
this.tbQtyReq.Name = "tbQtyReq";
this.tbQtyReq.Size = new System.Drawing.Size(133, 27);
this.tbQtyReq.TabIndex = 13;
this.tbQtyReq.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tbQtyReq.TextChanged += new System.EventHandler(this.tbPumQty_TextChanged);
//
// tbPumPrice
//
@@ -608,7 +629,7 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.tbpumqtyReq);
this.groupBox1.Controls.Add(this.tbQtyReal);
this.groupBox1.Controls.Add(label13);
this.groupBox1.Controls.Add(this.btSIDChk);
this.groupBox1.Controls.Add(this.tbLineCode);
@@ -632,7 +653,7 @@
this.groupBox1.Controls.Add(this.tbPumIDX);
this.groupBox1.Controls.Add(this.cmbState);
this.groupBox1.Controls.Add(this.tbSID);
this.groupBox1.Controls.Add(this.tbPumQty);
this.groupBox1.Controls.Add(this.tbQtyReq);
this.groupBox1.Controls.Add(pumqtyLabel);
this.groupBox1.Controls.Add(sidLabel);
this.groupBox1.Controls.Add(this.tbProject);
@@ -655,6 +676,16 @@
this.groupBox1.TabStop = false;
this.groupBox1.Text = "필수입력";
//
// tbQtyReal
//
this.tbQtyReal.Location = new System.Drawing.Point(341, 148);
this.tbQtyReal.Margin = new System.Windows.Forms.Padding(4);
this.tbQtyReal.Name = "tbQtyReal";
this.tbQtyReal.Size = new System.Drawing.Size(133, 27);
this.tbQtyReal.TabIndex = 15;
this.tbQtyReal.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tbQtyReal.TextChanged += new System.EventHandler(this.tbPumQty_TextChanged);
//
// btSIDChk
//
this.btSIDChk.BackColor = System.Drawing.Color.Gray;
@@ -800,6 +831,19 @@
this.tbOrderNo.Size = new System.Drawing.Size(286, 27);
this.tbOrderNo.TabIndex = 7;
//
// tbBigoChk
//
this.tbBigoChk.ImeMode = System.Windows.Forms.ImeMode.Hangul;
this.tbBigoChk.Location = new System.Drawing.Point(11, 591);
this.tbBigoChk.Margin = new System.Windows.Forms.Padding(4);
this.tbBigoChk.MaxLength = 500;
this.tbBigoChk.Multiline = true;
this.tbBigoChk.Name = "tbBigoChk";
this.tbBigoChk.Size = new System.Drawing.Size(490, 77);
this.tbBigoChk.TabIndex = 6;
this.tbBigoChk.TabStop = false;
this.toolTip1.SetToolTip(this.tbBigoChk, resources.GetString("tbBigoChk.ToolTip"));
//
// timer1
//
this.timer1.Interval = 250;
@@ -841,49 +885,6 @@
//
this.purchaseTableAdapter.ClearBeforeFill = true;
//
// tbBigoChk
//
this.tbBigoChk.ImeMode = System.Windows.Forms.ImeMode.Hangul;
this.tbBigoChk.Location = new System.Drawing.Point(11, 591);
this.tbBigoChk.Margin = new System.Windows.Forms.Padding(4);
this.tbBigoChk.MaxLength = 500;
this.tbBigoChk.Multiline = true;
this.tbBigoChk.Name = "tbBigoChk";
this.tbBigoChk.Size = new System.Drawing.Size(490, 77);
this.tbBigoChk.TabIndex = 6;
this.tbBigoChk.TabStop = false;
this.toolTip1.SetToolTip(this.tbBigoChk, resources.GetString("tbBigoChk.ToolTip"));
//
// label12
//
label12.AutoSize = true;
label12.Location = new System.Drawing.Point(13, 564);
label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label12.Name = "label12";
label12.Size = new System.Drawing.Size(119, 20);
label12.TabIndex = 5;
label12.Text = "구매담당자 비고";
this.toolTip1.SetToolTip(label12, resources.GetString("label12.ToolTip"));
//
// tbpumqtyReq
//
this.tbpumqtyReq.Location = new System.Drawing.Point(341, 148);
this.tbpumqtyReq.Margin = new System.Windows.Forms.Padding(4);
this.tbpumqtyReq.Name = "tbpumqtyReq";
this.tbpumqtyReq.Size = new System.Drawing.Size(133, 27);
this.tbpumqtyReq.TabIndex = 15;
this.tbpumqtyReq.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label13
//
label13.AutoSize = true;
label13.Location = new System.Drawing.Point(242, 152);
label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
label13.Name = "label13";
label13.Size = new System.Drawing.Size(89, 20);
label13.TabIndex = 14;
label13.Text = "실 구매수량";
//
// fPurchaseCR_Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -926,7 +927,7 @@
private System.Windows.Forms.TextBox tbPumName;
private System.Windows.Forms.TextBox tbPumModel;
private System.Windows.Forms.TextBox tbPumUnit;
private System.Windows.Forms.TextBox tbPumQty;
private System.Windows.Forms.TextBox tbQtyReq;
private System.Windows.Forms.TextBox tbPumPrice;
private System.Windows.Forms.TextBox tbPumAmt;
private System.Windows.Forms.TextBox tbSupply;
@@ -968,6 +969,6 @@
private System.Windows.Forms.TextBox tbCostCenter;
private System.Windows.Forms.Button button7;
private System.Windows.Forms.TextBox tbBigoChk;
private System.Windows.Forms.TextBox tbpumqtyReq;
private System.Windows.Forms.TextBox tbQtyReal;
}
}

View File

@@ -189,9 +189,12 @@ namespace FEQ0000
tbPumName.Tag = tbPumName.Text;
tbPumModel.Text = dr.pumscale;
tbPumQty.Text = dr.pumqty.ToString();
if (dr.IspumqtyReqNull()) tbpumqtyReq.Text = "0"; //230817
else tbpumqtyReq.Text = dr.pumqtyReq.ToString();
if (dr.IspumqtyNull()) tbQtyReal.Text = "0"; //230817
else tbQtyReal.Text = dr.pumqty.ToString();
if (dr.IspumqtyReqNull()) tbQtyReq.Text = "0"; //230817
else tbQtyReq.Text = dr.pumqtyReq.ToString();
if (dr.IspumidxNull()) tbPumIDX.Text = "-1";
else tbPumIDX.Text = dr.pumidx.ToString();
@@ -275,12 +278,12 @@ namespace FEQ0000
groupBox2.Enabled = false;
}
tbBigoChk.Enabled = false;
tbpumqtyReq.Enabled = false;
tbQtyReal.Enabled = false;
}
else
{
tbBigoChk.Enabled = true;
tbpumqtyReq.Enabled = true;
tbQtyReal.Enabled = true;
}
if (advInput == false)
@@ -429,7 +432,7 @@ namespace FEQ0000
//if (oimage != null) oimage.Dispose();
}
}
this.tbPumQty.Focus();
this.tbQtyReq.Focus();
}
void Lov_Project(string search, Boolean allowAll)
{
@@ -557,20 +560,21 @@ namespace FEQ0000
tbPumModel.Focus();
return false;
}
if (tbPumQty.Text == "")
if (tbQtyReq.Text == "")
{
FCOMMON.Util.MsgE("수량(요청)을 입력하세요.");
tbPumQty.Focus();
tbQtyReq.Focus();
return false;
}
//실수량은 구매담당자만 입력한다
if (tbBigoChk.Enabled && (cmbState.Text == "PO" || cmbState.Text == "PR"))
{
var qtycnv = int.TryParse(tbpumqtyReq.Text, out int qtyreq);
var qtycnv = int.TryParse(tbQtyReal.Text, out int qtyreq);
if (qtycnv == false || qtyreq < 1)
{
FCOMMON.Util.MsgE("수량(실 구매)을 입력하세요.");
tbpumqtyReq.Focus();
tbQtyReal.Focus();
return false;
}
}
@@ -740,14 +744,25 @@ namespace FEQ0000
}
if (int.TryParse(tbPumQty.Text, out int vqty) == false)
tbPumQty.Text = "0";
if (int.TryParse(tbpumqtyReq.Text, out int vqtyreq) == false)
tbpumqtyReq.Text = "0";
if (int.TryParse(tbQtyReq.Text, out int vqtyreq) == false)
tbQtyReq.Text = "0";
if (int.TryParse(tbQtyReal.Text, out int vqtyreal) == false)
tbQtyReal.Text = "0";
if (decimal.TryParse(tbPumPrice.Text, out decimal vpumprice) == false)
tbPumPrice.Text = "0";
dr.pumqty = vqty;// int.Parse(tbPumQty.Text);
//요청 구매 수량이 다를경우 비고 입력이 필요함
if (vqtyreal > 0 && vqtyreq > 0 && vqtyreq != vqtyreal)
{
if (tbBigoChk.Text.isEmpty())
{
Util.MsgE("구매 요청/실 수량이 서로 다릅니다\n구매자 비고에 해당 사유를 입력하세요");
tbBigoChk.Focus();
return false;
}
}
dr.pumqty = vqtyreal;// int.Parse(tbPumQty.Text);
dr.pumqtyReq = vqtyreq;// int.Parse(tbpumqtyReq.Text);
dr.pumprice = vpumprice;// decimal.Parse(tbPumPrice.Text);
@@ -763,7 +778,9 @@ namespace FEQ0000
}
else dr.SetpumpriceDNull();
dr.pumamt = dr.pumqty * dr.pumprice;
if (vqtyreal > 0) dr.pumamt = dr.pumqty * dr.pumprice;
else dr.pumamt = dr.pumqtyReq * dr.pumprice;
if (tbPumIDX.Text == "" || tbPumIDX.Text == "-1") dr.SetpumidxNull();
else dr.pumidx = int.Parse(tbPumIDX.Text);
dr.sid = tbSID.Text.Trim();
@@ -922,14 +939,15 @@ namespace FEQ0000
private void tbPumQty_TextChanged(object sender, EventArgs e)
{
var strQty = this.tbPumQty.Text;
var strPrice = this.tbPumPrice.Text;
var b1 = int.TryParse(tbQtyReal.Text, out int qtyreal);
var b2 = int.TryParse(tbQtyReq.Text, out int qtyreq);
var b3 = double.TryParse(tbPumPrice.Text, out double price);
double amt = 0;
//실구매수량이 잇으면 그걸로한다
if (qtyreal > 0) amt = qtyreal * price;
else amt = qtyreq * price;
int qty = 0;
double price = 0;
if (strQty.IsNumeric()) qty = int.Parse(strQty);
if (strPrice.IsNumeric()) price = double.Parse(strPrice);
double amt = price * qty;
tbPumAmt.Text = amt.ToString("N0");
}

View File

@@ -187,7 +187,10 @@
<metadata name="label11.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="tbBigo.ToolTip" xml:space="preserve">
<metadata name="label12.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="label12.ToolTip" xml:space="preserve">
<value>* 공용 공구 / 상세한 사유 작성 (공용으로 함께 쓰는 것들.. 전동 드릴등)
* 공용 파트 / 상세한 사유 작성 (공용으로 보관하여 정비에 사용되는 것들..WRITE , COnnector ,pin 등)
* 공정 정비 파트 / 상세한 사유 작성 (본인 담당의 주, 보조 공정에서 사용되는 것들. Feeder wheel, O/H, 장비 교체 파트 등)
@@ -197,6 +200,20 @@
<metadata name="label13.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="tbBigo.ToolTip" xml:space="preserve">
<value>* 공용 공구 / 상세한 사유 작성 (공용으로 함께 쓰는 것들.. 전동 드릴등)
* 공용 파트 / 상세한 사유 작성 (공용으로 보관하여 정비에 사용되는 것들..WRITE , COnnector ,pin 등)
* 공정 정비 파트 / 상세한 사유 작성 (본인 담당의 주, 보조 공정에서 사용되는 것들. Feeder wheel, O/H, 장비 교체 파트 등)
* 개인 정비 공구 / 상세한 사유 작성 (개인이 보관하여 사용하는 공구류, WRench, Driver, Drill, Tab 등)
* 기타 물품 / 상세한 사유 작성 (상기 항목에 포함되지 않는다고 판단되는 것들 .. SPR 파트정리용, Feeder 파트 정리 등)</value>
</data>
<data name="tbBigoChk.ToolTip" xml:space="preserve">
<value>* 공용 공구 / 상세한 사유 작성 (공용으로 함께 쓰는 것들.. 전동 드릴등)
* 공용 파트 / 상세한 사유 작성 (공용으로 보관하여 정비에 사용되는 것들..WRITE , COnnector ,pin 등)
* 공정 정비 파트 / 상세한 사유 작성 (본인 담당의 주, 보조 공정에서 사용되는 것들. Feeder wheel, O/H, 장비 교체 파트 등)
* 개인 정비 공구 / 상세한 사유 작성 (개인이 보관하여 사용하는 공구류, WRench, Driver, Drill, Tab 등)
* 기타 물품 / 상세한 사유 작성 (상기 항목에 포함되지 않는다고 판단되는 것들 .. SPR 파트정리용, Feeder 파트 정리 등)</value>
</data>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>674, 17</value>
</metadata>
@@ -209,23 +226,6 @@
<metadata name="purchaseTableAdapter.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>313, 17</value>
</metadata>
<data name="tbBigoChk.ToolTip" xml:space="preserve">
<value>* 공용 공구 / 상세한 사유 작성 (공용으로 함께 쓰는 것들.. 전동 드릴등)
* 공용 파트 / 상세한 사유 작성 (공용으로 보관하여 정비에 사용되는 것들..WRITE , COnnector ,pin 등)
* 공정 정비 파트 / 상세한 사유 작성 (본인 담당의 주, 보조 공정에서 사용되는 것들. Feeder wheel, O/H, 장비 교체 파트 등)
* 개인 정비 공구 / 상세한 사유 작성 (개인이 보관하여 사용하는 공구류, WRench, Driver, Drill, Tab 등)
* 기타 물품 / 상세한 사유 작성 (상기 항목에 포함되지 않는다고 판단되는 것들 .. SPR 파트정리용, Feeder 파트 정리 등)</value>
</data>
<metadata name="label12.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<data name="label12.ToolTip" xml:space="preserve">
<value>* 공용 공구 / 상세한 사유 작성 (공용으로 함께 쓰는 것들.. 전동 드릴등)
* 공용 파트 / 상세한 사유 작성 (공용으로 보관하여 정비에 사용되는 것들..WRITE , COnnector ,pin 등)
* 공정 정비 파트 / 상세한 사유 작성 (본인 담당의 주, 보조 공정에서 사용되는 것들. Feeder wheel, O/H, 장비 교체 파트 등)
* 개인 정비 공구 / 상세한 사유 작성 (개인이 보관하여 사용하는 공구류, WRench, Driver, Drill, Tab 등)
* 기타 물품 / 상세한 사유 작성 (상기 항목에 포함되지 않는다고 판단되는 것들 .. SPR 파트정리용, Feeder 파트 정리 등)</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>58</value>
</metadata>