주문내역 엑셀 업로드기능에서 공백제거 추가, 주문내역에서 품목정보 생성하는 기능 추가(관리자)
This commit is contained in:
@@ -577,6 +577,13 @@ namespace FEQ0000
|
||||
}
|
||||
}
|
||||
|
||||
if (dr.RowState == DataRowState.Detached && vqtyreq < 1)
|
||||
{
|
||||
Util.MsgE($"요청수량을 입력하세요");
|
||||
tbQtyReq.Focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
dr.pumqty = vqtyreal;// int.Parse(tbPumQty.Text);
|
||||
dr.pumqtyReq = vqtyreq;// int.Parse(tbpumqtyReq.Text);
|
||||
dr.pumprice = vpumprice;// decimal.Parse(tbPumPrice.Text);
|
||||
@@ -592,6 +599,12 @@ namespace FEQ0000
|
||||
if (vqtyreal > 0) dr.pumamt = dr.pumqty * dr.pumprice;
|
||||
else dr.pumamt = dr.pumqtyReq * dr.pumprice;
|
||||
|
||||
if (dr.pumamt < 1)
|
||||
{
|
||||
FCOMMON.Util.MsgE($"금액이 없습니다. 단가 및 수량을 확인하세요\n해외 통화를 사용할 경우 환율을 고려한 국내단가를 입력해주세요\n환율을 자동으로 입력하려면 공용코드(69)의 FValue 에 값을 입력하세요");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (tbPumIDX.Text == "" || tbPumIDX.Text == "-1") dr.SetpumidxNull();
|
||||
else dr.pumidx = int.Parse(tbPumIDX.Text);
|
||||
dr.sid = tbSID.Text.Trim();
|
||||
@@ -832,7 +845,8 @@ namespace FEQ0000
|
||||
{
|
||||
if (decimal.TryParse(tbPumPriceD.Text.Replace(",", ""), out decimal priced))
|
||||
{
|
||||
var price = FCOMMON.info.dollertowon * (double)priced;
|
||||
var curr = lbcurrentwon.Tag != null ? (float)lbcurrentwon.Tag : 0;
|
||||
var price = curr * (double)priced;
|
||||
tbPumPrice.Text = (Math.Ceiling(price)).ToString("N0");
|
||||
}
|
||||
else tbPumPrice.Text = "0";
|
||||
@@ -847,5 +861,43 @@ namespace FEQ0000
|
||||
{
|
||||
this.dtExpDate.Enabled = chkExp.Checked;
|
||||
}
|
||||
|
||||
private void cmbCurrency_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (cmbCurrency.SelectedIndex >= 0)
|
||||
{
|
||||
var val = cmbCurrency.SelectedValue.ToString();
|
||||
var dt = cmbCurrency.DataSource as DataTable;
|
||||
var v = dt.AsEnumerable().Where(t => t.Field<String>("Value") == val).FirstOrDefault();
|
||||
if (v != null)
|
||||
{
|
||||
var price = v.Field<float>("FValue");
|
||||
lbcurrentwon.Text = $"환율:{price}원";
|
||||
lbcurrentwon.Tag = price;
|
||||
//if (binit)
|
||||
//{
|
||||
|
||||
// if (decimal.TryParse(tbPumPriceD.Text,out decimal priced))
|
||||
// {
|
||||
// if (priced > 0)
|
||||
// dr.pumamt = priced * (decimal)price;
|
||||
// }
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
lbcurrentwon.Text = $"환율이 입력되지 않았습니다";
|
||||
lbcurrentwon.Tag = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lbcurrentwon.Text = "통화기호를 선택하세요";
|
||||
lbcurrentwon.Tag = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user