ICustomer
Definition
- Namespace
- Resto.Front.PrintTemplates.Cheques.Razor.TemplateModels
- Available since
- 3.5
A guest card from the shared customer directory: name and surname, card number, contacts and the "high risk" flag.
Detailed description
One and the same directory record — also known as "delivery customers" and "banquet and reservation guests" — is visible both in the back office and at the till.
A guest reaches the print model four ways: Model.Delivery.Customer, Model.Reserve.Customer, Model.Customer on a VAT invoice, and the Model.Order.Customers collection on an ordinary order.
An object existing does not mean it is filled. On a delivery and on a reservation the guest is declared non-null: for an anonymous order — a walk-in pickup with no card, say — the object is still created, but only Name is filled, the other fields are empty, and Phones, Addresses and Emails are empty collections. A Customer != null check proves nothing here; check the fields you are about to print.
Contacts are always collections, even when there is a single phone: take the first element explicitly and expect emptiness.
Do not confuse this with IUser: IUser is a staff account (waiter, cashier, courier), ICustomer is a guest profile. They share no fields — even the name is arranged differently.
Available in documents
| Access path | Document types |
|---|---|
Model.Order.Customers[] | Guest bill, Sales receipt, Fiscal receipt appendix, Correction fiscal receipt appendix, Delivery label for regular order, iikoCard receipt, Prepayment receipt, Payment/refund receipt, Service ticket, VAT invoice |
Model.Delivery.Customer | Delivery invoice, Delivery label |
Model.Order.BaseOrder.Customers[] | Cooking complete ticket, Cooking complete label |
Model.Banquet.Customer | Banquet preliminary order ticket |
Model.Customer | VAT invoice |
Model.Deliveries[].Customer | Courier's route list |
Model.ParentOrder.Customers[] | Payment/refund receipt |
Model.Reserve.Customer | Table reserved sign |
Properties
| Name | Type | Description |
|---|---|---|
| Addresses | IEnumerable<IAddress> | Addresses |
| BlackListReason | string | Reason for assigning "high-risk" status |
| CardDiscountType | IDiscountType | Customer card discount type |
| CardNumber | string | Card number |
| Comment | string | Comment |
| Emails | IEnumerable<IEmail> | Email addresses |
| InBlackList | bool | "High-risk" status client |
| Name | string | Name |
| Phones | IEnumerable<IPhone> | Phone numbers |
| Surname | string | Last name |