Index: branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs	(revision 78)
+++ branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs	(revision 79)
@@ -89,17 +89,17 @@
                                                                 , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lease)
                                                                 , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.StoragePlace)
                                                                 , GetConstructionLedgerGroupNo((int)CommonDefine.CostDataNo.Lodging));
-                strDelSQL += string.Format(" AND TARGETMONTH = TO_DATE('{0}','YYYY/MM/DD')", (TargetMonth + "/01"));
+                strDelSQL += string.Format(" AND TARGETMONTH = STR_TO_DATE('{0}','%Y/%m/%d')", (TargetMonth + "/01"));
                 LedgerExcuteDB.ExecuteNonQuery(strDelSQL, false);
 
                 for (int i = (int)CommonDefine.CostDataNo.Transport; i <= (int)CommonDefine.CostDataNo.Lodging; i++)
                 {
-                    string strSQL = "SELECT CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON";
-                    strSQL += String.Format(" WHERE TO_CHAR(ACTIONDATE,'YYYY/MM') = '{0}'", TargetMonth);
+                    string strSQL = "SELECT CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON";
+                    strSQL += String.Format(" WHERE DATE_FORMAT(ACTIONDATE,'%Y/%m') = '{0}'", TargetMonth);
                     strSQL += String.Format(" AND DATATYPE = {0}", i);
                     strSQL += " AND CONSTRUCTIONCODE IN (SELECT A1.CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO A1";
                     strSQL += string.Format(" WHERE (A1.SALESPERSONCODE = {0} OR A1.CONSTRUCTIONPERSONCODE = {0} OR A1.CONSTRSUBPERSONCODE = {0} OR A1.CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode);
-                    strSQL += " GROUP BY CONSTRUCTIONCODE, DATATYPE, TO_CHAR(ACTIONDATE,'YYYY/MM')";
+                    strSQL += " GROUP BY CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m')";
                     strSQL += " ORDER BY CONSTRUCTIONCODE, DATATYPE";
                     ArrayList arList = new ArrayList();
                     if (!CostDB.ExecuteReader(strSQL, ref arList, false)) continue;
@@ -319,9 +319,9 @@
             FrmConstructionLedger frm = new FrmConstructionLedger();
             try
             {
-                string strSQL = "SELECT PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE FROM COSTDATAOFPERSON";
-                strSQL += String.Format(" WHERE PERSONCODE = {0} AND TO_CHAR(ACTIONDATE,'YYYY/MM') = '{1}'", PersonCode, TargetMonth);
-                strSQL += " GROUP BY PERSONCODE, TO_CHAR(ACTIONDATE,'YYYY/MM'), CONSTRUCTIONCODE";
+                string strSQL = "SELECT PERSONCODE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), CONSTRUCTIONCODE FROM COSTDATAOFPERSON";
+                strSQL += String.Format(" WHERE PERSONCODE = {0} AND DATE_FORMAT(ACTIONDATE,'%Y/%m') = '{1}'", PersonCode, TargetMonth);
+                strSQL += " GROUP BY PERSONCODE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), CONSTRUCTIONCODE";
                 strSQL += " ORDER BY CONSTRUCTIONCODE";
 
                 ArrayList arList = new ArrayList();
@@ -537,7 +537,7 @@
                     int NowValue = 0;
                     string strExecout = "SELECT PAYMENTAMOUNT FROM CONSTRUCTIONLEDGEREXCUTE";
                     strExecout += LedgerExDB.CreatePrimarykeyString(CurRec.ConstructionCode, CurRec.GroupCount, CurRec.LineCount);
-                    strExecout += string.Format(" AND TargetMonth = TO_DATE('{0}')", DateTimeUtil.BeginOfMonth(TargetDate).ToShortDateString());
+                    strExecout += string.Format(" AND TargetMonth = STR_TO_DATE('{0}', '%y/%m/%d')", DateTimeUtil.BeginOfMonth(TargetDate).ToShortDateString());
                     ArrayList arExecList = new ArrayList();
                     LedgerExDB.ExecuteReader(strExecout, ref arExecList, false);
                     if (arExecList.Count != 0)
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs	(revision 78)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInput.cs	(revision 79)
@@ -140,24 +140,17 @@
         /// </summary>
         private void FrmRequestInput_Load(object sender, EventArgs e)
         {
-            int ret;
+            string msg = "";
 
             // 初期起動チェック
-            ret = CheckInit();
-            if (ret > 0)
-            {
-                ShowMessageBox("該当工事は結合工事の子工事として請求済のため、単独での請求はできません。", "請求入力", MessageBoxButtons.OK, MessageBoxIcon.Error);
+            if( CheckInit(ref msg) == false ){
+                ShowMessageBox(msg, "請求入力", MessageBoxButtons.OK, MessageBoxIcon.Error);
 
-                this.Close();
+                m_EndButton = DialogResult.Cancel;
 
-                return;
-            }
-            else if (ret == -1)
-            {
-                ShowMessageBox("起動に失敗しました。再起動してください", "請求入力", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                // 前プロセスに戻る
+                ClsExcute.BackProcess();
 
-                this.Close();
-
                 return;
             }
 
@@ -216,7 +209,7 @@
         private void FrmRequestInput_Activated(object sender, EventArgs e)
         {
             // 再描画
-            //this.Refresh();
+            this.Refresh();
         }
 
         /// <summary>
Index: branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs
===================================================================
--- branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs	(revision 78)
+++ branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/Request/RequestInput/FrmRequestInputAuxiliary.cs	(revision 79)
@@ -561,63 +561,97 @@
         /// <summary>
         /// 初期起動時チェック
         /// </summary>
-        private int CheckInit()
+        private bool CheckInit(ref string msg)
         {
-            int ret;
-            string wrk ;
+            string sql;
 
-            StringBuilder sql = new StringBuilder();
-            IOConstructionLink ioLink = new IOConstructionLink();
-            IORequestData ioData = new IORequestData();
+            IOConstructionBaseInfo ioInfo = new IOConstructionBaseInfo();
+            IORequestHead ioReqHead = new IORequestHead();
 
-            List<ConstructionLink> lstLink = new List<ConstructionLink>();
-            ArrayList ar = new ArrayList();
+            msg = "起動に失敗しました。";
 
-            ret = -1;
-
             try{
-                wrk = string.Format(" Where FluctuationCode = {0}", m_ConstructionCode);
-
-                if(ioLink.SelectAction(wrk, ref lstLink ) == false){
-                    return -1;
+                // 工事基本情報の取得
+                ConstructionBaseInfo Info = new ConstructionBaseInfo();
+                sql = ioInfo.CreatePrimarykeyString(m_ConstructionCode);
+                if (ioInfo.SelectAction(sql, ref Info) == false)
+                {
+                    return false;
                 }
 
-                // 独立系はOK
-                if( lstLink.Count == 0)
+                // 結合親工事の場合
+                if (Info.JoinFlg == (int)CommonDefine.BaseInfoJoinFlg.JoinParent)
                 {
-                    return 0 ;
+                    ////////////////////////////////////////////
+                    // 子工事で既に請求が実施されているか確認
+                    ////////////////////////////////////////////
+                    sql = "SELECT";
+                    sql += " ReqHead.RequestNo";
+                    sql += " FROM";
+                    sql += " ConstructionLink Link";
+                    sql += " INNER JOIN RequestHead ReqHead ON Link.FluctuationCode = ReqHead.ReqConstructionCode";
+                    sql += string.Format(" WHERE Link.ConstructionCode = {0} AND Link.LinkType = 1", m_ConstructionCode);
+
+                    ArrayList ar = new ArrayList();
+
+                    if (ioReqHead.ExecuteReader(sql, ref ar) == false)
+                    {
+                        return false;
+                    }
+
+                    // 既に請求済
+                    if (ar.Count > 0)
+                    {
+                        msg = "既に子工事で請求済のため、選択工事での請求はできません。";
+
+                        return false;
+                    }
                 }
+                // 結合子工事の場合
+                else if( Info.JoinFlg == (int)CommonDefine.BaseInfoJoinFlg.JoinChildren)
+                {
+                    ///////////////////////////////////////////
+                    // 親工事で請求済か確認
+                    ///////////////////////////////////////////
+                    sql = "SELECT";
+                    sql += " ReqHead.RequestNo";
+                    sql += " FROM";
+                    sql += " ConstructionLink Link";
+                    sql += " INNER JOIN RequestHead ReqHead ON Link.ConstructionCode = ReqHead.ReqConstructionCode";
+                    sql += string.Format(" WHERE Link.FluctuationCode = {0} AND Link.LinkType = 1", m_ConstructionCode);
 
-                // 結合子の場合は、結合親の本工事として請求データが存在するか確認する
-                sql.AppendLine("SELECT ");
-                sql.AppendLine("dt.MainConstructionCode ");
-                sql.AppendLine("FROM ");
-                sql.AppendLine("RequestHead hd ");
-                sql.AppendLine(",INNER JOIN RequestData dt ON hd.RequestNo = dt.RequestNo ");
-                sql.AppendLine("WHERE  ");
-                sql.AppendFormat("hd.ReqConstructionCode = {0}", lstLink[0].ConstructionCode);
-                sql.AppendFormat("And dt.MainConstructionCode = {0}", m_ConstructionCode);
+                    ArrayList ar = new ArrayList();
 
-                if (ioData.ExecuteReader(sql.ToString(), ref ar) == false)
-                {
-                    return -1;
+                    if (ioReqHead.ExecuteReader(sql, ref ar) == false)
+                    {
+                        return false;
+                    }
+
+                    // 既に請求済
+                    if (ar.Count > 0)
+                    {
+                        msg = "既に親工事で請求済のため、選択工事での請求はできません。";
+
+                        return false;
+                    }
+
                 }
 
-                ret = ar.Count;
+                return true;
             }
             catch (Exception ex)
             {
                 logger.ErrorFormat("システムエラー：{0}：{1}", CommonMotions.GetMethodName(), ex.Message);
+
+                return false;
             }
             finally
             {
-                ioLink.close();
-                ioLink = null;
-                ioData.close();
-                ioData = null;
+                ioInfo.close();
+                ioInfo = null;
+                ioReqHead.close();
+                ioReqHead = null;
             }
-
-            return ret;
         }
         #endregion
 
@@ -1052,6 +1086,7 @@
                         ReqDetailMain = new RequestDataDetail();
                         ReqDetailMain.RequestNo = nRequestNo;
                         ReqDetailMain.MainConstructionCode = nMainConstructonCode;
+                        ReqDetailMain.ConstructionCode = nMainConstructonCode;
                         ReqDetailMain.ConstructionKind = 0;
                     }
                     lstDetail.Add(ReqDetailMain);
@@ -1065,6 +1100,7 @@
                             ReqDetailSub = new RequestDataDetail();
                             ReqDetailSub.RequestNo = nRequestNo;
                             ReqDetailSub.MainConstructionCode = nMainConstructonCode;
+                            ReqDetailSub.ConstructionCode = nConstructionCode;
                             ReqDetailSub.ConstructionKind = 1;
                         }
 
@@ -1648,16 +1684,23 @@
 
                     dic.TryGetValue(key, out lst);
 
-                    for (int j = 0; j < lst.Count; j++)
+                    if (lst != null)
                     {
-                        setAmount(tcol, trow, lst[j].RequestAmount);
-                        setAmount(tcol, trow + 1, lst[j].TaxAmount);
+                        for (int j = 0; j < lst.Count; j++)
+                        {
+                            setAmount(tcol, trow, lst[j].RequestAmount);
+                            setAmount(tcol, trow + 1, lst[j].TaxAmount);
 
-                        if (nState == (int)ApprovalState.Entry)
-                        {
-                            dgv1[tcol, trow].ReadOnly = (m_bEdit == true ? (false):(true));
-                            dgv1[tcol, trow + 1].ReadOnly = (m_bEdit == true ? (false) : (true));
+                            if (nState == (int)ApprovalState.Entry)
+                            {
+                                dgv1[tcol, trow].ReadOnly = (m_bEdit == true ? (false) : (true));
+                                dgv1[tcol, trow + 1].ReadOnly = (m_bEdit == true ? (false) : (true));
+                            }
+                            trow += 2;
                         }
+                    }
+                    else
+                    {
                         trow += 2;
                     }
 
