Inheritance: ScriptableObject
 private void SubmitSO(object sender, RoutedEventArgs e)
 {
     try
     {
         SO so = prepareSO();
         if (so != null && ctx.IsMandatoryDataSet && !String.IsNullOrEmpty(ctx.Cookie))
         {
             postSOAsync(so);
         }
         else
         {
             if (so == null)
             {
                 MessageBox.Show("NK nije instancirana");
             }
             else if (String.IsNullOrEmpty(ctx.Cookie))
             {
                 MessageBox.Show("Cookie nije postavljen.");
             }
             else
             {
                 MessageBox.Show("Provjerite podatke za spajanje");
             }
         }
     }
     catch (Exception ex)
     {
         ExceptionHandler.Log(ex, ctx.Directory);
         MessageBox.Show("Došlo je do greške");
     }
 }
Example #2
0
 public void Input(SO value)
 {
     if (value is FloatSO data)
     {
         OutputFloat.Invoke(data.value);
     }
 }
Example #3
0
 public override void OnSOCreated(SO so)
 {
     if (OutboundCluster != null)
     {
         so.RegisterProtocol(OutboundCluster);
     }
 }
 public void ActOnNextIfValid(SO next)
 {
     if (IsValidTransition(next))
     {
         ActOnCurrent();
     }
 }
 public override void SetData(SO data)
 {
     base.SetData(data);
     this.isCamo  = data.isCamo;
     this.isRegen = data.isRegen;
     this.ChangeColor(this.type);
 }
 public override void OnSOCreated(SO so)
 {
     foreach (var inboundClusterProtocol in InboundClusters)
     {
         so.RegisterProtocol(inboundClusterProtocol);
     }
 }
Example #7
0
        /// <summary>
        /// Calculating the level set gradient using the specified scheme in a narrow band around the zero level set, therein the calculions are performed
        /// </summary>
        /// <param name="LS"> The level set function </param>
        /// <param name="LSG"> Gradient of the level set function </param>
        /// <param name="f"> Specifying the method of flux calculation </param>
        /// <param name="Restriction"> The narrow band around the zero level set wherein the calculations are performed </param>
        void CalculateLevelSetGradient(LevelSet LS, VectorField <SinglePhaseField> LSG, string f, SubGrid Restriction)
        {
            SpatialOperator   SO;
            CoordinateMapping CoDom;

            if (m_ctx.SpatialDimension == 2)
            {
                SO = new SpatialOperator(1, 2, QuadOrderFunc.Linear(), new string[] { "LS", "LSG[0]", "LSG[1]" });
                SO.EquationComponents["LSG[0]"].Add(CreateFlux(m_ctx, f, 0));
                SO.EquationComponents["LSG[1]"].Add(CreateFlux(m_ctx, f, 1));
                SO.Commit();
                CoDom = new CoordinateMapping(LSG[0], LSG[1]);
            }
            else if (m_ctx.SpatialDimension == 3)
            {
                SO = new SpatialOperator(1, 3, QuadOrderFunc.Linear(), new string[] { "LS", "LSG[0]", "LSG[1]", "LSG[2]" });
                SO.EquationComponents["LSG[0]"].Add(CreateFlux(m_ctx, f, 0));
                SO.EquationComponents["LSG[1]"].Add(CreateFlux(m_ctx, f, 1));
                SO.EquationComponents["LSG[2]"].Add(CreateFlux(m_ctx, f, 2));
                SO.Commit();
                CoDom = new CoordinateMapping(LSG[0], LSG[1], LSG[2]);
            }
            else
            {
                throw new NotSupportedException();
            }

            SO.Evaluate(1.0, 0.0, LS.Mapping, null, CoDom, sgrd: Restriction, bndMode: SubGridBoundaryModes.OpenBoundary);
        }
 public void SetVariable(SO id, bool value)
 {
     foreach (var block in orBlocks)
     {
         block.SetVariable(id, value);
     }
 }
Example #9
0
 private static void PostAwakeScriptableObjects()
 {
     foreach (var SO in AllInitializableSO)
     {
         SO.PostAwake();
     }
 }
Example #10
0
 private static void InitializeScriptableObjects()
 {
     foreach (var SO in AllInitializableSO)
     {
         SO.Init();
     }
 }
Example #11
0
        /// <summary>
        /// 화면 팝업에 필요한 설정정보를 호출합니다.
        /// </summary>
        /// 
        public bool Act0_SubFormInit(string popupID, string pFormUID, SO.SO_COMMON_HRD.ConfirmType confirmType = SO.SO_COMMON_HRD.ConfirmType.Close, BoMatrixSelect pBoMatrixSelect = BoMatrixSelect.ms_Single, string pQuery = "", int pRowIdx = -1, int pWidth = 430, int pHeight = 392, string expr = null, string orderBy = null, bool autoQuery = true, string callBack = "CallBack")
        {
            // 팝업창이 열려있으면 return
            if (LoadFormChk(popupID.Trim(), pFormUID))
                return false;

            this.width = Convert.ToInt32(pWidth);
            this.height = Convert.ToInt32(pHeight);
            this.pRowIdx = pRowIdx;
            
            this.LoadForm();
            oForm = B1Connections.theAppl.Forms.ActiveForm;
            
            oForm.Freeze(true);

            ItemPosition(oForm, width, height);

            SAPbouiCOM.Form pForm = B1Connections.theAppl.Forms.Item(pFormUID);

            // 부모창의 popupID 유져데이터에 팝업창의 FormUID를 넣는다.
            FN.SetDataSourceValue(pForm, popupID.Trim(), oForm.UniqueID);
            
            Act2_DataSourcesBinding(oForm);
            Act3_DefualtSetting(popupID.Trim(), pFormUID, confirmType, pBoMatrixSelect, pQuery, pRowIdx, pWidth, pHeight, expr, orderBy, autoQuery, callBack);

            oForm.Freeze(false);
            return true;
        }
Example #12
0
        private void PrintPageMethod(object sender, PrintPageEventArgs e)
        {
            Graphics   g   = e.Graphics;
            Pen        pen = new Pen(Color.Black);
            Font       font;
            SolidBrush brush = new SolidBrush(Color.Black);

            foreach (SimplineObject SO in SOList)
            {
                if (SO.BorderStyle == BorderStyle.None)
                {
                    pen = new Pen(Color.Transparent);
                }
                Rectangle rec = new Rectangle(SO.getX(), SO.getY(), SO.Width, SO.Height);
                g.DrawRectangle(pen, rec);
                if (SO is LabelObject)
                {
                    font = new Font(((LabelObject)SO).getLabFont(), ((LabelObject)SO).getLabSize());
                    g.DrawString(((LabelObject)SO).getLabValue(), font, brush, SO.getX() + ((LabelObject)SO).getLabX(), SO.getY() + ((LabelObject)SO).getLabY());
                }
                else if (SO is PictureObject || SO is BarcodeObject)
                {
                    g.DrawImage(SO.BackgroundImage, SO.getX(), SO.getY(), SO.Width, SO.Height);
                }
            }
        }
Example #13
0
        private void LoadRecord()
        {
            Int64     iID        = Convert.ToInt64(Common.Decrypt(Request.QueryString["soid"], Session.SessionID));
            SO        clsSO      = new SO();
            SODetails clsDetails = clsSO.Details(iID);

            clsSO.CommitAndDispose();

            lblSOID.Text   = clsDetails.SOID.ToString();
            lblSONo.Text   = clsDetails.SONo;
            lblSODate.Text = clsDetails.SODate.ToString("yyyy-MM-dd HH:mm:ss");
            txtRequiredDeliveryDate.Text = clsDetails.RequiredDeliveryDate.ToString("yyyy-MM-dd");
            cboCustomer.SelectedIndex    = cboCustomer.Items.IndexOf(cboCustomer.Items.FindByValue(clsDetails.CustomerID.ToString()));
            txtCustomerContact.Text      = clsDetails.CustomerContact;
            txtCustomerTelephoneNo.Text  = clsDetails.CustomerTelephoneNo;
            lblTerms.Text = clsDetails.CustomerTerms.ToString("##0");
            switch (clsDetails.CustomerModeOfTerms)
            {
            case 0:
                lblModeOfterms.Text = "Days";
                break;

            case 1:
                lblModeOfterms.Text = "Months";
                break;

            case 2:
                lblModeOfterms.Text = "Years";
                break;
            }
            txtCustomerAddress.Text = clsDetails.CustomerAddress;
            cboBranch.SelectedIndex = cboBranch.Items.IndexOf(cboBranch.Items.FindByValue(clsDetails.BranchID.ToString()));
            txtBranchAddress.Text   = clsDetails.BranchAddress;
            txtRemarks.Text         = clsDetails.Remarks;
        }
 public void Raise(SO value)
 {
     for (int i = listeners.Count - 1; i >= 0; i--)
     {
         listeners[i].OnEventRaised(value);
     }
 }
Example #15
0
        private void IssueGRN()
        {
            DateTime DeliveryDate = Convert.ToDateTime(txtDeliveryDate.Text);

            ERPConfig        clsERPConfig        = new ERPConfig();
            ERPConfigDetails clsERPConfigDetails = clsERPConfig.Details();

            clsERPConfig.CommitAndDispose();

            if (clsERPConfigDetails.PostingDateFrom <= DeliveryDate && clsERPConfigDetails.PostingDateTo >= DeliveryDate)
            {
                long   SOID         = Convert.ToInt64(lblSOID.Text);
                string CustomerDRNo = txtCustomerDRNo.Text;

                SO clsSO = new SO();
                clsSO.IssueGRN(SOID, CustomerDRNo, DeliveryDate);
                clsSO.CommitAndDispose();

                string stParam = "?task=" + Common.Encrypt("list", Session.SessionID) + "&soid=" + Common.Encrypt(SOID.ToString(), Session.SessionID);
                Response.Redirect("Default.aspx" + stParam);
            }
            else
            {
                string stScript = "<Script>";
                stScript += "window.alert('Sorry you cannot post using the delivery date: " + txtDeliveryDate.Text + ". Please enter an allowable posting date.')";
                stScript += "</Script>";
                Response.Write(stScript);
            }
        }
        public ActionResult Edit([Bind(Include = "SOId,PaymentMethod,PaymentAmount,Id,ReceivedDate,Remarks")] Payment payment)
        {
            Payment oldPymnt = db.Payments.Where(x => x.Id == payment.Id).FirstOrDefault();
            SO      sO       = db.SOes.Where(x => x.Id == payment.SOId).FirstOrDefault();

            if (ModelState.IsValid)
            {
                ////first recover old payment
                sO.BillPaid         -= oldPymnt.PaymentAmount;
                sO.Customer.Balance += oldPymnt.PaymentAmount;//minus this amout from total balance also
                decimal addedPmnts = 0;
                foreach (Payment pmt in db.Payments)
                {
                    if (pmt.SOId == payment.SOId && pmt.Id != payment.Id)
                    {
                        addedPmnts += pmt.PaymentAmount;
                    }
                }
                decimal a = (decimal)sO.Discount + (decimal)sO.SaleReturnAmount + (decimal)addedPmnts;
                decimal b = (decimal)sO.BillAmount - a;
                sO.PrevBalance = sO.Customer.Balance - b; //sO.Customer.Balance - (double) sO.SaleOrderAmount ; //customer last balance will go to prev balance
                sO.Balance     = sO.Customer.Balance;
                //sO.Date = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("Pakistan Standard Time"));


                //db.SOes.Add(sO);


                ////then update new payment


                sO.BillPaid         += payment.PaymentAmount;
                sO.PrevBalance       = sO.Customer.Balance;   //customer last balnce will go to prev balance
                sO.Customer.Balance -= payment.PaymentAmount; //minus this amout from total balance also
                sO.Balance           = sO.Customer.Balance;
                sO.Date              = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("Pakistan Standard Time"));


                oldPymnt.PaymentAmount = payment.PaymentAmount;
                oldPymnt.PaymentMethod = payment.PaymentMethod;
                oldPymnt.ReceivedDate  = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("Pakistan Standard Time"));
                oldPymnt.Remarks       = payment.Remarks;

                db.Entry(oldPymnt).State = EntityState.Modified;
                db.Entry(sO).State       = EntityState.Modified;



                db.SaveChanges();
                //return RedirectToAction("Index");
                //SO sO = db.SOes.Where(x => x.Id == payment.SOId).FirstOrDefault();

                string orderId = string.Join("-", ASCIIEncoding.ASCII.GetBytes(Encryption.Encrypt(payment.SOId)));
                //public ActionResult Create(string custName, string orderNo, string id)
                return(RedirectToAction("Create", new { custName = sO.Customer.Name, orderNo = sO.SOSerial, id = orderId }));
                //return RedirectToAction("Create", new { orderId });
            }
            ViewBag.SOId = new SelectList(db.SOes, "Id", "Remarks", payment.SOId);
            return(View(payment));
        }
Example #17
0
        private void GenerateItems()
        {
            SO clsSO = new SO();

            clsSO.GenerateItemsForReorder(Int32.Parse(Session["TerminalID"].ToString()), Convert.ToInt64(lblSOID.Text));
            clsSO.CommitAndDispose();
        }
Example #18
0
        private bool DeleteItems()
        {
            bool   boRetValue = false;
            string stIDs      = "";

            foreach (DataListItem item in lstItem.Items)
            {
                HtmlInputCheckBox chkList = (HtmlInputCheckBox)item.FindControl("chkList");
                if (chkList != null)
                {
                    if (chkList.Checked == true)
                    {
                        stIDs     += chkList.Value + ",";
                        boRetValue = true;
                    }
                }
            }
            if (boRetValue)
            {
                SOItem clsSOItem = new SOItem();
                clsSOItem.Delete(stIDs.Substring(0, stIDs.Length - 1));

                SO clsSO = new SO(clsSOItem.Connection, clsSOItem.Transaction);
                clsSO.SynchronizeAmount(Convert.ToInt64(lblSOID.Text));

                SODetails clsSODetails = clsSO.Details(Convert.ToInt64(lblSOID.Text));

                clsSOItem.CommitAndDispose();

                UpdateFooter(clsSODetails);
            }

            return(boRetValue);
        }
Example #19
0
        private bool Delete()
        {
            bool   boRetValue = false;
            string stIDs      = "";

            foreach (DataListItem item in lstItem.Items)
            {
                HtmlInputCheckBox chkList = (HtmlInputCheckBox)item.FindControl("chkList");
                if (chkList != null)
                {
                    if (chkList.Checked == true)
                    {
                        stIDs     += chkList.Value + ",";
                        boRetValue = true;
                    }
                }
            }
            if (boRetValue)
            {
                SO clsSO = new SO();
                clsSO.Delete(stIDs.Substring(0, stIDs.Length - 1));
                clsSO.CommitAndDispose();
            }

            return(boRetValue);
        }
Example #20
0
        async Task Find_DayCountAsync()
        {
            try
            {
                inc++;
                IFirebaseClient client = new FireSharp.FirebaseClient(config);
                SL = SL + inc.ToString("00");
                FirebaseResponse response = await client.GetAsync("Sales/SalesOrder/" + SL);

                SO rep = response.ResultAs <SO>();
                if (rep?.SalesOrderID == null)
                {
                    stat   = 1;
                    saleID = SL;
                    return;
                }
                else
                {
                    // Replaces No. with the OLD Format
                    SL = SL.Replace(inc.ToString("00"), "");
                    Find_DayCountAsync();
                }
            }
            catch (Exception)
            {
            }
        }
Example #21
0
        public void Notify(params object[] args)
        {
            if (args == null || args.Length == 0 || !(args[0] is UFSoft.UBF.Business.EntityEvent))
            {
                return;
            }
            BusinessEntity.EntityKey key = ((UFSoft.UBF.Business.EntityEvent)args[0]).EntityKey;

            if (key == null)
            {
                return;
            }
            SO so = key.GetEntity() as UFIDA.U9.SM.SO.SO;//销售订单实体

            if (so == null)
            {
                return;
            }
            //if (UFIDA.U9.Base.Context.LoginOrg.Code != "J002") return;//组织必须等于贸易中心
            if (!PubHelperExtend.IsTradeCenterOrg())
            {
                return;                                     //组织必须等于贸易中心
            }
            if (string.IsNullOrEmpty(so.DescFlexField.PrivateDescSeg14))
            {
                throw new Exception("接单组织不能为空!");
            }

            #region 根据接单组织改变记账期间、币种、法人组织
            UFIDA.U9.Base.Organization.Organization org = UFIDA.U9.Base.Organization.Organization.Finder.Find("Code='" + so.DescFlexField.PrivateDescSeg14 + "'");//组织机构
            if (org == null)
            {
                throw new Exception("无效的接单组织!");
            }

            so.LegacyOrg = org;// 法人组织
            foreach (SOLine line in so.SOLines)
            {
                foreach (SOShipline subLine in line.SOShiplines)
                {
                    subLine.ShiperOrg = org;

                    Session.Current.InList(subLine);
                }
            }
            UFIDA.U9.Base.SOB.SetofBooks setofBooks = UFIDA.U9.Base.SOB.SetofBooks.Finder.Find("SOBType=0 and Org.Code='" + so.DescFlexField.PrivateDescSeg14 + "'");//主账簿
            if (setofBooks == null)
            {
                throw new Exception("接单组织:" + org.Name + "未设置主账簿!");
            }

            UFIDA.U9.Base.SOB.SOBAccountingPeriod sob = UFIDA.U9.CBO.SCM.Util.BusinessHelper.GetNotClosedSOBAccountingPeriodBySOB(setofBooks, org.Key, so.BusinessDate, false);
            if (sob != null)
            {
                //记账期间赋值
                so.KeepAccountPeriod = sob;
                so.FC = setofBooks.FunctionalCurrency;
            }
            #endregion
        }
Example #22
0
 public Portatil(RAM ram, String procesador, SO so, String marca, String modelo, float pulgadas, bool estaReparado)
     : base(marca, modelo, pulgadas, estaReparado)
 {
     _Ram        = ram - 1;
     _Procesador = procesador;
     _SO         = so;
 }
Example #23
0
 public void MessageAll(SO message)
 {
     foreach (var value in values)
     {
         value.Message(message);
     }
 }
Example #24
0
        private static void testXml()
        {
            System.IO.FileInfo f = new FileInfo(@"C:\Temp\Report_XMLSerialization.txt");

            using (StreamWriter sw = f.AppendText())
            {
                try
                {
                    SO so = new SO(false, null, null, "Pero Perić", "Ilica 1", 1, "Perici", null, 1, "1", false, new System.Collections.Generic.List <Item> {
                        new Item("abc", 1), new Item("def", 3)
                    });
                    string result = so.SerializeToStringNoDeclaration();
                    sw.WriteLine(result);
                }
                catch (Exception ex)
                {
                    sw.WriteLine(ex.Message);
                    sw.WriteLine(ex.StackTrace);
                    if (ex.InnerException != null)
                    {
                        sw.WriteLine(ex.InnerException.Message);
                        sw.WriteLine(ex.InnerException.StackTrace);

                        if (ex.InnerException.InnerException != null)
                        {
                            sw.WriteLine(ex.InnerException.InnerException.Message);
                            sw.WriteLine(ex.InnerException.InnerException.StackTrace);
                        }
                    }
                }
            }
        }
Example #25
0
        public void Notify(params object[] args)
        {
            if (args == null || args.Length == 0 || !(args[0] is UFSoft.UBF.Business.EntityEvent))
            {
                return;
            }
            BusinessEntity.EntityKey key = ((UFSoft.UBF.Business.EntityEvent)args[0]).EntityKey;

            if (key == null)
            {
                return;
            }
            SO so = key.GetEntity() as UFIDA.U9.SM.SO.SO;

            if (so == null)
            {
                return;
            }
            //if (UFIDA.U9.Base.Context.LoginOrg.Code != "J002") return;//组织必须等于贸易中心
            if (!UFIDA.U9.Cust.GS.FT.PlugInBE.PubHelper.PubHelperExtend.IsTradeCenterOrg())
            {
                return;                                                                            //组织必须等于贸易中心
            }
            using (ISession session = Session.Open())
            {
                UFIDA.U9.Cust.GS.FT.PlugInBE.PubHelper.PubSoDeleteExtend.DeleteSOFee(so);//删除费用
                session.Commit();
            }
        }
Example #26
0
        /// <summary>
        /// 收集页面上不同运费集合
        /// </summary>
        /// <returns></returns>
        protected static List <FeeTypAmountDTOData> GetFeeList(SO so)
        {
            List <FeeTypAmountDTOData> FeeList = new List <FeeTypAmountDTOData>();

            if (!string.IsNullOrEmpty(so.DescFlexField.PrivateDescSeg5))
            {
                FeeTypAmountDTOData DTO = new FeeTypAmountDTOData();
                DTO.FeeType   = 0010101;
                DTO.FeeAmount = Convert.ToDecimal(so.DescFlexField.PrivateDescSeg5);
                FeeList.Add(DTO);
            }
            if (!string.IsNullOrEmpty(so.DescFlexField.PrivateDescSeg6))
            {
                FeeTypAmountDTOData DTO = new FeeTypAmountDTOData();
                DTO.FeeType   = 0010102;
                DTO.FeeAmount = Convert.ToDecimal(so.DescFlexField.PrivateDescSeg6);
                FeeList.Add(DTO);
            }
            if (!string.IsNullOrEmpty(so.DescFlexField.PrivateDescSeg7))
            {
                FeeTypAmountDTOData DTO = new FeeTypAmountDTOData();
                DTO.FeeType   = 0010103;
                DTO.FeeAmount = Convert.ToDecimal(so.DescFlexField.PrivateDescSeg7);
                FeeList.Add(DTO);
            }
            if (!string.IsNullOrEmpty(so.DescFlexField.PrivateDescSeg8))
            {
                FeeTypAmountDTOData DTO = new FeeTypAmountDTOData();
                DTO.FeeType   = 0010104;
                DTO.FeeAmount = Convert.ToDecimal(so.DescFlexField.PrivateDescSeg8);
                FeeList.Add(DTO);
            }
            return(FeeList);
        }
Example #27
0
 public Movil(string marca, string modelo, int pulgadas, SO sO)
 {
     Marca    = marca;
     Modelo   = modelo;
     Pulgadas = pulgadas;
     so       = sO;
 }
Example #28
0
        public bool IsActive(SO id = null)
        {
            if (id && id != this.id)
            {
                return(false);
            }

            bool active = false;

            foreach (var key in keys)
            {
                switch (pressType)
                {
                case PressType.Down: active = Input.GetKeyDown(key); break;

                case PressType.Up: active = Input.GetKeyUp(key); break;

                case PressType.Continuous: active = Input.GetKey(key); break;
                }

                if (active)
                {
                    break;
                }
            }

            return(active);
        }
Example #29
0
    public static void Main(String[] args)
    {
        IFormatter fmtr = new SoapFormatter();

        // IFormatter fmtr = new BinaryFormatter();        // Alternative
        if (!File.Exists("objects"))
        {
            Console.WriteLine("Creating objects and writing them to file:");
            SC c = new SC();
            SO o1 = new SO(1, c), o2 = new SO(2, c);
            Console.WriteLine("The SC object is shared between o1 and o2:");
            o1.c.ci = 3; o2.c.ci = 4;           // Update the shared c twice
            o1.CPrint(); o2.CPrint();           // Prints i1c4 i2c4
            // Open file and serialize objects to it:
            Stream strm = File.Open("objects", FileMode.Create);
            fmtr.Serialize(strm, o1); fmtr.Serialize(strm, o2);
            strm.Close();
            Console.WriteLine("\nRun the example again to read objects from file");
        }
        else
        {
            Console.WriteLine("Reading objects from file (unshared c):");
            Stream strm = File.Open("objects", FileMode.Open);
            SO     o1i = (SO)(fmtr.Deserialize(strm)), o2i = (SO)(fmtr.Deserialize(strm));
            strm.Close();
            o1i.CPrint(); o2i.CPrint();         // Prints i1c4() i2c4()
            Console.WriteLine("The sharing of the SC object is lost:");
            o1i.c.ci = 5; o2i.c.ci = 6;         // Update two different c's
            o1i.CPrint(); o2i.CPrint();         // Prints i1c5() i2c6()
            File.Delete("objects");
        }
        Console.WriteLine();
    }
Example #30
0
 public Tablet(string marca, string modelo, int pulgadas, SO sO, int precio)
 {
     Marca    = marca;
     Modelo   = modelo;
     Pulgadas = pulgadas;
     so       = sO;
     Precio   = precio;
 }
Example #31
0
 public PC(RAM ram, String fuente, List <String> piezas, String procesador, SO so, String modelo, String marca, float pulgadas, float precio)
     : base(marca, modelo, pulgadas, estaReparado)
 {
     _Fuente     = fuente;
     _Piezas     = piezas;
     _Procesador = procesador;
     _Precio     = precio;
 }
 public void DealPriceCal(BusinessOperatorTypeEnumData action, SO so, SOPriceCal priceCalc
     , List<UIChangeInfoData> list
     )
 {
     if (!SMTools.IsNull((ObjectList)so.SOLines))
     {
         //List<UIChangeInfoData> list = new List<UIChangeInfoData>();
         int num = 0;
         foreach (SOLine line in so.SOLines)
         {
             UIChangeInfoData uIChangeInfoData = null;
             //if ((so.ActionSrc == SMActivityEnum.OBAUpdate) && !so.IsQuickCreate)
             //{
             //    uIChangeInfoData = new UIChangeInfoData
             //    {
             //        ActionEnum = 2
             //    };
             //    if ((line.FinallyPriceTC > 0M) && (line.OrderPriceTC == 0M))
             //    {
             //        line.OrderPriceTC = line.FinallyPriceTC;
             //    }
             //    if (((line.OrderPriceTC == 0M) && (line.FinallyPriceTC == 0M)) && SMConstant.IsDiscountItemMaster(line.ItemInfo.ItemID))
             //    {
             //        line.FinallyPriceTC = -1M;
             //        line.OrderPriceTC = -1M;
             //        line.SrcDocPrice = -1M;
             //        line.PriceSource = PriceSourceEnum.SourceDoc;
             //    }
             //    if (!string.IsNullOrEmpty(line.PriceCalField))
             //    {
             //        priceCalc.SetChangeInfoData(line, uIChangeInfoData);
             //    }
             //    else if (((ObjectState)line.get_SysState()).Equals((ObjectState)2))
             //    {
             //        if (line.PriceSource == PriceSourceEnum.PriceList)
             //        {
             //            uIChangeInfoData.FieldName = "QtyPriceUOM";
             //        }
             //        else if ((((line.TotalMoneyTC > 0M) || (line.NetMoneyTC > 0M)) || (line.FinallyPriceTC > 0M)) || (line.OrderPriceTC > 0M))
             //        {
             //            if ((line.PriceSource == PriceSourceEnum.Empty) && (so.ActionSrc == SMActivityEnum.OBAUpdate))
             //            {
             //                line.PriceSource = PriceSourceEnum.Custom;
             //            }
             //            if ((line.TotalMoneyTC > 0M) || (line.NetMoneyTC > 0M))
             //            {
             //                if (so.IsPriceIncludeTax && (line.TotalMoneyTC > 0M))
             //                {
             //                    uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
             //                    uIChangeInfoData.OldValue = line.TotalMoneyTC;
             //                    uIChangeInfoData.NewValue = line.TotalMoneyTC;
             //                }
             //                else if (!(so.IsPriceIncludeTax || (line.NetMoneyTC <= 0M)))
             //                {
             //                    uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
             //                    uIChangeInfoData.OldValue = line.NetMoneyTC;
             //                    uIChangeInfoData.NewValue = line.NetMoneyTC;
             //                }
             //                else if (line.TotalMoneyTC > 0M)
             //                {
             //                    uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
             //                    uIChangeInfoData.OldValue = line.TotalMoneyTC;
             //                    uIChangeInfoData.NewValue = line.TotalMoneyTC;
             //                }
             //                else
             //                {
             //                    uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
             //                    uIChangeInfoData.OldValue = line.NetMoneyTC;
             //                    uIChangeInfoData.NewValue = line.NetMoneyTC;
             //                }
             //            }
             //            else if (line.FinallyPriceTC > 0M)
             //            {
             //                if (line.OrderPriceTC == 0M)
             //                {
             //                    line.OrderPriceTC = line.FinallyPriceTC;
             //                    uIChangeInfoData.FieldName = "OrderPrice";
             //                }
             //                else
             //                {
             //                    uIChangeInfoData.FieldName = "FinallyPrice";
             //                    uIChangeInfoData.OldValue = line.OriginalData.FinallyPriceTC;
             //                    uIChangeInfoData.NewValue = line.FinallyPriceTC;
             //                }
             //            }
             //            else if (line.OrderPriceTC > 0M)
             //            {
             //                uIChangeInfoData.FieldName = "OrderPrice";
             //                uIChangeInfoData.OldValue = line.OrderPriceTC;
             //            }
             //        }
             //        else
             //        {
             //            uIChangeInfoData.ActionEnum = 0;
             //        }
             //    }
             //    else if (!string.IsNullOrEmpty(line.PriceCalField))
             //    {
             //        priceCalc.SetChangeInfoData(line, uIChangeInfoData);
             //    }
             //    else if (line.PriceListID != line.OriginalData.PriceListID)
             //    {
             //        line.PriceSource = PriceSourceEnum.Empty;
             //        uIChangeInfoData.FieldName = "PriceList";
             //    }
             //    else if ((((line.TotalMoneyTC > 0M) || (line.NetMoneyTC > 0M)) || (line.FinallyPriceTC > 0M)) || (line.OrderPriceTC > 0M))
             //    {
             //        if (line.OrderByQtyPU != line.OriginalData.OrderByQtyPU)
             //        {
             //            uIChangeInfoData.FieldName = "FinallyPrice";
             //            uIChangeInfoData.OldValue = line.OriginalData.FinallyPriceTC;
             //            uIChangeInfoData.NewValue = line.FinallyPriceTC;
             //        }
             //        else if (((line.TotalMoneyTC > 0M) && (line.TotalMoneyTC != line.OriginalData.TotalMoneyTC)) || ((line.NetMoneyTC > 0M) && (line.NetMoneyTC != line.OriginalData.NetMoneyTC)))
             //        {
             //            if (so.IsPriceIncludeTax && (line.TotalMoneyTC > 0M))
             //            {
             //                uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
             //                uIChangeInfoData.OldValue = line.OriginalData.TotalMoneyTC;
             //                uIChangeInfoData.NewValue = line.TotalMoneyTC;
             //            }
             //            else if (!(so.IsPriceIncludeTax || (line.NetMoneyTC <= 0M)))
             //            {
             //                uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
             //                uIChangeInfoData.OldValue = line.OriginalData.NetMoneyTC;
             //                uIChangeInfoData.NewValue = line.NetMoneyTC;
             //            }
             //            else if (line.TotalMoneyTC > 0M)
             //            {
             //                uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
             //                uIChangeInfoData.OldValue = line.OriginalData.TotalMoneyTC;
             //                uIChangeInfoData.NewValue = line.TotalMoneyTC;
             //            }
             //            else
             //            {
             //                uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
             //                uIChangeInfoData.OldValue = line.OriginalData.NetMoneyTC;
             //                uIChangeInfoData.NewValue = line.NetMoneyTC;
             //            }
             //        }
             //        else if ((line.FinallyPriceTC > 0M) && (line.FinallyPriceTC != line.OriginalData.FinallyPriceTC))
             //        {
             //            if (line.OrderPriceTC == 0M)
             //            {
             //                line.OrderPriceTC = line.FinallyPriceTC;
             //                uIChangeInfoData.FieldName = "OrderPrice";
             //            }
             //            else
             //            {
             //                uIChangeInfoData.FieldName = "FinallyPrice";
             //                uIChangeInfoData.OldValue = line.OriginalData.FinallyPriceTC;
             //                uIChangeInfoData.NewValue = line.FinallyPriceTC;
             //            }
             //        }
             //        else if ((line.OrderPriceTC > 0M) && (line.OrderPriceTC != line.OriginalData.OrderPriceTC))
             //        {
             //            uIChangeInfoData.FieldName = "OrderPrice";
             //            uIChangeInfoData.OldValue = line.OrderPriceTC;
             //        }
             //        else
             //        {
             //            uIChangeInfoData.ActionEnum = 3;
             //        }
             //    }
             //    else
             //    {
             //        uIChangeInfoData.ActionEnum = 0;
             //    }
             //    uIChangeInfoData.ID = line.ID;
             //    uIChangeInfoData.ObjectName = 1;
             //    uIChangeInfoData.Sequence = num++;
             //}
             //else
             {
                 if (line.IsSrcPO() && line.IsFreeSOLine())
                 {
                     continue;
                 }
                 if (line.IsSrcLoanToSale() && ((ObjectState)so.SysState).Equals((ObjectState)2))
                 {
                     uIChangeInfoData = new UIChangeInfoData();
                     if (line.PriceSource == PriceSourceEnum.Empty)
                     {
                         uIChangeInfoData.FieldName = "PriceList";
                         uIChangeInfoData.OldValue = line.PriceListID;
                     }
                     else if (line.PriceSource == PriceSourceEnum.Custom)
                     {
                         uIChangeInfoData.FieldName = "OrderPrice";
                         uIChangeInfoData.OldValue = line.OrderPriceTC;
                     }
                     uIChangeInfoData.ActionEnum = 0;
                     uIChangeInfoData.ID = line.ID;
                     uIChangeInfoData.ObjectName = 1;
                     uIChangeInfoData.Sequence = num++;
                 }
                 else if ((!line.IsSrcQuotation() || (line.IsSrcQuotation() && (line.ApportionPriceTC != 1M))) && ((ObjectState)line.SysState).Equals((ObjectState)2))
                 {
                     uIChangeInfoData = new UIChangeInfoData();
                     if (line.IsSrcPO() || line.IsSrcDSO())
                     {
                         uIChangeInfoData.ActionEnum = 2;
                     }
                     else
                     {
                         uIChangeInfoData.ActionEnum = 0;
                     }
                     uIChangeInfoData.ID = line.ID;
                     uIChangeInfoData.ObjectName = 1;
                     uIChangeInfoData.Sequence = num++;
                     if ((line.TotalMoneyTC > 0M) || (line.NetMoneyTC > 0M))
                     {
                         if (line.IsSrcPO())
                         {
                             //line.IsPriceCalDoingForPO = true;
                             SetSOLine_IsPriceCalDoingForPO(line,true);
                             if (line.TradePathControlMoney.Equals(ControlMoneyEnum.PriceTaxTotal))
                             {
                                 uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
                                 uIChangeInfoData.OldValue = 0;
                                 uIChangeInfoData.NewValue = line.TotalMoneyTC;
                             }
                             else
                             {
                                 uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
                                 uIChangeInfoData.OldValue = 0;
                                 uIChangeInfoData.NewValue = line.NetMoneyTC;
                             }
                         }
                         else if (so.IsPriceIncludeTax || (line.NetMoneyTC == 0M))
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
                             uIChangeInfoData.OldValue = line.TotalMoneyTC;
                             uIChangeInfoData.NewValue = line.TotalMoneyTC;
                             uIChangeInfoData.ActionEnum = 2;
                         }
                         else
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
                             uIChangeInfoData.OldValue = line.NetMoneyTC;
                             uIChangeInfoData.NewValue = line.NetMoneyTC;
                             uIChangeInfoData.ActionEnum = 2;
                         }
                     }
                     else if (line.FinallyPriceTC > 0M)
                     {
                         uIChangeInfoData.FieldName = "FinallyPrice";
                         uIChangeInfoData.OldValue = line.FinallyPriceTC;
                         uIChangeInfoData.NewValue = line.FinallyPriceTC;
                     }
                     else if (line.OrderPriceTC > 0M)
                     {
                         uIChangeInfoData.FieldName = "OrderPrice";
                         uIChangeInfoData.OldValue = line.OrderPriceTC;
                     }
                     else
                     {
                         uIChangeInfoData.FieldName = "QtyPriceUOM";
                     }
                 }
                 else
                 {
                     if (((line.IsSrcPO() || ((line.TradePathKey != null) && line.TradePath.FirstSetRange.Equals(FirstSetRangeEnum.SOPositive))) && (line.NetMoneyTC == line.OriginalData.NetMoneyTC)) && (line.TotalMoneyTC == line.OriginalData.TotalMoneyTC))
                     {
                         continue;
                     }
                     uIChangeInfoData = new UIChangeInfoData
                     {
                         ActionEnum = 2,
                         ID = line.ID,
                         ObjectName = 1,
                         Sequence = num++
                     };
                     if (line.IsSrcPO())
                     {
                         //line.IsPriceCalDoingForPO = true;
                         SetSOLine_IsPriceCalDoingForPO(line, true);
                         if (line.TradePathControlMoney.Equals(ControlMoneyEnum.PriceTaxTotal))
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
                             uIChangeInfoData.OldValue = 0;
                             uIChangeInfoData.NewValue = line.TotalMoneyTC;
                         }
                         else
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
                             uIChangeInfoData.OldValue = 0;
                             uIChangeInfoData.NewValue = line.NetMoneyTC;
                         }
                     }
                     else if ((line.TradePathKey != null) && line.TradePath.FirstSetRange.Equals(FirstSetRangeEnum.SOPositive))
                     {
                         if (line.TradePathControlMoney.Equals(ControlMoneyEnum.PriceTaxTotal))
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
                             uIChangeInfoData.OldValue = line.OriginalData.TotalMoneyTC;
                             uIChangeInfoData.NewValue = line.TotalMoneyTC;
                         }
                         else
                         {
                             uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
                             uIChangeInfoData.OldValue = line.OriginalData.NetMoneyTC;
                             uIChangeInfoData.NewValue = line.NetMoneyTC;
                         }
                     }
                     else if (so.IsPriceIncludeTax)
                     {
                         uIChangeInfoData.FieldName = "TotalMoneyIncludeTax";
                         uIChangeInfoData.OldValue = line.OriginalData.TotalMoneyTC;
                         uIChangeInfoData.NewValue = line.TotalMoneyTC;
                     }
                     else
                     {
                         uIChangeInfoData.FieldName = "TotalMoneyExcludeTax";
                         uIChangeInfoData.OldValue = line.OriginalData.NetMoneyTC;
                         uIChangeInfoData.NewValue = line.NetMoneyTC;
                     }
                     if (line.ApportionPriceTC == 1M)
                     {
                         line.ApportionPriceTC = 0M;
                     }
                 }
             }
             if (uIChangeInfoData != null)
             {
                 list.Add(uIChangeInfoData);
             }
         }
         if (SMTools.IsNotNull<UIChangeInfoData>(list))
         {
             //priceCalc.DealPriceCal(list, true);
             DealPriceCal(priceCalc, list, true);
         }
     }
 }
Example #33
0
        /// <summary>
        /// 입금자료 업데이트
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="transType"></param>
        /// <param name="str_DocEntry"></param>
        /// <returns></returns>
        private bool Update_DepTran(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.TransType transType, string str_DocEntry)
        {
            bool boolReturn = true;
            string strError = string.Empty;
            string xSQL = string.Empty;

            SAPbobsCOM.Recordset oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

            string strDocEntry = str_DocEntry;

            try
            {
                //if (!B1Connections.diCompany.InTransaction) B1Connections.diCompany.StartTransaction();

                xSQL = string.Format(" EXEC [KIS_SP_SO0240A5_HRD] @pDocEntry = {0}, @pTransType = '{1}'", strDocEntry, transType);
                oRS.DoQuery(xSQL);

                //if (B1Connections.diCompany.InTransaction) B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit);

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("Update_DepTran " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                boolReturn = false;
            }
            finally
            {
                //if (B1Connections.diCompany.InTransaction) B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                if (xSQL != null) { xSQL = null; }
                if (oRS != null) { oRS = null; }
            }

            return boolReturn;
        }
Example #34
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "ROWSEQ,U_DELVFR,CREATEDT,U_STATUS,STATUS,READCD,READNM,U_PAPERTP,PAPERNM,U_DELVCNT,U_METHOD,METHOD,U_SAILCD,U_SAILNM,BRCHCD,BRCHNM,ALIAS,ADDRESS,U_RDEPT,U_TEL,U_USERSG1,ZIPCD,U_EMAIL,U_NOTE,U_JOINDT,U_CLOSEDT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,배달시작일,신청일자,상태코드,상태,독자코드,독자명,지종코드,지종,배달부수,가입방법코드,가입방법,유치자,유치자명,분국,분국명,분국약칭,주소,구독부서,전화,작업자,우편번호,메일,배달상세,가입일자,해지일자";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "U_STATUS,U_PAPERTP,U_METHOD,U_SAILCD,BRCHNM";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "ROWSEQ,U_DELVFR,CREATEDT,U_STATUS,STATUS,READCD,READNM,U_PAPERTP,PAPERNM,U_DELVCNT,U_METHOD,METHOD,U_SAILCD,U_SAILNM,BRCHCD,BRCHNM,ALIAS,ADDRESS,U_RDEPT,U_TEL,U_USERSG1,ZIPCD,U_EMAIL,U_NOTE,U_JOINDT,U_CLOSEDT";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "ROWSEQ,U_DELVCNT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
        private int GetCalcVouchersLineCount(SO so)
        {
            int count = 0;

            foreach (SOLine soline in so.SOLines)
            {
                if (soline != null)
                {
                    // 券分摊金额 Pri 2 
                    // 原含税金额 Pri 3 

                    if (IsInVoucherCalc(soline))
                    {
                        count++;
                    }
                }
            }

            return count;
        }
Example #36
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "CHK,U_YYYYMM,U_CENTCD,U_CENTNM,U_REQAMT,U_SAVEAMT,U_REQUNP,U_SAVUNP,LIMIT_AMT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "선택,청구년월,지국코드,지국명,청구액,보증금,청구액미납,보증금미납,보증금한도";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "U_CENTCD,U_CENTNM";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "U_YYYYMM,U_CENTCD,U_CENTNM,U_REQAMT,U_SAVEAMT,U_REQUNP,U_SAVUNP,LIMIT_AMT";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "U_REQAMT,U_SAVEAMT,U_REQUNP,U_SAVUNP,LIMIT_AMT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #37
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "LINENUM,CHECKED,REFDATE,BATCHNUM,TRANSID,BPCODE,BPNAME,ACCOUNT,ACCTNAME,DEBIT,CREDIT,PRCCD,PRCNM,VatGroup,U_CARDCD,U_CARDNM,U_SAUPNO,U_SUPAMT,U_VAT,MEMO,STATUS,JDTNUM,CREATOR,APPROVER,ORDER,BPLID,WS_USERNM,WS_DOCNO,WS_DOCTY,LOCMANTRAN";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,선택,전기일자,분개장번호,트랜잭션번호,GL/BP코드,GL/BP이름,계정코드,계정이름,차변,대변,코스트센터,코스트센터명,부가세코드,거래처,거래처명,사업자번호,공급가액,세액,라인적요,상태,분개번호,생성자,승인자,ORDER,사업장,웹전표작성자,웹전표번호,웹전표유형,관리계정여부";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "LINENUM,ORDER,WS_USERNM,WS_DOCNO,WS_DOCTY,LOCMANTRAN";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "LINENUM,REFDATE,BATCHNUM,TRANSID,BPCODE,BPNAME,ACCOUNT,ACCTNAME,DEBIT,CREDIT,PRCCD,PRCNM,VatGroup,U_CARDCD,U_CARDNM,U_SAUPNO,U_SUPAMT,U_VAT,MEMO,STATUS,JDTNUM,CREATOR,APPROVER,ORDER,BPLID,WS_USERNM,WS_DOCNO,WS_DOCTY,LOCMANTRAN";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "DEBIT,CREDIT,U_SUPAMT,U_VAT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
        private decimal GetSOTotalMoney(SO so)
        {
            decimal soTotalMoney = 0;

            if (so != null
                && so.SOLines != null
                && so.SOLines.Count > 0
                )
            {
                foreach (SOLine soline in so.SOLines)
                {
                    if (soline != null)
                    {
                        // 券分摊金额 Pri 2 
                        // 原含税金额 Pri 3 

                        decimal lineMoney = 0;

                        if (IsInVoucherCalc(soline))
                        {
                            if (!soline.DescFlexField.PrivateDescSeg3.IsNull())
                            {
                                lineMoney = PubClass.GetDecimal(soline.DescFlexField.PrivateDescSeg3);
                            }
                            else
                            {
                                lineMoney = soline.TotalMoneyTC;
                            }
                        }

                        soTotalMoney += lineMoney;
                    }
                } 
            }
            return soTotalMoney;
        }
Example #39
0
        /// <summary>
        /// 분개 저장 TR_COMMON.JournalType 에 따라 분개, 분개취소 전표를 발행한다.
        /// </summary>
        private bool DI_JournalEntries(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.JournalType pJournalType)
        {
            bool boolReturn = true;

            int? retValue = null;
            int nError;
            string strError = string.Empty;

            string strJournalEntry = string.Empty;
            //string xSQL = string.Empty;
            StringBuilder sb;

            string xSQL = string.Empty;

            //DateTime dateDoc = DateTime.Today;
            //string strDate = string.Empty;

            string strHEAD_MEMO = string.Empty;
            string strLINE_MEMO = string.Empty;


            string strDocEntry = string.Empty;
            string strPaperType = string.Empty;
            string strCENTNM = string.Empty;
            string strDESC = string.Empty;
            string strDOCDT = string.Empty;

            string strAccount = string.Empty;
            string strDebit = string.Empty;
            string strCredit = string.Empty;
            string strShortName = string.Empty;
            string strCostCd = string.Empty;

            SAPbobsCOM.JournalEntries oJournalEntries = null;
            try
            {
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0320T_HRD");
                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO03201_HRD");
                strDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();
                strDOCDT = oDB_M.GetValue("U_DOCDT", 0).Trim();
                strCENTNM = oDB_M.GetValue("U_CENTNM", 0).Trim();
                strDESC = oDB_M.GetValue("U_DESC", 0).Trim();

                oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                oJournalEntries = (SAPbobsCOM.JournalEntries)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);

                /*##### 트랙젝션 시작 #####*/
                B1Connections.diCompany.StartTransaction();

                if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                {
                    xSQL = string.Format(" EXEC KIS_SP_SO0320F1_HRD @pDocEntry = {0} ", strDocEntry);
                    oRS.DoQuery(xSQL);
                    if (!oRS.EoF)
                    {
                        // 헤더셋팅
                        strHEAD_MEMO = "[" + strCENTNM + "] " + strDESC;

                        oJournalEntries.ReferenceDate = Convert.ToDateTime(FN.SetDateFormatToDB(strDOCDT)); //전기일
                        oJournalEntries.DueDate = Convert.ToDateTime(FN.SetDateFormatToDB(strDOCDT));   //만기일
                        oJournalEntries.TaxDate = Convert.ToDateTime(FN.SetDateFormatToDB(strDOCDT));   //증빙일
                        oJournalEntries.Memo = strHEAD_MEMO;
                        oJournalEntries.UserFields.Fields.Item("U_ADDOCTP").Value = "KIS_SO0320_HRD";
                        oJournalEntries.UserFields.Fields.Item("U_BPLID").Value = "1";

                        for (int i = 0; i < oRS.RecordCount; i++)
                        {
                            strAccount = oRS.Fields.Item("ACCOUNT").Value.ToString();
                            strDebit = oRS.Fields.Item("DEBIT").Value.ToString(); //차변
                            strCredit = oRS.Fields.Item("CREDIT").Value.ToString(); //대변
                            strShortName = oRS.Fields.Item("SHORTNM").Value.ToString();
                            strLINE_MEMO = oRS.Fields.Item("MEMO").Value.ToString(); //헤더,라인 메모
                            strCostCd = oRS.Fields.Item("COSTCD").Value.ToString(); // 코스트센터 (운반비 적용시 코스트센터 적용)

                            //기본적으로 Count는 1개이다.
                            if (i > 0)
                                oJournalEntries.Lines.Add();

                            oJournalEntries.Lines.AccountCode = strAccount;
                            oJournalEntries.Lines.LineMemo = strLINE_MEMO;

                            // 거래처코드(관리계정일경우 거래처코드 입력)
                            if (!string.IsNullOrEmpty(strShortName))
                                oJournalEntries.Lines.ShortName = strShortName;

                            // 코스트센터 (운반비 적용시 코스트센터 적용)
                            if (!string.IsNullOrEmpty(strCostCd))
                                oJournalEntries.Lines.CostingCode = strCostCd;

                            if (double.Parse(strDebit) != 0.0)
                            {
                                oJournalEntries.Lines.Debit = double.Parse(strDebit);
                            }
                            else
                            {
                                oJournalEntries.Lines.Credit = double.Parse(strCredit);
                            }
                            oRS.MoveNext();
                        }
                    }

                    // 분개라인이 생성되지 않을을경우 분개를 추가 하지 않는다.기본적으로 Count는 1개이다.
                    if (oJournalEntries.Lines.Count > 1)
                        retValue = oJournalEntries.Add();
                }
                else if (pJournalType == SO.SO_COMMON_HRD.JournalType.A02)
                {
                    // 분개 취소시 분개번호는 존재하고 , 분개 취소번호는 없는경우만 분개취소를 실행한다.
                    if (!string.IsNullOrEmpty(oDB_M.GetValue("U_JDTDOC", 0).Trim()) && string.IsNullOrEmpty(oDB_M.GetValue("U_RJDTDOC", 0).Trim()))
                    {
                        oJournalEntries.GetByKey(int.Parse(oDB_M.GetValue("U_JDTDOC", 0).Trim()));
                        retValue = oJournalEntries.Cancel();
                    }
                }

                if (retValue != 0)
                {
                    /*##### 트랙젝션 롤백 #####*/
                    if (B1Connections.diCompany.InTransaction == true)
                    {
                        B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                    }

                    B1Connections.diCompany.GetLastError(out nError, out strError);
                    B1Connections.theAppl.StatusBar.SetText("분개 저장이 실패했습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    boolReturn = false;
                }
                else
                {
                    // 분개라인이 존재할경우 키값을 가져온다.
                    if (oJournalEntries.Lines.Count > 1)
                        strJournalEntry = B1Connections.diCompany.GetNewObjectKey();
                    else
                        strJournalEntry = "";


                    if (!string.IsNullOrEmpty(strJournalEntry))
                    {
                        if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                        {
                            sb = new StringBuilder();
                            sb.AppendLine(" UPDATE [@KIS_SO0320T_HRD] SET U_JDTDOC ='{0}' WHERE DocEntry = {1} ");
                        }
                        else
                        {
                            sb = new StringBuilder();
                            sb.AppendLine("  --1.지대수금_헤더 상태값 UPDATE                 ");
                            sb.AppendLine("  UPDATE [@KIS_SO0320T_HRD]                       ");
                            sb.AppendLine("     SET U_RJDTDOC = {0}, Status = 'C'  ");
                            sb.AppendLine("   WHERE DocEntry = {1}                           ");
                            sb.AppendLine("                                                  ");
                            sb.AppendLine("  --2.지대청구_라인(청구입금TRAN) 데이터 삭제     ");
                            sb.AppendLine("  DELETE [@KIS_SO03103_HRD]                       ");
                            sb.AppendLine("   WHERE U_BTYPE = 'KIS_SO0320_HRD' AND U_BENTRY = {1} ");
                            sb.AppendLine("                                                  ");
                            sb.AppendLine("  --3.지대청구_라인(보증금TRAN) 데이터 삭제       ");
                            sb.AppendLine("  DELETE [@KIS_SO03102_HRD]                       ");
                            sb.AppendLine("   WHERE U_BTYPE = 'KIS_SO0320_HRD' AND U_BENTRY = {1} ");

                            sb.AppendLine("   -- 선수금입금_라인                                                                      ");
                            sb.AppendLine("   DELETE A                                                                                ");
                            sb.AppendLine("     FROM [@KIS_SO04201_HRD] A INNER JOIN [@KIS_SO0420T_HRD] B ON A.DocEntry = B.DocEntry  ");
                            sb.AppendLine("    WHERE B.U_BENTRY = {1} AND B.U_BTYPE = 'KIS_SO0320_HRD'                                ");
                            sb.AppendLine("                                                                                           ");
                            sb.AppendLine("   -- 선수금입금_헤더                                                                      ");
                            sb.AppendLine("   DELETE [@KIS_SO0420T_HRD]                                                               ");
                            sb.AppendLine("    WHERE U_BENTRY = {1} AND U_BTYPE = 'KIS_SO0320_HRD'                                    ");
                        }
                        oRS.DoQuery(string.Format(sb.ToString(), strJournalEntry, strDocEntry));

                        /*##### 트랙젝션 커밋 #####*/
                        if (B1Connections.diCompany.InTransaction == true)
                        {
                            B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit);
                        }

                        GetDataLoad(oForm, strDocEntry);
                    }

                    if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                        B1Connections.theAppl.StatusBar.SetText("분개전기 완료 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                    else
                        B1Connections.theAppl.StatusBar.SetText("분개전기 취소 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                }
                oJournalEntries = null;
            }

            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("DI_JournalEntries " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                /*##### 트랙젝션 롤백 #####*/
                if (B1Connections.diCompany.InTransaction == true)
                {
                    B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                }

                if (oRS != null) { Marshal.ReleaseComObject(oRS); } oRS = null;
                if (oJournalEntries != null)
                {
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oJournalEntries);
                    oJournalEntries = null;
                }
            }
            return boolReturn;
        }
Example #40
0
        /// <summary>
        /// 분개 저장 TR_COMMON.JournalType 에 따라 분개, 분개취소 전표를 발행한다.
        /// </summary>
        private bool DI_JournalEntries(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.JournalType pJournalType)
        {
            bool boolReturn = true;

            int? retValue = null;
            int nError;
            string strError = string.Empty;

            string strJournalEntry = string.Empty;
            string xSQL = string.Empty;

            //string U_RELDT = B1Connections.diCompany.GetCompanyDate().ToString("yyyy-MM-dd");//임포트 실행일              
            //string U_RELDT = B1Connections.diCompany.GetCompanyDate().ToString("yyyyMMdd");//임포트 실행일
            //string U_RELUSER = B1Connections.diCompany.UserName;//임포트 실행 사용자

            string strDate = string.Empty;
            string strMEMO = string.Empty;
            string strDocEntry = string.Empty;

            SAPbobsCOM.JournalEntries oJournalEntries = null;

            SAPbobsCOM.Recordset oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
            oJournalEntries = (SAPbobsCOM.JournalEntries)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);

            try
            {
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0280T_HRD");
                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO02801_HRD");

                strDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();

                B1Connections.diCompany.StartTransaction();

                switch (pJournalType)
                {
                    //분개
                    case SO_COMMON_HRD.JournalType.A01:
                        if (string.IsNullOrEmpty(oDB_M.GetValue("U_JDTDOC", 0).Trim()))
                        {
                            // 차변 - 보통예금
                            string strDebitAmt = string.Empty;
                            string[] arrDebit = { "U102" };
                            string[,] strAccount_Debit = new string[arrDebit.Length, 4];

                            for (int i = 0; i < arrDebit.Length; i++)
                            {
                                strAccount_Debit[i, 0] = arrDebit[i];
                                strAccount_Debit[i, 1] = "";
                            }

                            // 차변 수수료(U503) -> 미지급금-거래처로 변경 
                            string strDebitCMMAmt = string.Empty;
                            string[] arrDebitCMM = { "U205" };
                            string[,] strAccount_DebitCMM = new string[arrDebitCMM.Length, 4];

                            for (int i = 0; i < arrDebitCMM.Length; i++)
                            {
                                strAccount_DebitCMM[i, 0] = arrDebitCMM[i];
                                strAccount_DebitCMM[i, 1] = "";
                            }

                            // 대변 - 외상매출계정-헤경지대, 외상매출계정-KH지대
                            string strCreditAmt = string.Empty;
                            string[] arrCredit = { "U103", "U104" };
                            string[,] strAccount_Credit = new string[arrCredit.Length, 4];

                            for (int i = 0; i < arrCredit.Length; i++)
                            {
                                strAccount_Credit[i, 0] = arrCredit[i];
                                strAccount_Credit[i, 1] = "";
                            }



                            strMEMO = oDB_M.GetValue("U_DEPDT", 0).Trim() + " 신용카드 입금";

                            //DateTime dateDoc = Convert.ToDateTime(FN.SetDateFormatToDB(FN.GetItemValue(ref oForm, "edtTAKEDT"))); //B1Connections.diCompany.GetCompanyDate(); //DateTime.Today;
                            DateTime dateDoc = Convert.ToDateTime(FN.SetDateFormatToDB(FN.GetItemValue(ref oForm, "edtDEPDT")));

                            // 헤더셋팅
                            oJournalEntries.ReferenceDate = dateDoc;    //전기일
                            oJournalEntries.DueDate = dateDoc;          //만기일
                            oJournalEntries.TaxDate = dateDoc;          //증빙일
                            oJournalEntries.Memo = strMEMO;
                            oJournalEntries.UserFields.Fields.Item("U_ADDOCTP").Value = "KIS_SO0280_HRD";
                            oJournalEntries.UserFields.Fields.Item("U_BPLID").Value = "1";

                            //arrTemp[0] : 계정코드
                            //arrTemp[1] : 지종
                            //arrTemp[2] : 계정종류 - 1이면 관리계정
                            string[] arrTemp = new string[4];
                            string shortName = string.Empty;
                            string costCenter = string.Empty;
                            string acct = string.Empty;

                            // 총 입금액
                            double tAmt = GetMatrixSumValue("U_DEPAMT", "");
                            double tCnt = GetMatrixCntValue("");

                            double dAmt = 0;
                            double dCnt = 1;

                            double dCMMAmt = 0;
                            double dCMMAmt_temp = 0;

                            double U_CMMAMT = double.Parse(oDB_M.GetValue("U_CMMAMT", 0).Trim());

                            // 차변
                            for (int i = 0; i < strAccount_Debit.GetLength(0); i++)
                            {
                                //arrTemp = FN.GetRecordsetArrayValue(string.Format(" SELECT U_RMK1,U_RMK2,U_RMK3,U_RMK4 FROM [@KIS_AD00201] WHERE Code = 'SO19' AND U_SMLCD = '{0}' ", strAccount_Debit[i, 0]));
                                arrTemp[0] = FN.GetItemValue(ref oForm, "edtBNKACCT");
                                arrTemp[1] = "";
                                arrTemp[2] = "";

                                // 공통코드에 없는 경우 그대로 사용
                                // 자동이체에서 보통예금은 각 행의 주거래은행에 해당하는 계정코드를 사용한다.
                                if (arrTemp != null)
                                {
                                    strAccount_Debit[i, 0] = arrTemp[0];    // 계정코드
                                    strAccount_Debit[i, 1] = arrTemp[1];    // 지종
                                    strAccount_Debit[i, 2] = arrTemp[2];    // 계정종류 - 1 : 관리계정, 2 : 판관
                                    acct = "";
                                }
                                else
                                    acct = strAccount_Debit[i, 0];

                                string[] arrPaper = strAccount_Debit[i, 1].Split(',');

                                dCMMAmt_temp = 0;

                                for (int j = 0; j < arrPaper.Length; j++)
                                {
                                    shortName = GetShortName(strAccount_Debit[i, 2], strAccount_Debit[i, 0], arrPaper[j]);
                                    costCenter = GetCostCenter(strAccount_Debit[i, 2], arrPaper[j]);

                                    dAmt = GetMatrixSumValue("U_DEPAMT", arrPaper[j]);
                                    dCnt = GetMatrixCntValue(arrPaper[j]);
                                    dCnt = (dCnt == 0 ? 1 : dCnt);


                                    //dCMMAmt = U_CMMAMT;
                                    //dCMMAmt = U_CMMAMT * (dAmt / tAmt);
                                    if (j == arrPaper.Length - 1)
                                        dCMMAmt = U_CMMAMT - dCMMAmt_temp;
                                    else
                                        dCMMAmt = Math.Truncate(U_CMMAMT * (dCnt / tCnt));

                                    dCMMAmt_temp += dCMMAmt;


                                    if (dAmt == 0) continue;

                                    if (!string.IsNullOrEmpty(oJournalEntries.Lines.AccountCode)) oJournalEntries.Lines.Add();

                                    oJournalEntries.Lines.AccountCode = strAccount_Debit[i, 0];
                                    oJournalEntries.Lines.ShortName = shortName;    // strAccount_Debit[i, 0];
                                    oJournalEntries.Lines.CostingCode = costCenter;
                                    oJournalEntries.Lines.LineMemo = strMEMO;
                                    oJournalEntries.Lines.Debit = dAmt - dCMMAmt;
                                }
                            }

                            // 차변 - 수수료 - 배율로 계산하여 처리함
                            for (int i = 0; i < strAccount_DebitCMM.GetLength(0); i++)
                            {
                                arrTemp = FN.GetRecordsetArrayValue(string.Format(" SELECT U_RMK1,U_RMK2,U_RMK3,U_RMK4 FROM [@KIS_AD00201] WHERE Code = 'SO19' AND U_SMLCD = '{0}' ", strAccount_DebitCMM[i, 0]));

                                if (arrTemp != null)
                                {
                                    strAccount_DebitCMM[i, 0] = arrTemp[0];    // 계정코드
                                    strAccount_DebitCMM[i, 1] = arrTemp[1];    // 지종
                                    strAccount_DebitCMM[i, 2] = arrTemp[2];    // 계정종류 - 1 : 관리계정, 2 : 판관
                                    acct = "";
                                }
                                else
                                    acct = strAccount_DebitCMM[i, 0];

                                string[] arrPaper = strAccount_DebitCMM[i, 1].Split(',');

                                dCMMAmt_temp = 0;

                                for (int j = 0; j < arrPaper.Length; j++)
                                {
                                    shortName = GetShortName(strAccount_DebitCMM[i, 2], strAccount_DebitCMM[i, 0], arrPaper[j]);
                                    costCenter = GetCostCenter(strAccount_DebitCMM[i, 2], arrPaper[j]);

                                    dAmt = GetMatrixSumValue("U_DEPAMT", arrPaper[j]);
                                    dCnt = GetMatrixCntValue(arrPaper[j]);
                                    dCnt = (dCnt == 0 ? 1 : dCnt);


                                    //dCMMAmt = U_CMMAMT;
                                    //dCMMAmt = U_CMMAMT * (dAmt / tAmt);
                                    if (j == arrPaper.Length - 1)
                                        dCMMAmt = U_CMMAMT - dCMMAmt_temp;
                                    else
                                        dCMMAmt = Math.Truncate(U_CMMAMT * (dCnt / tCnt));

                                    dCMMAmt_temp += dCMMAmt;


                                    if (dCMMAmt == 0) continue;

                                    if (!string.IsNullOrEmpty(oJournalEntries.Lines.AccountCode)) oJournalEntries.Lines.Add();

                                    oJournalEntries.Lines.AccountCode = strAccount_DebitCMM[i, 0];
                                    oJournalEntries.Lines.ShortName = shortName;    // strAccount_DebitCMM[i, 0];
                                    oJournalEntries.Lines.CostingCode = costCenter;
                                    oJournalEntries.Lines.LineMemo = strMEMO;
                                    oJournalEntries.Lines.Debit = dCMMAmt;
                                }
                            }

                            // 대변
                            for (int i = 0; i < strAccount_Credit.GetLength(0); i++)
                            {
                                arrTemp = FN.GetRecordsetArrayValue(string.Format(" SELECT U_RMK1,U_RMK2,U_RMK3,U_RMK4 FROM [@KIS_AD00201] WHERE Code = 'SO19' AND  U_SMLCD = '{0}' ", strAccount_Credit[i, 0]));

                                if (arrTemp != null)
                                {
                                    strAccount_Credit[i, 0] = arrTemp[0];   // 계정코드
                                    strAccount_Credit[i, 1] = arrTemp[1];   // 지종
                                    strAccount_Credit[i, 2] = arrTemp[2];   // 계정종류 - 1 : 관리계정, 2 : 판관
                                    acct = "";
                                }
                                else
                                    acct = strAccount_Credit[i, 0];

                                string[] arrPaper = strAccount_Credit[i, 1].Split(',');

                                for (int j = 0; j < arrPaper.Length; j++)
                                {
                                    shortName = GetShortName(strAccount_Credit[i, 2], strAccount_Credit[i, 0], arrPaper[j]);
                                    costCenter = GetCostCenter(strAccount_Credit[i, 2], arrPaper[j]);

                                    dAmt = GetMatrixSumValue("U_DEPAMT", arrPaper[j]);

                                    if (dAmt == 0) continue;

                                    if (!string.IsNullOrEmpty(oJournalEntries.Lines.AccountCode)) oJournalEntries.Lines.Add();

                                    oJournalEntries.Lines.AccountCode = strAccount_Credit[i, 0];
                                    oJournalEntries.Lines.ShortName = shortName;    // strAccount_Credit[i, 0];
                                    oJournalEntries.Lines.CostingCode = costCenter;
                                    oJournalEntries.Lines.LineMemo = strMEMO;
                                    oJournalEntries.Lines.Credit = dAmt;
                                }
                            }

                            // 분개라인이 생성되지 않을을경우 분개를 추가 하지 않는다.기본적으로 Count는 1개이다.
                            if (oJournalEntries.Lines.Count > 1)
                                retValue = oJournalEntries.Add();
                        }
                        break;

                    // 역분개
                    case SO_COMMON_HRD.JournalType.A02:
                        // 분개 취소시 분개번호는 존재하고 , 분개 취소번호는 없는경우만 분개취소를 실행한다.
                        if (!string.IsNullOrEmpty(oDB_M.GetValue("U_JDTDOC", 0).Trim()) && string.IsNullOrEmpty(oDB_M.GetValue("U_RJDTDOC", 0).Trim()))
                        {
                            oJournalEntries.GetByKey(int.Parse(oDB_M.GetValue("U_JDTDOC", 0).Trim()));
                            retValue = oJournalEntries.Cancel();
                        }
                        break;

                    default:
                        break;
                }


                if (retValue != 0)
                {
                    if (B1Connections.diCompany.InTransaction == true)
                    {
                        B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                    }

                    B1Connections.diCompany.GetLastError(out nError, out strError);
                    B1Connections.theAppl.StatusBar.SetText("분개 저장이 실패했습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    boolReturn = false;
                }
                else
                {
                    // 분개라인이 존재할경우 키값을 가져온다.
                    if (oJournalEntries.Lines.Count > 1)
                        strJournalEntry = B1Connections.diCompany.GetNewObjectKey();
                    else
                        strJournalEntry = "";


                    if (!string.IsNullOrEmpty(strJournalEntry))
                    {
                        xSQL = string.Format(" EXEC [KIS_SP_SO0281A_HRD] @pDocEntry = {0}, @pJournalType = '{1}', @pJournalEntry = {2} ", strDocEntry, pJournalType, strJournalEntry);
                        oRS.DoQuery(xSQL);
                    }

                    if (B1Connections.diCompany.InTransaction)
                    {
                        B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit);
                    }

                    GetDataLoad(oForm, strDocEntry);
                    //SetJDTItemProp(oForm);

                    if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                        B1Connections.theAppl.StatusBar.SetText("신용카드 입금 전기 완료 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                    else
                        B1Connections.theAppl.StatusBar.SetText("신용카드 입금 전기 취소 완료 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                }

                oJournalEntries = null;
            }

            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("DI_JournalEntries " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                boolReturn = false;
            }
            finally
            {
                if (B1Connections.diCompany.InTransaction == true)
                {
                    B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                }

                if (oJournalEntries != null)
                {
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oJournalEntries);
                    oJournalEntries = null;
                }
                if (xSQL != null)
                {
                    //System.Runtime.InteropServices.Marshal.ReleaseComObject(xSQL);
                    xSQL = null;
                }
            }

            return boolReturn;
        }
Example #41
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "U_SINDT,Code,U_SINNO,U_PAPERTP,PAPERNM,U_ONLINEID,U_SINNM,U_JOB,U_BIRTHDY,U_TELNO,U_CELLNO,U_EMAIL,U_ADDRTP,U_ZIPCD,U_ADDR1,U_ADDR2,U_REQDT,U_SINGBN,SINGBNNM,U_QTY,U_STATUS";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "신청일자,코드,WEB신청번호,지종코드,지종,온라인ID,신청자,직업,생일,연락처,핸드폰,이메일,주소구분,우편번호,주소1,주소2,배달희망일,신청구분코드,신청구분,부수,독자적용상태";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "U_PAPERTP,U_SINGBN,U_STATUS";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "U_SINDT,Code,U_SINNO,U_PAPERTP,PAPERNM,U_ONLINEID,U_SINNM,U_JOB,U_BIRTHDY,U_TELNO,U_CELLNO,U_EMAIL,U_ADDRTP,U_ZIPCD,U_ADDR1,U_ADDR2,U_REQDT,U_SINGBN,SINGBNNM,U_QTY,U_STATUS";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "U_QTY";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #42
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, int pPaneLevel, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        if (pPaneLevel == 1)
                        {
                            rtnValue = "ROWSEQ,CHK,DOCTP,BILLGBN,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,CARDCODE,CARDNAME,VATREGNO,SUPPAMT,VATGRUP,PERSONNM,E_MailL";
                        }
                        else if (pPaneLevel == 2)
                        {
                            rtnValue = "ROWSEQ,CHK,DOCTP,BILLGBN,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,DATEFR,DATETO,CARDCODE,CARDNAME,VATREGNO,SUPPAMT,VATGRUP,PERSONNM,E_MailL";
                        }
                        else
                        {
                            rtnValue = "ROWSEQ,CHK,ETAX_YN,BILLNO,DOCTP,BILLGBN,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,ISSUEDT,CARDCODE,CARDNAME,VATREGNO,DESC,PRICE,QTY,SUPPAMT,VATGRUP,PERSONNM,E_MailL,INPUTP,DTINO,DTSTAT";
                        }
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        if (pPaneLevel == 1)
                        {
                            rtnValue = "#,선택,문서구분,발행구분,문서번호,라인번호,선납/후납,납부시기,청구년월,독자/지국,독자/지국명,증빙일,거래처코드,거래처명,사업자번호,공급가액,부가세그룹,담당자명,담당자메일";
                        }
                        else if (pPaneLevel == 2)
                        {
                            rtnValue = "#,선택,문서구분,발행구분,문서번호,라인번호,선납/후납,납부시기,청구년월,독자/지국,독자/지국명,증빙일,수기시작월,수기종료월,거래처코드,거래처명,사업자번호,공급가액,부가세그룹,담당자명,담당자메일";
                        }
                        else
                        {
                            rtnValue = "#,선택,전송,계산서번호,문서구분,발행구분,문서번호,라인번호,선납/후납,납부시기,청구년월,독자/지국,독자/지국명,증빙일,발행일,거래처코드,거래처명,사업자번호,내역,단가,수량,공급가액,부가세그룹,담당자명,담당자메일,입력구분,전자계산서번호,전송상태";
                        }
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:                       
                            rtnValue = "DOCENTRY,LINEID";                      
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        if (pPaneLevel == 1)
                        {
                            rtnValue = "ROWSEQ,DOCTP,BILLGBN,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,CARDCODE,CARDNAME,VATREGNO,SUPPAMT,VATGRUP,PERSONNM,E_MailL";
                        }
                        else if (pPaneLevel == 2)
                        {
                            rtnValue = "ROWSEQ,DOCTP,BILLGBN,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,DATEFR,DATETO,CARDCODE,CARDNAME,VATREGNO,SUPPAMT,VATGRUP,PERSONNM,E_MailL";
                        }
                        else
                        {
                            rtnValue = "ROWSEQ,ETAX_YN,DOCTP,BILLGBN,BILLNO,DOCENTRY,LINEID,U_ADVPOST,U_PAYINST,YYYYMM,CODE,NAME,TAXDT,ISSUEDT,CARDCODE,CARDNAME,VATREGNO,DESC,PRICE,QTY,SUPPAMT,VATGRUP,PERSONNM,E_MailL,INPUTP,DTINO,DTSTAT";
                        }
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:

                        if (pPaneLevel == 1 || pPaneLevel == 2)
                        {
                            rtnValue = "ROWSEQ,DOCENTRY,LINEID,SUPPAMT";
                        }
                        else
                        {
                            rtnValue = "ROWSEQ,DOCENTRY,LINEID,SUPPAMT,DTINO,PRICE,QTY";
                        }
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #43
0
        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting(string popupID = null, string pFormUID = null, SO.SO_COMMON_HRD.ConfirmType confirmType = SO.SO_COMMON_HRD.ConfirmType.Close, BoMatrixSelect pBoMatrixSelect = BoMatrixSelect.ms_Single, string pQuery = null, int pRowIdx = -1, int? pWidth = null, int? pHeight = null, string pExpr = null, string pOrderBy = null, bool autoQuery = true, string callBack = "CallBack")
        {
            // '// ADD YOUR ACTION CODE HERE ...
            oForm.Settings.EnableRowFormat = false;

            oForm.DataSources.DataTables.Add("sboReturnDt");
            //this.boMatrixSelect = pBoMatrixSelect;


            #region 유져데이터 생성

            oForm.DataSources.UserDataSources.Add("sColID", BoDataType.dt_SHORT_TEXT, 254);

            if (!string.IsNullOrEmpty(popupID))
            {
                oForm.DataSources.UserDataSources.Add("popupID", BoDataType.dt_LONG_TEXT);
                oForm.DataSources.UserDataSources.Item("popupID").ValueEx = popupID;

                oForm.Title = popupID;
            }

            if (!string.IsNullOrEmpty(pFormUID))
            {
                oForm.DataSources.UserDataSources.Add("pFormUID", BoDataType.dt_SHORT_TEXT, 254);
                oForm.DataSources.UserDataSources.Item("pFormUID").ValueEx = pFormUID;

                pForm = B1Connections.theAppl.Forms.Item(pFormUID);
            }

            oForm.DataSources.UserDataSources.Add("pConfTp", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("pConfTp").ValueEx = confirmType.ToString();

            oForm.DataSources.UserDataSources.Add("pBoMtxSel", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("pBoMtxSel").ValueEx = ((int)pBoMatrixSelect).ToString();

            oForm.DataSources.UserDataSources.Add("pQuery", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("pQuery").ValueEx = pQuery;

            oForm.DataSources.UserDataSources.Add("pExpr", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("pExpr").ValueEx = pExpr;

            oForm.DataSources.UserDataSources.Add("pOrderBy", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("pOrderBy").ValueEx = pOrderBy;

            oForm.DataSources.UserDataSources.Add("callBack", BoDataType.dt_LONG_TEXT);
            oForm.DataSources.UserDataSources.Item("callBack").ValueEx = callBack;
            
            oForm.DataSources.UserDataSources.Add("pRowIdx", BoDataType.dt_SHORT_TEXT);
            oForm.DataSources.UserDataSources.Item("pRowIdx").ValueEx = pRowIdx.ToString();

            #endregion

            #region 콜백버튼 생성
            if (!FN.GetItemExistsChk(pForm, callBack))
            {
                pForm.Freeze(true);
                SAPbouiCOM.Item oItm;
                oItm = pForm.Items.Add(callBack, BoFormItemTypes.it_BUTTON);
                oItm.Top = -100;
                oItm.Left = -100;
                oItm.Width = 1;
                oItm.Height = 1;
                oItm.LinkTo = "";

                SAPbouiCOM.Button oButton = (SAPbouiCOM.Button)oItm.Specific;
                oButton.Caption = popupID;
                pForm.Freeze(false);
            }
            #endregion

            #region 조회
            if (autoQuery)
                FindData(oForm);
            #endregion
        }
Example #44
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "U_READCD,U_READNM,U_REQNM,U_CENTCD,U_CENTNM,U_SUMCNT,U_MOBILE,U_CALLNM,SUMAMT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "독자코드,독자명,청구자명,지국코드,지국명,부수,전화번호,담당자,총합계";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "U_READCD,U_READNM,U_REQNM,U_CENTCD,U_CENTNM,U_SUMCNT,U_MOBILE,U_CALLNM,SUMAMT";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "U_SUMCNT,SUMAMT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #45
0
 private void OpenPopup_Address(SAPbouiCOM.Form oForm, string pPopUpID, SO.SO_COMMON_HRD.ZipCodeTypes pZipCodeType)
 {
     try
     {
         KIS_SO0000F_HRD KIS_SO0000F_HRD = new KIS_SO0000F_HRD();
         KIS_SO0000F_HRD.Act0_SubFormInit(pPopUpID, oForm.UniqueID, pZipCodeType, BoMatrixSelect.ms_None, 0, "CallBack");
     }
     catch (Exception ex)
     {
         B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
     }
 }
Example #46
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "CHK,U_READCD,U_READNM,U_CENTCD,U_ADVRECV";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "선택,독자코드,독자명,지국코드,선수금";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "U_CENTCD";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "U_READCD,U_READNM,U_CENTCD,U_ADVRECV";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "U_ADVRECV";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #47
0
        public SO GetSoByTransporter(int transporterId, int soId)
        {
            var so = new SO();

            return so;
        }
Example #48
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "ROWSEQ,CENTCD,CENTNM,BRCHCD,BRCHNM,BRCH_ALIAS,U_CENTGBN,READCD,READNM,U_DELVCD,U_RDEPT,U_PAPERTP,U_PAYCD,U_PAYNM,U_DELVFR,U_DELVTO,U_TEL,ADDRESS,U_DELVCNT,U_METHOD,U_STATUS,U_SAILNM,DATECNT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,지국코드,지국명,분국코드,분국명,분국약칭,구분,독자코드,독자명,배달코드,구독부서,지종,요금제코드,요금제명,배송시작일,배송종료일,연락처,주소,배달부수,가입방법,상태,유치자,배송일수";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "DATECNT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "ROWSEQ,CENTCD,CENTNM,BRCHCD,BRCHNM,BRCH_ALIAS,U_CENTGBN,READCD,READNM,U_DELVCD,U_RDEPT,U_PAPERTP,U_PAYCD,U_PAYNM,U_DELVFR,U_DELVTO,U_TEL,ADDRESS,U_DELVCNT,U_METHOD,U_STATUS,U_SAILNM,DATECNT";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "ROWSEQ,U_DELVCNT,DATECNT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #49
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "ROWSEQ,AREA,PAPERTP,CENTCD,CENTNM,BRCHCD,BRCHNM,ALIAS,VIEW_PRE,VIEW_REGU,PRE_CNT,REG_CNT,TMP_CNT,TRN_CNT,REMARK";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,지역,지종,지국코드,지국명,분국코드,분국명,약칭,이전부수,정기증감,이전,정기,일시증감,발송부수,비고";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "PRE_CNT,REG_CNT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "ROWSEQ,AREA,PAPERTP,CENTCD,CENTNM,BRCHCD,BRCHNM,ALIAS,VIEW_PRE,VIEW_REGU,PRE_CNT,REG_CNT,TMP_CNT,TRN_CNT,REMARK";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "ROWSEQ,VIEW_PRE,VIEW_REGU,TMP_CNT,TRN_CNT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #50
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "ROWSEQ,READCD,READNM,READCNT,U_SAILCD,U_SAILNM,U_METHOD,U_PAPERTP,U_EXPRYM";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,독자코드,독자명,부수,유치자코드,유치자명,가입방법,지종,만료년월";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "ROWSEQ,READCD,READNM,READCNT,U_SAILCD,U_SAILNM,U_METHOD,U_PAPERTP,U_EXPRYM";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "ROWSEQ,READCNT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #51
0
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "SEQ,LineId,U_CHK,U_AREA,U_CENTCD,U_CENTNM,U_PAPEAMT,U_SAVEAMT,U_ADVRECV,U_ADVSUBT,U_UNPAID,U_DELVAMT,U_REQAMT,U_SUMAMT,U_BILLGBN,STATUS";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,LineId,선택,지역,지국,지국명,당월지대,지대보증금,선수금,선수금차감,미수금,신문수송료,청구금액,최종청구금액,계산서발행구분,상태";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "LineId";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "SEQ,LineId,U_AREA,U_CENTCD,U_CENTNM,U_PAPEAMT,U_SAVEAMT,U_ADVRECV,U_ADVSUBT,U_UNPAID,U_DELVAMT,U_REQAMT,U_SUMAMT,U_BILLGBN,STATUS";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "SEQ,LineId,U_PAPEAMT,U_SAVEAMT,U_ADVRECV,U_ADVSUBT,U_UNPAID,U_DELVAMT,U_REQAMT,U_SUMAMT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #52
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "DocEntry,LineId,U_READCD,U_REQNM,U_RTYPE,U_TEL,U_ADDR,U_CENTCD,U_CENTNM,U_CENTGBN,U_RMETHOD,U_SALYM,U_REQYM,U_ARREAMT,U_CANCAMT,U_CLOSAMT,U_ADJUAMT,U_BEFOAMT,U_REQAMT,ADVANCE_AMT,U_REASON,U_BILLGBN,U_PMETHOD,U_SUMCNT,U_PAYPERD,ROWSTAT";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "문서번호,라인번호,독자코드,청구자명,독자구분,연락처,주소,분국코드,분국명,분국구분,가입방법,매출년월,청구년월,이전미납금,이전매출취소금액,당월마감금액,당월조정금액,이전조정금액,청구금액,선수금,조정사유,계산서발행,납부방법,부수,납부시기,수정상태값";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "DocEntry,LineId,ADVANCE_AMT,U_CENTGBN";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "DocEntry,LineId,U_READCD,U_REQNM,U_RTYPE,U_TEL,U_ADDR,U_CENTCD,U_CENTNM,U_CENTGBN,U_RMETHOD,U_SALYM,U_REQYM,U_ARREAMT,U_CLOSAMT,U_ADJUAMT,U_BEFOAMT,U_REQAMT,ADVANCE_AMT,U_BILLGBN,U_SUMCNT,U_PAYPERD,ROWSTAT";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "U_ARREAMT,U_CANCAMT,U_CLOSAMT,U_ADJUAMT,U_BEFOAMT,U_REQAMT,ADVANCE_AMT,U_SUMCNT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #53
0
        /// <summary>
        /// 분개 저장 TR_COMMON.JournalType 에 따라 분개, 분개취소 전표를 발행한다.
        /// </summary>
        private bool DI_JournalEntries(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.JournalType pJournalType)
        {
            bool boolReturn = true;

            int? retValue = null;
            int nError;
            string strError = string.Empty;

            string strJournalEntry = string.Empty;
            //string xSQL = string.Empty;
            StringBuilder sb;


            //DateTime dateDoc = DateTime.Today;
            string strDate = string.Empty;
            string strMEMO = string.Empty;
            string strDocEntry = string.Empty;
            string strPaperType = string.Empty;
            string strYyyyMm = string.Empty;


            string strAccount_Sale = string.Empty; // 매출계정
            string strAccount_CreditSale = string.Empty; // 외상매출계정
            string strAccount_Advance = string.Empty; // 선수금계정
            string strAccount_ShortName = string.Empty;

            string strSaleCancelAmt = string.Empty; // 매출취소
            string strAdjustAmt = string.Empty; // 조정금액
            string strAdvanceSub = string.Empty; //선수금차감(대체)
            string strAdvanceAmt = string.Empty; //선수금(과입금처리)

            SAPbobsCOM.JournalEntries oJournalEntries = null;
            try
            {
                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0150T_HRD");
                oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_SO01501_HRD");
                strDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();
                strPaperType = oDB_M.GetValue("U_PAPERTP", 0).Trim();
                strYyyyMm = oDB_M.GetValue("U_YYYYMM", 0).Trim();
                string strDocDate = DateTimeLibrary.LastDayOfCurrentMonth(strYyyyMm + "01");

                oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);
                oJournalEntries = (SAPbobsCOM.JournalEntries)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries);


                B1Connections.diCompany.StartTransaction();

                if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                {

                    // 분개처리전에 선수금 데이서 생성
                    sb = new StringBuilder();
                    sb.AppendLine("  DECLARE @pERRORCODE    INT                                                                                                   ");
                    sb.AppendLine("  DECLARE @pERROR_MESSAGE NVARCHAR (200)                                                                                       ");
                    sb.AppendLine("  EXEC [KIS_SP_SO0150A4_HRD] @pDocEntry = {0}, @pERRORCODE = @pERRORCODE OUTPUT, @pERROR_MESSAGE = @pERROR_MESSAGE OUTPUT      ");
                    sb.AppendLine("  SELECT @pERRORCODE, @pERROR_MESSAGE                                                                                          ");

                    oRS.DoQuery(string.Format(sb.ToString(), strDocEntry));
                    if (!oRS.EoF)
                    {
                        int strReturn = oRS.Fields.Item(0).Value;
                        if (strReturn != 0)
                        {
                            throw new Exception(string.Format("선수금처리중 오류가 발생했습니다. {0}", oRS.Fields.Item(1).ToString()));
                        }
                    }

                    // 분개데이터 조회
                    oRS.DoQuery(string.Format(" EXEC [KIS_SP_SO0150F2_HRD] @pDocEntry = {0} ", strDocEntry));
                    if (!oRS.EoF)
                    {
                        strMEMO = oRS.Fields.Item("U_YYYYMM").Value.ToString() + " " + oRS.Fields.Item("PAPERNM").Value.ToString(); //+ " 매출";
                        strSaleCancelAmt = oRS.Fields.Item("CANCEL_AMT").Value.ToString();
                        strAdjustAmt = oRS.Fields.Item("ADJUST_AMT").Value.ToString();
                        strAdvanceSub = oRS.Fields.Item("ADVANCE_SUB").Value.ToString();
                        strAdvanceAmt = oRS.Fields.Item("ADVANCE_AMT").Value.ToString();

                        strAccount_Sale = oRS.Fields.Item("ACCT_SALES").Value.ToString();
                        strAccount_CreditSale = oRS.Fields.Item("ACCT_CREDITSALE").Value.ToString();
                        strAccount_Advance = oRS.Fields.Item("ACCT_ADVANCE").Value.ToString();
                        strAccount_ShortName = oRS.Fields.Item("ACCT_SHORTNAME").Value.ToString();


          

                    }

                    // 헤더셋팅
                    oJournalEntries.ReferenceDate = Convert.ToDateTime(strDocDate); //전기일
                    oJournalEntries.DueDate = Convert.ToDateTime(strDocDate);   //만기일
                    oJournalEntries.TaxDate = Convert.ToDateTime(strDocDate);   //증빙일
                    oJournalEntries.Memo = strMEMO + " 매출";
                    oJournalEntries.UserFields.Fields.Item("U_ADDOCTP").Value = "KIS_SO0150_HRD";
                    oJournalEntries.UserFields.Fields.Item("U_BPLID").Value = "1";

                    // 라인 1-1. 매출액
                    oJournalEntries.Lines.AccountCode = strAccount_Sale;

                    oJournalEntries.Lines.LineMemo = strMEMO + " 매출";
                    oJournalEntries.Lines.Credit = double.Parse(strAdjustAmt);

                    // 1-2. 매출취소
                    if (double.Parse(strSaleCancelAmt) != 0.0)
                    {
                        oJournalEntries.Lines.Add();
                        oJournalEntries.Lines.AccountCode = strAccount_Sale;
                        oJournalEntries.Lines.LineMemo = strMEMO + " 이전매출 취소";
                        oJournalEntries.Lines.Credit = double.Parse(strSaleCancelAmt);
                    }

                    // 라인 2-1. 외상매출액
                    oJournalEntries.Lines.Add();
                    oJournalEntries.Lines.AccountCode = strAccount_CreditSale;
                    oJournalEntries.Lines.ShortName = strAccount_ShortName;
                    oJournalEntries.Lines.LineMemo = strMEMO + " 외상매출";

                    if (double.Parse(strAdvanceSub) > 0.0)//선수금대체금액이 있으면(선수금을 뺀 금액이 외상매출금)
                        oJournalEntries.Lines.Debit = double.Parse(strAdjustAmt) - double.Parse(strAdvanceSub);
                    else // 없으면
                        oJournalEntries.Lines.Debit = double.Parse(strAdjustAmt);

                    // 2-2. 외상매출취소
                    if (double.Parse(strSaleCancelAmt) != 0.0)
                    {
                        oJournalEntries.Lines.Add();
                        oJournalEntries.Lines.AccountCode = strAccount_CreditSale;
                        oJournalEntries.Lines.ShortName = strAccount_ShortName;
                        oJournalEntries.Lines.LineMemo = strMEMO + " 이전매출취소로 인한 외상매출금차감";
                        oJournalEntries.Lines.Debit = double.Parse(strSaleCancelAmt);
                    }

                    // 2-3. 선수금대체 (선수금 대체 입금 처리)
                    if (double.Parse(strAdvanceSub) > 0.0)
                    {
                        oJournalEntries.Lines.Add();
                        oJournalEntries.Lines.AccountCode = strAccount_Advance;
                        oJournalEntries.Lines.ShortName = strAccount_ShortName;
                        oJournalEntries.Lines.LineMemo = strMEMO + " 선수금차감";
                        oJournalEntries.Lines.Debit = double.Parse(strAdvanceSub);
                    }

                    // 3-1. 선수금(과입금 선수금 처리)
                    if (double.Parse(strAdvanceAmt) > 0.0)
                    {
                        // 선수금처리
                        oJournalEntries.Lines.Add();
                        oJournalEntries.Lines.AccountCode = strAccount_Advance;
                        oJournalEntries.Lines.ShortName = strAccount_ShortName;
                        oJournalEntries.Lines.LineMemo = strMEMO + " 선수금입금";
                        oJournalEntries.Lines.Credit = double.Parse(strAdvanceAmt);

                        // 선수금처리된 금액만큼 외상매출금에(-) 한다.
                        oJournalEntries.Lines.Add();
                        oJournalEntries.Lines.AccountCode = strAccount_CreditSale;
                        oJournalEntries.Lines.ShortName = strAccount_ShortName;
                        oJournalEntries.Lines.LineMemo = strMEMO + " 선수금을 외상매출금으로대체";
                        oJournalEntries.Lines.Credit = -double.Parse(strAdvanceAmt);
                    }


                    // 분개라인이 생성되지 않을을경우 분개를 추가 하지 않는다.기본적으로 Count는 1개이다.
                    if (oJournalEntries.Lines.Count > 1)
                        retValue = oJournalEntries.Add();
                }
                else if (pJournalType == SO.SO_COMMON_HRD.JournalType.A02)
                {
                    // 분개 취소시 분개번호는 존재하고 , 분개 취소번호는 없는경우만 분개취소를 실행한다.
                    if (!string.IsNullOrEmpty(oDB_M.GetValue("U_JDTNO", 0).Trim()) && string.IsNullOrEmpty(oDB_M.GetValue("U_REJDTNO", 0).Trim()))
                    {
                        oJournalEntries.GetByKey(int.Parse(oDB_M.GetValue("U_JDTNO", 0).Trim()));
                        retValue = oJournalEntries.Cancel();
                    }
                }

                if (retValue != 0)
                {
                    B1Connections.diCompany.GetLastError(out nError, out strError);
                    B1Connections.theAppl.StatusBar.SetText("분개 저장이 실패했습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                    boolReturn = false;

                    if (B1Connections.diCompany.InTransaction == true)
                    {
                        B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                    }
                }
                else
                {
                    // 분개라인이 존재할경우 키값을 가져온다.
                    if (oJournalEntries.Lines.Count > 1)
                        strJournalEntry = B1Connections.diCompany.GetNewObjectKey();
                    else
                        strJournalEntry = "";


                    if (!string.IsNullOrEmpty(strJournalEntry))
                    {
                        if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                        {
                            sb = new StringBuilder();
                            sb.AppendFormat(" UPDATE [@KIS_SO0150T_HRD] SET U_JDTNO ='{0}' WHERE DocEntry = {1} ", strJournalEntry, strDocEntry);
                            //xSQL = string.Format(" UPDATE [@KIS_SO0150T_HRD] SET U_JDTNO ='{0}' WHERE DocEntry = {1} ", strJournalEntry, strDocEntry);
                        }
                        else
                        {
                            sb = new StringBuilder();
                            sb.AppendLine("  UPDATE T1                                                                                                             ");
                            sb.AppendLine("     SET T1.U_STATUS  = 'O'                                                                                             ");
                            sb.AppendLine("    FROM [@KIS_SO0140T_HRD] AS T0                                                                                       ");
                            sb.AppendLine("         INNER JOIN [@KIS_SO01401_HRD] AS T1 ON T0.DocEntry = T1.DocEntry                                               ");
                            sb.AppendLine("         INNER JOIN [@KIS_SO01501_HRD] AS T2 ON T0.U_YYYYMM = T2.U_SALYM AND T1.U_READCD = T2.U_READCD                  ");
                            sb.AppendFormat("   WHERE T2.DocEntry = {0} AND T1.U_STATUS = 'C'                                                  ", strDocEntry);
                            sb.AppendLine("                                                                                                                        ");
                            sb.AppendLine("  -- 2. 삭제시 청구라인_TRAN(매출) 삭제 -----------------------------------------------------                           ");
                            sb.AppendLine("  DELETE [@KIS_SO01402_HRD]                                                                                             ");
                            sb.AppendFormat("   WHERE U_BENTRY = {0} AND U_BTYPE = N'KIS_SO0150_HRD'                                           ", strDocEntry);
                            sb.AppendLine("                                                                                                                        ");
                            sb.AppendLine("  -- 3. 삭제시 청구라인_TRAN(청구수납) 삭제 -----------------------------------------------------                       ");
                            sb.AppendLine("  DELETE [@KIS_SO01403_HRD]                                                                                             ");
                            sb.AppendFormat("   WHERE U_BENTRY = {0} AND U_BTYPE = N'KIS_SO0150_HRD'                                           ", strDocEntry);
                            sb.AppendLine("                                                                                                                        ");
                            sb.AppendLine("  -- 4. 삭제시 청구라인_TRAN(매출) 삭제 -----------------------------------------------------                           ");
                            sb.AppendFormat("  UPDATE [@KIS_SO0150T_HRD] SET U_REJDTNO ='{0}',Status = 'C'  WHERE DocEntry = {1}    ", strJournalEntry, strDocEntry);
                        }
                        oRS.DoQuery(sb.ToString());

                        if (B1Connections.diCompany.InTransaction == true)
                        {
                            B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_Commit);
                        }
                    }

                    GetDataLoad(oForm, strDocEntry);
                    if (pJournalType == SO.SO_COMMON_HRD.JournalType.A01)
                        B1Connections.theAppl.StatusBar.SetText("매출전기 완료 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                    else
                        B1Connections.theAppl.StatusBar.SetText("매출전기 취소 완료 되었습니다. " + strError, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);
                }
                oJournalEntries = null;
            }

            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText("DI_JournalEntries " + ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                if (oRS != null) { Marshal.ReleaseComObject(oRS); } oRS = null;
                if (oJournalEntries != null)
                {
                    System.Runtime.InteropServices.Marshal.ReleaseComObject(oJournalEntries);
                    oJournalEntries = null;
                }

                if (B1Connections.diCompany.InTransaction == true)
                {
                    B1Connections.diCompany.EndTransaction(BoWfTransOpt.wf_RollBack);
                }
            }
            return boolReturn;
        }
Example #54
0
        /// <summary>
        /// 사원코드로 사원 정보를 조회한다.
        /// </summary>
        /// <param name="pQueryType"></param>
        /// <param name="pEmpNo"></param>
        /// <returns></returns>
        private string GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee pQueryType, string pEmpNo)
        {
            string rtnValue = string.Empty;
            StringBuilder sb = new StringBuilder();
            try
            {
                if (!string.IsNullOrEmpty(pEmpNo))
                {
                    oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset);

                    sb.AppendLine(" SELECT TOP 1                                        ");
                    sb.AppendLine("        T0.empID                                     ");
                    sb.AppendLine("      , T0.lastName                                  ");
                    sb.AppendLine("      , ISNULL (T1.Name, '') AS deptName             ");
                    sb.AppendLine("      , ISNULL (T2.name, '') AS PositionName         ");
                    sb.AppendLine("   FROM OHEM T0                                      ");
                    sb.AppendLine("        LEFT JOIN OUDP T1 ON T0.dept = T1.Code       ");
                    sb.AppendLine("        LEFT JOIN OHPS T2 ON T0.position = T2.posID  ");
                    sb.AppendFormat("  WHERE T0.U_EMPNO = '{0}'                 ", pEmpNo);

                    oRS.DoQuery(sb.ToString());
                    if (!oRS.EoF)
                    {
                        if (pQueryType == SO.SO_COMMON_HRD.QueryType_Employee.OHEM_Id)
                            rtnValue = oRS.Fields.Item("empID").Value.ToString();

                        else if (pQueryType == SO.SO_COMMON_HRD.QueryType_Employee.Emp_Name)
                            rtnValue = oRS.Fields.Item("lastName").Value.ToString();

                        else if (pQueryType == SO.SO_COMMON_HRD.QueryType_Employee.Dept_Name)
                            rtnValue = oRS.Fields.Item("deptName").Value.ToString();

                        else if (pQueryType == SO.SO_COMMON_HRD.QueryType_Employee.Postion_Name)
                            rtnValue = oRS.Fields.Item("PositionName").Value.ToString();
                        else
                            rtnValue = "";
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }

            return rtnValue;
        }
Example #55
0
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "SEQ,LineId,U_PAPERTP,U_CENTCD,U_CENTNM,U_BASEPAY,U_BEFOPAY,U_BEFOETC,U_PAYADJT,U_ETCADJT,U_SPOTPAY,U_SPOTETC,U_PAPEAMT,U_SAVEAMT,U_PRICE,STATUS";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,라인번호,지종,지국,지국명,기본유가,전월유가,전월기타,유가조정,기타조정,당월유가,당월기타,당월지대,지대보증금,단가,상태";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "SEQ,LineId,U_PAPERTP,U_CENTCD,U_CENTNM,U_BASEPAY,U_BEFOPAY,U_BEFOETC,U_SPOTPAY,U_SPOTETC,U_PAPEAMT,U_SAVEAMT,U_PRICE,STATUS";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "SEQ,LineId,U_BASEPAY,U_BEFOPAY,U_BEFOETC,U_SPOTPAY,U_SPOTETC,U_PAYADJT,U_ETCADJT,U_PAPEAMT,U_SAVEAMT,U_PRICE";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #56
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "U_YYYYMM,REQAMT,DEPO_DATE,DEPO_AMT,U_PMETHOD,U_STATUS";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "청구년월,청구금액,입금일자,입금금액,납부방법,상태";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "U_YYYYMM,REQAMT,DEPO_DATE,DEPO_AMT,U_PMETHOD,U_STATUS";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "REQAMT,DEPO_AMT";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
Example #57
0
        /// <summary>
        /// 그리드의 컬럼ID, 컬럼명등을 관리한다.
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="pPaneLevel"></param>
        /// <param name="pType"></param>
        /// <returns></returns>
        private string GetGridFieldInfo(SAPbouiCOM.Form oForm, SO.SO_COMMON_HRD.GridTitleType pType)
        {
            string rtnValue = string.Empty;
            try
            {
                switch (pType)
                {
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnUid:
                        rtnValue = "ROWSEQ,U_AREA,U_CENTCD,U_CENTNM,U_CARDCD,U_CARDNM,UNPAID,SUM_CREDIT,SUM_SAVE,READ_ADVANC,CENT_ADVANC,SUM_ADVAMT,SUM_DEBT,SUM_BALANCE";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.ColumnName:
                        rtnValue = "#,지역,지종,지국명,거래처,거래처명,미수금,채권계,보증금,독자선수금,지국선수금,선수금합계,채무계,미수잔액";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotVisible:
                        rtnValue = "";
                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.NotEditable:
                        rtnValue = "ROWSEQ,U_AREA,U_CENTCD,U_CENTNM,U_CARDCD,U_CARDNM,UNPAID,SUM_CREDIT,SUM_SAVE,READ_ADVANC,CENT_ADVANC,SUM_ADVAMT,SUM_DEBT,SUM_BALANCE";

                        break;
                    case SO.SO_COMMON_HRD.GridTitleType.AlignRight:
                        rtnValue = "ROWSEQ,UNPAID,SUM_CREDIT,SUM_SAVE,READ_ADVANC,CENT_ADVANC,SUM_ADVAMT,SUM_DEBT,SUM_BALANCE";
                        break;
                    default:
                        break;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }