リビジョン 384
入金明細、消費税項目追加
積算見積登録時、積算予算データ登録処理を修正
積算見積、不足関数追加
trunk/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs | ||
---|---|---|
40 | 40 |
RequestNo, |
41 | 41 |
OrderNo, |
42 | 42 |
DepositAmount, |
43 |
TaxAmount, |
|
43 | 44 |
DiscountAmount, |
44 | 45 |
CnstrPrice, |
45 | 46 |
Fees, |
... | ... | |
90 | 91 |
strcmd.Append(", RequestNo"); |
91 | 92 |
strcmd.Append(", OrderNo"); |
92 | 93 |
strcmd.Append(", DepositAmount"); |
94 |
strcmd.Append(", TaxAmount"); |
|
93 | 95 |
strcmd.Append(", DiscountAmount"); |
94 | 96 |
strcmd.Append(", CnstrPrice"); |
95 | 97 |
strcmd.Append(", Fees"); |
... | ... | |
174 | 176 |
strcmd.AppendFormat(", {0}", data.RequestNo.ToString()); |
175 | 177 |
strcmd.AppendFormat(", {0}", data.OrderNo.ToString()); |
176 | 178 |
strcmd.AppendFormat(", {0}", data.DepositAmount.ToString()); |
179 |
strcmd.AppendFormat(", {0}", data.TaxAmount.ToString()); |
|
177 | 180 |
strcmd.AppendFormat(", {0}", data.DiscountAmount.ToString()); |
178 | 181 |
strcmd.AppendFormat(", {0}", data.CnstrPrice.ToString()); |
179 | 182 |
strcmd.AppendFormat(", {0}", data.Fees.ToString()); |
... | ... | |
222 | 225 |
strcmd.AppendFormat(",RequestNo = {0}", data.RequestNo.ToString()); |
223 | 226 |
strcmd.AppendFormat(",OrderNo = {0}", data.OrderNo.ToString()); |
224 | 227 |
strcmd.AppendFormat(",DepositAmount = {0}", data.DepositAmount.ToString()); |
228 |
strcmd.AppendFormat(",TaxAmount = {0}", data.TaxAmount.ToString()); |
|
225 | 229 |
strcmd.AppendFormat(",DiscountAmount = {0}", data.DiscountAmount.ToString()); |
226 | 230 |
strcmd.AppendFormat(",CnstrPrice = {0}", data.CnstrPrice.ToString()); |
227 | 231 |
strcmd.AppendFormat(",Fees = {0}", data.Fees.ToString()); |
... | ... | |
292 | 296 |
wrk.RequestNo = int.Parse(objwrk[(int)NameColumn.RequestNo].ToString()); |
293 | 297 |
wrk.OrderNo = int.Parse(objwrk[(int)NameColumn.OrderNo].ToString()); |
294 | 298 |
wrk.DepositAmount = long.Parse(objwrk[(int)NameColumn.DepositAmount].ToString()); |
299 |
wrk.TaxAmount= long.Parse(objwrk[(int)NameColumn.TaxAmount].ToString()); |
|
295 | 300 |
wrk.DiscountAmount = long.Parse(objwrk[(int)NameColumn.DiscountAmount].ToString()); |
296 | 301 |
wrk.CnstrPrice = long.Parse(objwrk[(int)NameColumn.CnstrPrice].ToString()); |
297 | 302 |
wrk.Fees = long.Parse(objwrk[(int)NameColumn.Fees].ToString()); |
... | ... | |
332 | 337 |
wrk.RequestNo = 0; |
333 | 338 |
wrk.OrderNo = 0; |
334 | 339 |
wrk.DepositAmount = 0; |
340 |
wrk.TaxAmount = 0; |
|
335 | 341 |
wrk.DiscountAmount = 0; |
336 | 342 |
wrk.CnstrPrice = 0; |
337 | 343 |
wrk.Fees = 0; |
trunk/src/ProcessManagement/ProcessManagement/DataModel/DepositDataDetail.cs | ||
---|---|---|
12 | 12 |
public class DepositDataDetail |
13 | 13 |
{ |
14 | 14 |
#region メンバ変数 |
15 |
private int m_OrderersDivision = 0; // 発注者区分 |
|
16 |
private int m_OrderersCode = 0; // 発注者コード |
|
17 |
private string m_TargetDate = string.Empty; // 対象年月 |
|
18 |
private int m_RequestNo = 0; // 請求No |
|
19 |
private int m_OrderNo = 0; // 受付番号 |
|
20 |
private long m_DepositAmount = 0; // 入金金額 |
|
21 |
private long m_DiscountAmount = 0; // 値引き金額 |
|
22 |
private long m_CnstrPrice = 0; // 協力金 |
|
23 |
private long m_Fees = 0; // 手数料 |
|
24 |
private long m_OtherAdjustments = 0; // その他調整 |
|
25 |
private long m_DifferenceAmount = 0; // 差分 |
|
26 |
private int m_ConfirmationPersonCode = 0; // 承認担当者コード |
|
27 |
private DateTime m_ConfirmationDate = DateTime.MinValue; // 担当者承認日付 |
|
28 |
private int m_ConfirmationEndFlg = 0; // 承認完了フラグ |
|
29 |
private string m_Note = string.Empty; // 備考 |
|
30 |
private DateTime m_EntryDate = DateTime.Now; // 登録年月日 |
|
31 |
private DateTime m_UpdateDate = DateTime.Now; // 更新年月日 |
|
15 |
private int m_OrderersDivision = 0; // 発注者区分 |
|
16 |
private int m_OrderersCode = 0; // 発注者コード |
|
17 |
private string m_TargetDate = string.Empty; // 対象年月 |
|
18 |
private int m_RequestNo = 0; // 請求No |
|
19 |
private int m_OrderNo = 0; // 受付番号 |
|
20 |
private long m_DepositAmount = 0; // 入金金額(税抜き) |
|
21 |
private long m_TaxAmount = 0; // 消費税 |
|
22 |
private long m_DiscountAmount = 0; // 値引き金額 |
|
23 |
private long m_CnstrPrice = 0; // 協力金 |
|
24 |
private long m_Fees = 0; // 手数料 |
|
25 |
private long m_OtherAdjustments = 0; // その他調整 |
|
26 |
private long m_DifferenceAmount = 0; // 差分 |
|
27 |
private int m_ConfirmationPersonCode = 0; // 承認担当者コード |
|
28 |
private DateTime m_ConfirmationDate = DateTime.MinValue; // 担当者承認日付 |
|
29 |
private int m_ConfirmationEndFlg = 0; // 承認完了フラグ |
|
30 |
private string m_Note = string.Empty; // 備考 |
|
31 |
private DateTime m_EntryDate = DateTime.Now; // 登録年月日 |
|
32 |
private DateTime m_UpdateDate = DateTime.Now; // 更新年月日 |
|
32 | 33 |
#endregion |
33 | 34 |
|
34 | 35 |
#region コンストラクタ |
... | ... | |
81 | 82 |
} |
82 | 83 |
|
83 | 84 |
/// <summary> |
84 |
/// 入金金額 |
|
85 |
/// 入金金額(税抜き)
|
|
85 | 86 |
/// </summary> |
86 | 87 |
public long DepositAmount |
87 | 88 |
{ |
... | ... | |
90 | 91 |
} |
91 | 92 |
|
92 | 93 |
/// <summary> |
94 |
/// 消費税 |
|
95 |
/// </summary> |
|
96 |
public long TaxAmount |
|
97 |
{ |
|
98 |
get { return m_TaxAmount; } |
|
99 |
set { m_TaxAmount = value; } |
|
100 |
} |
|
101 |
|
|
102 |
/// <summary> |
|
93 | 103 |
/// 値引き金額 |
94 | 104 |
/// </summary> |
95 | 105 |
public long DiscountAmount |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudget.cs | ||
---|---|---|
442 | 442 |
set { m_EditLock = value; } |
443 | 443 |
} |
444 | 444 |
|
445 |
/// <summary> |
|
446 |
/// ?H???????f?[?^??? |
|
447 |
/// </summary> |
|
448 |
public bool SaveBudgerData |
|
449 |
{ |
|
450 |
get { return SilentBudgerSave(); } |
|
451 |
} |
|
452 |
|
|
445 | 453 |
// *-----* ?????????? *-----* |
446 | 454 |
/// <summary> |
447 | 455 |
/// ?T?u?t?H?[???N???t???O |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateBudget/FrmEstimateBudgetAuxiliary.cs | ||
---|---|---|
2757 | 2757 |
/// <summary> |
2758 | 2758 |
/// 積算予算書データ登録 |
2759 | 2759 |
/// </summary> |
2760 |
private bool EstimateBudgetDataEntry(IOEstimateBudget mainDB) |
|
2760 |
private bool EstimateBudgetDataEntry(IOEstimateBudget mainDB, bool bSilent = false)
|
|
2761 | 2761 |
{ |
2762 | 2762 |
try |
2763 | 2763 |
{ |
... | ... | |
2765 | 2765 |
List<EstimateBudget> workList = new List<EstimateBudget>(); |
2766 | 2766 |
|
2767 | 2767 |
// 工事コード |
2768 |
work.ConstructionCode = CommonMotions.cnvIntFromStringCode(m_dispLabelControl[(int)DispControl.ConstructionCode].Text, "-");
|
|
2768 |
work.ConstructionCode = m_ConstructionCode;
|
|
2769 | 2769 |
|
2770 | 2770 |
// 工期 |
2771 | 2771 |
work.ConstructionTime = CommonMotions.cnvDouble(m_dispLabelControl[(int)DispControl.ConstructionTime].Text); |
... | ... | |
2793 | 2793 |
|
2794 | 2794 |
if (!mainDB.SelectAction(strWhere, ref workList, false)) |
2795 | 2795 |
{ |
2796 |
MessageBox.Show("積算予算書データ:登録確認に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
2796 |
if(!bSilent) MessageBox.Show("積算予算書データ:登録確認に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
2797 | 2797 |
return false; |
2798 | 2798 |
} |
2799 | 2799 |
|
... | ... | |
2807 | 2807 |
// データ登録 |
2808 | 2808 |
if (!mainDB.InsertAction(work, false)) |
2809 | 2809 |
{ |
2810 |
MessageBox.Show("積算予算書データ:追加登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
2810 |
if (!bSilent) MessageBox.Show("積算予算書データ:追加登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
2811 | 2811 |
return false; |
2812 | 2812 |
} |
2813 | 2813 |
} |
... | ... | |
2817 | 2817 |
// データ更新 |
2818 | 2818 |
if (!mainDB.UpdateAction(strWhere, work, false)) |
2819 | 2819 |
{ |
2820 |
MessageBox.Show("積算予算書データ:更新登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
2820 |
if (!bSilent) MessageBox.Show("積算予算書データ:更新登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
2821 | 2821 |
return false; |
2822 | 2822 |
} |
2823 | 2823 |
} |
... | ... | |
2836 | 2836 |
/// <summary> |
2837 | 2837 |
/// 積算見積データ明細登録 |
2838 | 2838 |
/// </summary> |
2839 |
private bool EstimateBudgetDetailEntry(IOEstimateBudgetDetail detailDB) |
|
2839 |
private bool EstimateBudgetDetailEntry(IOEstimateBudgetDetail detailDB, bool bSilent = false)
|
|
2840 | 2840 |
{ |
2841 | 2841 |
try |
2842 | 2842 |
{ |
2843 | 2843 |
// まず削除する |
2844 |
string DelSQL = detailDB.CreatePrimarykeyString(CommonMotions.cnvIntFromStringCode(m_dispLabelControl[(int)DispControl.ConstructionCode].Text, "-"));
|
|
2844 |
string DelSQL = detailDB.CreatePrimarykeyString(m_ConstructionCode);
|
|
2845 | 2845 |
detailDB.DeleteAction(DelSQL, false); |
2846 | 2846 |
|
2847 | 2847 |
DataGridViewEX dgv = dgvAllDisplay; |
... | ... | |
2901 | 2901 |
// データ登録 |
2902 | 2902 |
if (!detailDB.InsertAction(work, false)) |
2903 | 2903 |
{ |
2904 |
MessageBox.Show("積算予算書明細データ:追加登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error); |
|
2904 |
if (!bSilent) MessageBox.Show("積算予算書明細データ:追加登録に失敗しました。", "登録エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
2905 | 2905 |
return false; |
2906 | 2906 |
} |
2907 | 2907 |
} // iRows |
... | ... | |
3354 | 3354 |
} |
3355 | 3355 |
} |
3356 | 3356 |
#endregion |
3357 |
|
|
3358 |
#region 非表示データ登録処理 |
|
3359 |
/// <summary> |
|
3360 |
/// 非表示データ登録処理 |
|
3361 |
/// </summary> |
|
3362 |
/// <returns></returns> |
|
3363 |
private bool SilentBudgerSave() |
|
3364 |
{ |
|
3365 |
IOEstimateBudget ebMainDB = new IOEstimateBudget(); |
|
3366 |
IOEstimateBudgetDetail ebDetailDB = new IOEstimateBudgetDetail(); |
|
3367 |
try |
|
3368 |
{ |
|
3369 |
// データ接続 |
|
3370 |
ebMainDB.connect(); ebMainDB.beginTran(); |
|
3371 |
ebDetailDB.connect(); ebDetailDB.beginTran(); |
|
3372 |
|
|
3373 |
// 積算予算データ |
|
3374 |
if (!EstimateBudgetDataEntry(ebMainDB, true)) |
|
3375 |
{ |
|
3376 |
ebMainDB.rollback(); |
|
3377 |
return false; |
|
3378 |
} |
|
3379 |
|
|
3380 |
// 積算予算明細データ |
|
3381 |
if (!EstimateBudgetDetailEntry(ebDetailDB, true)) |
|
3382 |
{ |
|
3383 |
ebMainDB.rollback(); |
|
3384 |
ebDetailDB.rollback(); |
|
3385 |
return false; |
|
3386 |
} |
|
3387 |
|
|
3388 |
// 成功時Commit |
|
3389 |
ebMainDB.commit(); |
|
3390 |
ebDetailDB.commit(); |
|
3391 |
|
|
3392 |
return true; |
|
3393 |
} |
|
3394 |
catch (Exception ex) |
|
3395 |
{ |
|
3396 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3397 |
return false; |
|
3398 |
} |
|
3399 |
finally |
|
3400 |
{ |
|
3401 |
ebMainDB.close(); ebMainDB = null; |
|
3402 |
ebDetailDB.close(); ebDetailDB = null; |
|
3403 |
} |
|
3404 |
} |
|
3405 |
#endregion |
|
3357 | 3406 |
} |
3358 | 3407 |
} |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInput.cs | ||
---|---|---|
1222 | 1222 |
} |
1223 | 1223 |
#endregion |
1224 | 1224 |
|
1225 |
#region ?t?H?[?????[?h |
|
1225 |
#region ?????t?H?[?????[?h
|
|
1226 | 1226 |
/// <summary> |
1227 |
/// ?t?H?[?????[?h |
|
1227 |
/// ?????t?H?[?????[?h
|
|
1228 | 1228 |
/// </summary> |
1229 | 1229 |
/// <param name="sender"></param> |
1230 | 1230 |
/// <param name="e"></param> |
trunk/src/ProcessManagement/ProcessManagement/Forms/DataEntry/EstimateInput/FrmEstimateInputAuxiliary.cs | ||
---|---|---|
4896 | 4896 |
} |
4897 | 4897 |
|
4898 | 4898 |
// 積算予算書データを更新する |
4899 |
if (!UpDateEstimateBudget(edDB, eddDB, ebDB, ebdDB))
|
|
4899 |
if (!UpDateEstimateBudget(ebDB))
|
|
4900 | 4900 |
{ |
4901 | 4901 |
eddDB.rollback(); |
4902 | 4902 |
edbDB.rollback(); |
... | ... | |
4953 | 4953 |
/// 積算予算書データを更新する |
4954 | 4954 |
/// </summary> |
4955 | 4955 |
/// <returns></returns> |
4956 |
private bool UpDateEstimateBudget(IOEstimateData edDB |
|
4957 |
, IOEstimateDataDetail eddDB |
|
4958 |
, IOEstimateBudget ebDB |
|
4959 |
, IOEstimateBudgetDetail ebdDB) |
|
4956 |
private bool UpDateEstimateBudget(IOEstimateBudget ebDB) |
|
4960 | 4957 |
{ |
4958 |
FrmEstimateBudget frm = new FrmEstimateBudget(); |
|
4961 | 4959 |
try |
4962 | 4960 |
{ |
4963 |
|
|
4964 | 4961 |
// ----- ①積算予算書があって承認がされていないかをチェックする |
4965 | 4962 |
// 積算予算書存在&承認チェックSQL作成 |
4966 | 4963 |
StringBuilder strSQL = new StringBuilder(); |
... | ... | |
4973 | 4970 |
// データがあって承認されていれば処理しない |
4974 | 4971 |
if (CommonMotions.cnvInt(vs[1]) == (int)CommonDefine.ApprovalStatus.Approval) return true; |
4975 | 4972 |
|
4976 |
// ----- ② 自社施工費以外を更新する
|
|
4977 |
if (!UpDateEstimateBudget1(ebdDB)) return false;
|
|
4973 |
// 工事コードのセット
|
|
4974 |
frm.ConstructionCode = ConstructionCode;
|
|
4978 | 4975 |
|
4979 |
// ----- ③ 自社施工費を更新する |
|
4980 |
if (!UpDateEstimateBudget2(ebdDB)) return false; |
|
4976 |
// 見えない画面を出す |
|
4977 |
frm.WindowState = FormWindowState.Minimized; |
|
4978 |
frm.Show(); |
|
4979 |
// フォーム非表示 |
|
4980 |
frm.Visible = false; |
|
4981 | 4981 |
|
4982 |
bool bSuccess = frm.SaveBudgerData; |
|
4983 |
|
|
4984 |
// 画面を閉じる |
|
4985 |
frm.Close(); |
|
4986 |
|
|
4982 | 4987 |
return true; |
4983 | 4988 |
} |
4984 | 4989 |
catch (System.Exception ex) |
... | ... | |
4986 | 4991 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
4987 | 4992 |
return false; |
4988 | 4993 |
} |
4994 |
finally |
|
4995 |
{ |
|
4996 |
frm.Dispose(); frm = null; |
|
4997 |
} |
|
4989 | 4998 |
} |
4990 | 4999 |
#endregion |
4991 | 5000 |
|
... | ... | |
6548 | 6557 |
} |
6549 | 6558 |
} |
6550 | 6559 |
#endregion |
6560 |
|
|
6561 |
#region ボタン押下申請処理 |
|
6562 |
/// <summary> |
|
6563 |
/// ボタン押下申請処理 |
|
6564 |
/// </summary> |
|
6565 |
/// <returns></returns> |
|
6566 |
private bool PettionProcess() |
|
6567 |
{ |
|
6568 |
IOEstimateData EstimateDB = new IOEstimateData(); |
|
6569 |
try |
|
6570 |
{ |
|
6571 |
// 積算予算データが無い場合は登録する |
|
6572 |
StringBuilder strSQL = new StringBuilder(); |
|
6573 |
strSQL.Append(EstimateDB.CreatePrimarykeyString(m_ConstructionCode)); |
|
6574 |
EstimateData DataRec = new EstimateData(); |
|
6575 |
if (!EstimateDB.SelectAction(strSQL.ToString(), ref DataRec)) m_bChengeAns = true; |
|
6576 |
|
|
6577 |
// データ変更有時はデータ登録 |
|
6578 |
if (m_bChengeAns) if (!DataEntryProcess()) return false; |
|
6579 |
|
|
6580 |
// 未割付チェック |
|
6581 |
if (!CheckConstructor()) return false; |
|
6582 |
|
|
6583 |
// 申請・承認時の順序チェック |
|
6584 |
if (!CheckApprovalSequence()) return false; |
|
6585 |
|
|
6586 |
// 起動番号 |
|
6587 |
int NowPoint = ClsExcute.NextProcess((int)ClsExcute.SubFormExecuteNo.ApprovalScreen); |
|
6588 |
|
|
6589 |
// 工事番号 |
|
6590 |
ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(m_ConstructionBaseInfo.ConstructionCode); |
|
6591 |
|
|
6592 |
// 承認機能番号 |
|
6593 |
int iApprovalCode = ClsExcute.AppovalList.First(x => x.Value.Equals(s_MyProcessName)).Key; |
|
6594 |
ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(iApprovalCode); |
|
6595 |
|
|
6596 |
// 受付番号 |
|
6597 |
ClsExcute.ProcControlPara[NowPoint].IntExecParameter.Add(CommonDefine.s_Default_OrderNo); |
|
6598 |
|
|
6599 |
return true; |
|
6600 |
} |
|
6601 |
catch (Exception ex) |
|
6602 |
{ |
|
6603 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
6604 |
return false; |
|
6605 |
} |
|
6606 |
finally |
|
6607 |
{ |
|
6608 |
EstimateDB.close(); EstimateDB = null; |
|
6609 |
} |
|
6610 |
} |
|
6611 |
#endregion |
|
6612 |
|
|
6613 |
#region 一人承認処理 |
|
6614 |
/// <summary> |
|
6615 |
/// 一人承認処理 |
|
6616 |
/// </summary> |
|
6617 |
/// <returns></returns> |
|
6618 |
private bool OneApprovalProcess() |
|
6619 |
{ |
|
6620 |
try |
|
6621 |
{ |
|
6622 |
|
|
6623 |
return true; |
|
6624 |
} |
|
6625 |
catch (Exception ex) |
|
6626 |
{ |
|
6627 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
6628 |
return false; |
|
6629 |
} |
|
6630 |
} |
|
6631 |
#endregion |
|
6551 | 6632 |
} |
6552 | 6633 |
} |
他の形式にエクスポート: Unified diff