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; } }
public string GetVoucherNo(string branchCode) { try { var voucherNo = new StockExcessHelper().GenerateStockENumber(45, branchCode); return(voucherNo); } catch { throw; } }