public IActionResult FuelLedger(string station, PurchaseLedgerViewModel model, StationsService svc) { model.Stations = svc.GetStationIdntsIEnumerable(); if (!string.IsNullOrEmpty(station)) { model.Code = station; } return(View(model)); }
public IActionResult StocksLedger(string st, PurchaseLedgerViewModel model, StationsService service) { model.Stations = service.GetStationCodesIEnumerable(); if (!string.IsNullOrEmpty(st)) { model.Code = st; } else { model.Code = model.Stations.FirstOrDefault().Value; } DateTime date = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1); model.Station = service.GetStation(model.Code); model.Ledger = new PurchasesService().GetStocksPurchasesLedgers(model.Station, date, date.AddMonths(1).AddDays(-1), ""); return(View(model)); }