public ShiftReportPopup(GetShiftViewModel vM) { InitializeComponent(); BindingContext = _vM = vM; decimal expectedcashamount = _vM.StartingCash + _vM.CashPayment + _vM.Paidin - _vM.Refunds - _vM.Paidout; decimal netsell = _vM.CashPayment + _vM.QRCode + _vM.DebitCard + _vM.CreditCard; decimal grosssales = netsell + _vM.Refunds + _vM.Discount; Shiftopened.RightTexLable = vM.CreateDateTime.ToLocalTime().ToString("dd MMM yyyy HH:mm:ss"); Startingcash.RightTexLable = vM.StartingCash.ToString("#,0.00"); Cashpayment.RightTexLable = vM.CashPayment.ToString("#,0.00"); Cashrefunds.RightTexLable = vM.CashRefunds.ToString("#,0.00"); Paidin.RightTexLable = vM.Paidin.ToString("#,0.00"); Paidout.RightTexLable = vM.Paidout.ToString("#,0.00"); Expectedcashamount.RightTexLable = expectedcashamount.ToString("#,0.00"); Grosssales.RightTexLable = grosssales.ToString("#,0.00"); Refunds.RightTexLable = vM.Refunds.ToString("#,0.00"); Discount.RightTexLable = vM.Discount.ToString("#,0.00"); }
public IActionResult GetShiftDetail(int shiftId, int userId) { if (shiftId == null) { return(BadRequest()); } var audience = User.Claims.FirstOrDefault(c => c.Type == "aud").Value; var user = User.Claims.FirstOrDefault(c => c.Type == "user").Value; string storeEmail = audience; ShiftdetailDto shiftdetail = _shiftService.GetShiftDetailByShiftId(storeEmail, userId, shiftId); if (shiftdetail == null) { return(NoContent()); } GetShiftViewModel shiftViewModel = _mapper.Map <GetShiftViewModel>(shiftdetail); return(Ok(shiftViewModel)); }
private async void itemSectecHandle(GetShiftViewModel viewModel) { //Application.Current.MainPage.DisplayAlert("", "Error", "Ok"); await PopupNavigation.Instance.PushAsync(new Views.Popup.ShiftReportPopup(viewModel)); }