Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<KupacKalkulacijaVM> kupci = db.IzlazStavke.Where(x => x.ProizvodID == id && x.Izlazi.NarudzbaID!=null).Select(x => new KupacKalkulacijaVM {
- KupacID = x.Izlazi.Narudzbe.KupacID,
- Ime = x.Izlazi.Narudzbe.Kupci.Ime,
- StavkaID = x.IzlazStavkaID,
- NarudzbaID = (int)x.Izlazi.NarudzbaID,
- Iznos = (x.Kolicina * x.Cijena) * (x.Popust.HasValue ?((100 - x.Popust.Value) / 100) : 1)
- }).ToList();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement