Example #1
0
 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);
 }
Example #2
0
 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);
     }
 }
Example #3
0
 public ClientResponse(string cashierid, List <Charge> charges)
 {
     ResponseCashierData = CashierData.Get(cashierid);
     Charges             = charges;
     ReceiptPayments     = ReceiptPayment.Get(cashierid);
 }