# Automatic discount based on customer discount-level with set amounts per product

**URL:** <https://forum.sambapos.com/t/automatic-discount-based-on-customer-discount-level-with-set-amounts-per-product/3221>\
**Category:** V4 Question\
**Created:** [November 1, 2014, 6:45pm UTC](https://forum.sambapos.com/t/automatic-discount-based-on-customer-discount-level-with-set-amounts-per-product/3221 "2014-11-01T18:45:42Z")\
**Posts on this page:** 1\
**Showing post:** 58

<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:** [November 2, 2014, 4:56pm UTC](https://forum.sambapos.com/t/automatic-discount-based-on-customer-discount-level-with-set-amounts-per-product/3221/58 "2014-11-02T16:56:13Z")

</div>

I’ve created something working. It will give some idea about implementation details.

[SambaPOS49\_201411021844SQM.zip](https://forum.sambapos.com/uploads/default/original/3X/4/3/43644858958c44df40f10ac61a2610c7185f38f0.zip) (444.0 KB)

Use `Activate Ticket Discount` & `Deactivate Ticket Discount` actions to enable/disable (refresh) discounts.  
Use `Activate / Deactivate Order Discount` actions to enable disable discounts for specific orders.

Important Note: I’ve added `Hard Refresh Ticket` action to refresh order display but it won’t work for new created tickets and we shouldn’t refresh tickets as demonstrated there as it basically closes & reopens ticket. On next version it will automatically update order lines after entity selection so no refresh will be needed.

Note 2: Displaying custom fields issue is related with screen customization feature. I’ll try to improve that too. To display them right click on screen, enable customization and drag new fields from `Available Fields` section.

---

_[View the full topic](https://forum.sambapos.com/t/automatic-discount-based-on-customer-discount-level-with-set-amounts-per-product/3221)._
