コード例 #1
0
ファイル: Goods.cs プロジェクト: SoL-Alucard-Git/HX-Base
 public double getDjNoTax(bool hysy)
 {
     if (!hysy && this.HSJBZ)
     {
         return(Finacial.Div(this.DJ, 1.0 + this.SLV, 15));
     }
     return(this.DJ);
 }
コード例 #2
0
ファイル: Goods.cs プロジェクト: SoL-Alucard-Git/HX-Base
        private double popopo(string strvalue, int digits = 0)
        {
            double result = 0.0;

            if (double.TryParse(strvalue, out result))
            {
                if (digits == 0)
                {
                    return(result);
                }
                return(result = Finacial.GetRound(result, digits));
            }
            return(0.0);
        }
コード例 #3
0
ファイル: Goods.cs プロジェクト: SoL-Alucard-Git/HX-Base
 public void setDj(double dDj, bool hsjbz)
 {
     if (hsjbz)
     {
         double num  = dDj;
         double num2 = num * this.SL;
         this.HSJBZ = true;
         this.DJ    = num;
         this.JE    = Finacial.Div(num2, 1.0 + this.SLV, 2);
         this.SE    = Finacial.GetRound((double)(num2 - this.JE), 2);
     }
     else
     {
         this.HSJBZ = false;
         this.DJ    = dDj;
         this.JE    = Finacial.GetRound((double)(dDj * this.SL), 2);
         this.SE    = Finacial.GetRound((double)(this.JE * this.SLV), 2);
     }
 }
コード例 #4
0
        public void setDj(int mxID, double dDj)
        {
            Goods good = base.GetGood(mxID);

            if (base.ContainTax)
            {
                double num  = dDj;
                double num2 = num * good.SL;
                good.HSJBZ = true;
                good.DJ    = num;
                good.JE    = Finacial.Div(num2, 1.0 + good.SLV, 2);
                good.SE    = SaleBillCtrl.GetRound((double)(num2 - good.JE), 2);
            }
            else
            {
                good.HSJBZ = false;
                good.DJ    = dDj;
                good.JE    = SaleBillCtrl.GetRound((double)(dDj * good.SL), 2);
                good.SE    = SaleBillCtrl.GetRound((double)(good.JE * good.SLV), 2);
            }
        }
コード例 #5
0
 private void textBoxZKJE_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (this.textBoxZKJE.Focused)
         {
             if (this.textBoxZKJE.Text.Trim().Length > 0)
             {
                 double result = 0.0;
                 if (double.TryParse(this.textBoxZKJE.Text.Trim(), out result))
                 {
                     result = SaleBillCtrl.GetRound(result, 2);
                     double num3 = 0.0;
                     double num4 = 0.0;
                     double.TryParse(this.labelSPJE.Text, out num3);
                     num4 = (num3 != 0.0) ? (result / num3) : result;
                     num4 = Finacial.Mul(num4, 100.0, 3);
                     double num5 = 0.0;
                     double.TryParse(this.labelSPJE.Text.Trim(), out num5);
                     if ((result <= num5) && (((num4 >= 0.001) && (num4 <= 100.0)) || ((result >= 0.01) && (num4 == 0.0))))
                     {
                         this.textBoxZKL.Text = num4.ToString("0.000");
                         this.btnOK.Enabled   = true;
                         return;
                     }
                 }
                 else
                 {
                     this.textBoxZKJE.Text = "0.00";
                 }
             }
             this.textBoxZKL.Text = "0.000";
             this.btnOK.Enabled   = false;
         }
     }
     catch (Exception exception)
     {
         HandleException.HandleError(exception);
     }
 }
コード例 #6
0
ファイル: Goods.cs プロジェクト: SoL-Alucard-Git/HX-Base
        public double getDj(bool Flag_ContainTax)
        {
            double num;

            if (Flag_ContainTax)
            {
                if (this.HSJBZ)
                {
                    return(this.DJ);
                }
                num = Finacial.Mul(this.DJ, 1.0 + this.SLV, 15);
                if (Math.Abs((double)(this.SLV - 0.015)) < 1E-05)
                {
                    num = (this.DJ * 70.0) / 69.0;
                }
                if (!(this.KCE == 0.0))
                {
                    num = Finacial.Div(this.JE + this.SE, this.SL, 15);
                }
                return(num);
            }
            if (this.HSJBZ)
            {
                num = Finacial.Div(this.DJ, 1.0 + this.SLV, 15);
                if (Math.Abs((double)(this.SLV - 0.015)) < 1E-05)
                {
                    num = Finacial.Div(this.DJ * 69.0, 70.0, 15);
                }
                if (!(this.KCE == 0.0))
                {
                    num = Finacial.Div(this.JE, this.SL, 15);
                }
                return(num);
            }
            return(this.DJ);
        }
コード例 #7
0
        private void textBoxZKHS_TextChanged(object sender, EventArgs e)
        {
            int    result      = 0;
            double num2        = 0.0;
            double zkje        = 0.0;
            double totalAmount = 0.0;

            if (!int.TryParse(this.textBoxZKHS.Text, out result))
            {
                this.textBoxZKHS.Text = "1";
            }
            else
            {
                if ((this.textBoxZKL.Text.Trim().Length > 0) && double.TryParse(this.textBoxZKL.Text.Trim(), out num2))
                {
                    num2 = Finacial.Div(num2, 100.0, 15);
                    if (num2 > 1.0)
                    {
                        this.btnOK.Enabled = false;
                    }
                    else
                    {
                        this.btnOK.Enabled = true;
                    }
                }
                this.saleLogic.DisCountChangeRowNO(this.bill, this.selectIndex, ref result, num2, ref totalAmount, ref zkje);
                zkje = Finacial.GetRound(zkje, 2);
                this.textBoxZKHS.Text = result.ToString();
                this.labelSPJE.Text   = totalAmount.ToString();
                this.textBoxZKJE.Text = zkje.ToString("0.00");
                if (zkje == 0.0)
                {
                    this.btnOK.Enabled = false;
                }
            }
        }
コード例 #8
0
ファイル: Goods.cs プロジェクト: SoL-Alucard-Git/HX-Base
 public void setSl(double dSl, bool hsjbz)
 {
     this.SL = dSl;
     this.JE = Finacial.GetRound((double)(this.getDjNoTax(false) * this.SL), 2);
     this.SE = Finacial.GetRound((double)(this.JE * this.SLV), 2);
 }