public double getDjNoTax(bool hysy) { if (!hysy && this.HSJBZ) { return(Finacial.Div(this.DJ, 1.0 + this.SLV, 15)); } return(this.DJ); }
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); } }
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); } }
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); }
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; } } }