# Customer in constraint

**URL:** <https://forum.sambapos.com/t/customer-in-constraint/5957>\
**Category:** V4 Question\
**Created:** [June 22, 2015, 10:18am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957 "2015-06-22T10:18:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gioalba](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/g/7cd45c/32.png) [@gioalba](https://forum.sambapos.com/u/gioalba)\
**Post date:** [June 22, 2015, 10:18am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957/1 "2015-06-22T10:18:32Z")

</div>

I would like to know if it is possible to verify the presence of a customer , before printing an invoice ,  
I can use the customer in constraint?

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 22, 2015, 10:25am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957/2 "2015-06-22T10:25:36Z")

</div>

@gioalba it is really important for us to understand your use case. There might be 2 or 3 different answers for your question depending on how you’ll want to use it.

Quality questions can receive quality answers. Here is an example question. It is really very easy to understand what he is asking for.

> [@Loyality Card and Delivery ticket](http://forum.sambapos.com/t/loyality-card-and-delivery-ticket/5784):
>
> sorry my english (google translate). I use SambaCard and Tracking Promotions by Points Tutorial - its work great. but I need to extend the functionality loyalty card (called “HeroClub”). I have many customers to order the delivery by phone. and that they could get these orders points, I got the idea. in ticket delivery added below the barcode for which you can add points to these ticket later. it reminds [Gift Certificate Sales & Redemption][1], but much simplified. when press print bill …

---

<div class="post-metadata">

**Author:** ![gioalba](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/g/7cd45c/32.png) [@gioalba](https://forum.sambapos.com/u/gioalba)\
**Post date:** [June 22, 2015, 10:47am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957/3 "2015-06-22T10:47:45Z")

</div>

thanks @emre. When I print an invoice i must have selected a customer .  
I would sambapos stop print if i did not select any clients .  
I 'm trying so  
 ![](https://forum.sambapos.com/uploads/default/original/2X/8/8f00478b9ef5da283f70c198f9bce4f8fdba21d7.png)  
but I think that is not correct the constraint in the rules  
thanks

---

<div class="post-metadata">

**Author:** ![emre](https://forum.sambapos.com/user_avatar/forum.sambapos.com/emre/32/39073_2.png) [@emre](https://forum.sambapos.com/u/emre)\
**Post date:** [June 22, 2015, 10:56am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957/4 "2015-06-22T10:56:48Z")

</div>

Seems fine but casing for `phone` custom field might be incorrect.

---

<div class="post-metadata">

**Author:** ![gioalba](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/g/7cd45c/32.png) [@gioalba](https://forum.sambapos.com/u/gioalba)\
**Post date:** [June 22, 2015, 11:05am UTC](https://forum.sambapos.com/t/customer-in-constraint/5957/5 "2015-06-22T11:05:16Z")

</div>

{ENTITY NAME:Customer} Is Not Null, It seems to work
