Exemplo n.º 1
0
        public TblStockshortDetails GetOpStockShortDetailsection(string productCode, string branchCode)
        {
            try
            {
                var _product = Geproduct(productCode);

                using Repository <TblProduct> repo = new Repository <TblProduct>();
                var date = DateTime.Now.ToString("dd/MM/yyyy").Replace('-', '/');
                //var date = DateTime.Now.ToString();
                var issueno = new CommonHelper().GenerateNumber(44, branchCode);
                var operatorStockIssuesDetail = new TblStockshortDetails
                {
                    BatchNo = 0,
                    //date + "-" + issueno + "-" + _product.ProductCode;
                    Qty         = 0,
                    TotalAmount = 0,
                    Rate        = GetProductRate(branchCode, productCode),
                    //operatorStockIssuesDetail.AvailStock = GetProductQty(branchCode, productCode);
                    HsnNo       = Convert.ToDecimal(_product.HsnNo ?? 0),
                    ProductCode = _product.ProductCode,
                    ProductName = _product.ProductName,
                    UnitName    = _product.UnitName
                };

                return(operatorStockIssuesDetail);
            }
            catch { throw; }
        }
Exemplo n.º 2
0
        public TblStockshortDetails GetOpStockShortDetailsection(string productCode, string branchCode)
        {
            try
            {
                var _product = Getproduct(productCode);

                using (Repository <TblProduct> repo = new Repository <TblProduct>())
                {
                    var date = DateTime.Now.ToString("dd/MM/yyyy").Replace('-', '/');
                    //var date = DateTime.Now.ToString();
                    var issueno = new StockExcessHelper().GenerateStockENumber(45, branchCode);
                    var operatorStockIssuesDetail = new TblStockshortDetails();
                    operatorStockIssuesDetail.BatchNo = 0;
                    //date + "-" + issueno + "-" + _product.ProductCode;
                    operatorStockIssuesDetail.Qty         = 0;
                    operatorStockIssuesDetail.TotalAmount = 0;
                    operatorStockIssuesDetail.Rate        = GetProductRate(branchCode, productCode);
                    //operatorStockIssuesDetail.AvailStock = GetProductQty(branchCode, productCode);
                    operatorStockIssuesDetail.HsnNo       = Convert.ToDecimal(_product.HsnNo ?? 0);
                    operatorStockIssuesDetail.ProductCode = _product.ProductCode;
                    operatorStockIssuesDetail.ProductName = _product.ProductName;
                    operatorStockIssuesDetail.UnitName    = _product.UnitName;

                    return(operatorStockIssuesDetail);
                }
            }
            catch { throw; }
        }