Ejemplo n.º 1
0
        /// <summary>
        /// S06_URIHD_Entityへ変換
        /// </summary>
        /// <param name="row"></param>
        /// <returns></returns>
        private S07_SRIHD ConvertToS07_SRIHD_Entity(S02_SHRHD row)
        {
            S07_SRIHD s07hd = new S07_SRIHD();

            s07hd.自社コード    = row.自社コード;
            s07hd.支払年月     = row.支払年月;
            s07hd.支払締日     = row.支払締日;
            s07hd.支払先コード   = row.支払先コード;
            s07hd.支払先枝番    = row.支払先枝番;
            s07hd.支払日      = row.支払日;
            s07hd.回数       = row.回数;
            s07hd.支払年月日    = row.支払年月日;
            s07hd.集計開始日    = row.集計開始日;
            s07hd.集計最終日    = row.集計最終日;
            s07hd.前月残高     = row.前月残高;
            s07hd.出金額      = row.出金額;
            s07hd.繰越残高     = row.繰越残高;
            s07hd.通常税率対象金額 = row.通常税率対象金額;
            s07hd.軽減税率対象金額 = row.軽減税率対象金額;
            s07hd.値引額      = row.値引額;
            s07hd.非課税支払額   = row.非課税支払額;
            s07hd.支払額      = row.支払額;
            s07hd.通常税率消費税  = row.通常税率消費税;
            s07hd.軽減税率消費税  = row.軽減税率消費税;
            s07hd.消費税      = row.消費税;
            s07hd.当月支払額    = row.当月支払額;
            s07hd.登録者      = row.登録者;

            return(s07hd);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 仕入一覧ヘッダ登録処理(販社)
        /// </summary>
        /// <param name="context"></param>
        /// <param name="company"></param>
        /// <param name="yearMonth"></param>
        /// <param name="salesCompanyCode"></param>
        /// <param name="targetStDate"></param>
        /// <param name="targetEdDate"></param>
        /// <param name="code"></param>
        /// <param name="eda"></param>
        /// <param name="paymentDate"></param>
        /// <param name="userId"></param>
        private void setHeaderInfoHan(TRAC3Entities context, int myCompanyCode, int yearMonth, int salesCompanyCode, DateTime targetStDate, DateTime targetEdDate,
                                      int code, int eda, DateTime paymentDate, int userId)
        {
            int      cnt      = 1;
            SHR03010 shr03010 = new SHR03010();

            // ヘッダ情報取得(販社)
            S02_SHRHD shrHd = shr03010.getHeaderInfoHan(context, myCompanyCode, yearMonth, salesCompanyCode, cnt, targetStDate, targetEdDate, paymentDate, userId);

            // 都度請求の場合はヘッダデータを作成しない
            if (shrHd == null)
            {
                return;
            }

            // 前月残高の再設定
            S07_SRIHD befData = getLastChargeInfo(context, myCompanyCode, yearMonth, code, eda, cnt);

            shrHd.前月残高 = befData == null ? 0 : befData.当月支払額;

            // 繰越金額、当月残高の再計算
            shrHd.繰越残高  = shrHd.前月残高 - shrHd.出金額;
            shrHd.当月支払額 = shrHd.繰越残高 + shrHd.支払額 + shrHd.消費税;

            // ヘッダ情報の整形
            S07_SRIHD s07data = ConvertToS07_SRIHD_Entity(shrHd);

            // ヘッダ情報登録
            S07_SRIHD_Update(context, s07data);
        }