예제 #1
0
        void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPurchaseOrderListRepository purchaseRepository = new PurchaseOrderListRepository();

            oData = purchaseRepository.GetOptionSettings();
            if (oData != null)
            {
                CurrencyName = oData.CurrencyCode;
                DateFormat   = oData.DateFormat;
            }
            TaxModel objDefaultTax = new TaxModel();

            objDefaultTax = purchaseRepository.GetDefaultTaxes().FirstOrDefault();
        }
예제 #2
0
        void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPurchaseOrderListRepository purchaseRepository = new PurchaseOrderListRepository();

            oData = purchaseRepository.GetOptionSettings();
            if (oData != null)
            {
                CurrencyName = oData.CurrencyCode;
                DateFormat   = oData.DateFormat;
                if (!string.IsNullOrWhiteSpace(oData.DefCashBankAcc))
                {
                    this.SelectedCashBankAcntID = Convert.ToInt32(oData.DefCashBankAcc);
                    CheckAccountDetails(null);
                }
            }
        }
예제 #3
0
        void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPurchaseOrderListRepository purchaseRepository = new PurchaseOrderListRepository();

            oData = purchaseRepository.GetOptionSettings();
            if (oData != null)
            {
                CurrencyName = oData.CurrencyCode;
                DateFormat   = oData.DateFormat;
                if (!string.IsNullOrWhiteSpace(oData.DefCashBankAcc))
                {
                    this.SelectedAccountID = Convert.ToInt32(oData.DefCashBankAcc);
                }
            }
            TaxModel objDefaultTax = new TaxModel();

            objDefaultTax = purchaseRepository.GetDefaultTaxes().FirstOrDefault();
        }
예제 #4
0
        void GetOptionsandTaxValues()
        {
            OptionsEntity oData = new OptionsEntity();
            IPurchaseOrderListRepository purchaseRepository = new PurchaseOrderListRepository();

            oData = purchaseRepository.GetOptionSettings();
            if (oData != null)
            {
                this.CurrencyName   = oData.CurrencyCode;   //there is no currency name field in database
                this.CurrencyCode   = oData.CurrencyCode;
                this.CurrencyFormat = oData.NumberFormat;
                this.DateFormat     = oData.DateFormat;
                this.DecimalPlaces  = oData.DecimalPlaces;
                if (oData.ShowAmountIncGST == true)
                {
                    this.IncludingGSTTrue  = true;
                    this.IncludingGSTFalse = false;
                    //int decimalpoints = Convert.ToInt32(DecimalPlaces);
                    //foreach (var item in this.PurchaseOrderList)
                    //{
                    //    item.OrderAmount = Math.Round(Convert.ToDouble(item.OrderAmount), decimalpoints).ToString();
                    //}
                    //this.PurchaseOrderList = this.PurchaseOrderList.Where(x => x.ExcIncGST == true).ToList();
                }
                else
                {
                    this.IncludingGSTTrue  = false;
                    this.IncludingGSTFalse = true;
                    int decimalpoints = Convert.ToInt32(DecimalPlaces);
                    //foreach (var item in this.PurchaseOrderList)
                    //{
                    //    //item.OrderAmount = item.OrderAmountExcGST;
                    //    //item.OrderAmount = Math.Round(Convert.ToDouble(item.OrderAmountExcGST), decimalpoints).ToString();
                    //    item.OrderAmount = Math.Round(Convert.ToDouble(item.OrderAmount), decimalpoints).ToString();
                    //}
                    if (this.PurchaseOrderList != null)
                    {
                        this.PurchaseOrderList = this.PurchaseOrderList.Where(x => x.ExcIncGST == false).ToList();
                    }
                }
            }
            else
            {
                this.CurrencyName   = "USD";
                this.CurrencyCode   = "USD";
                this.CurrencyFormat = "en-US";
                this.DateFormat     = "dd/MM/yyyy";
            }



            TaxModel objDefaultTax = new TaxModel();

            objDefaultTax = purchaseRepository.GetDefaultTaxes().FirstOrDefault();
            if (objDefaultTax != null)
            {
                this.TaxName = objDefaultTax.TaxName;
                //this.TaxName = objDefaultTax.TaxRate;
            }
            else
            {
                this.TaxName = "GST Free";
                //this.TaxRate = 0;
            }
        }