public ClientResponse(string cashierid) { ResponseCashierData = CashierData.Get(cashierid); if (ResponseCashierData.CashierId != cashierid) { Errors.Add($"CashierId: {cashierid} was not found."); return; } Charges = Charge.GetChargesByCashierId(cashierid); ReceiptPayments = ReceiptPayment.Get(cashierid); }
public ClientResponse(string cashierid, UserAccess ua, bool isVoid = false) { ResponseCashierData = CashierData.Get(cashierid); if (ResponseCashierData.CashierId != cashierid) { Errors.Add($"CashierId: {cashierid} was not found."); return; } Charges = Charge.GetChargesByCashierId(cashierid); ReceiptPayments = ReceiptPayment.Get(cashierid); if (!isVoid && (ua.void_manager_access || (ua.cashier_access && !ReceiptPayments.Any(p => p.IsFinalized == true)))) { CanVoid = false; } else { ValidateVoid(ua, isVoid); } }
public ClientResponse(string cashierid, List <Charge> charges) { ResponseCashierData = CashierData.Get(cashierid); Charges = charges; ReceiptPayments = ReceiptPayment.Get(cashierid); }