# Adding Price Definitions crashes SambaPOS

**URL:** <https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518>\
**Category:** V5 Issue\
**Created:** [July 7, 2020, 1:58pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518 "2020-07-07T13:58:19Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigorila](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rodrigorila/32/24511_2.png) [@rodrigorila](https://forum.sambapos.com/u/rodrigorila)\
**Post date:** [July 7, 2020, 1:58pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/1 "2020-07-07T13:58:19Z")

</div>

I have been experiencing some errors when adding or editing Price Definitions under Products. It seems to me that it always fails when using names with 11 or more characters. I have repeated the test with different databases and it always crashes when the name is eleven or more characters long

 ![imagen](https://forum.sambapos.com/uploads/default/original/3X/c/6/c6d7b11014a0a3a0ebe33db1625675487b2525de.png)

Is anyone else getting these crashes?

---

<div class="post-metadata">

**Author:** ![Posflow](https://forum.sambapos.com/user_avatar/forum.sambapos.com/posflow/32/63001_2.png) [@Posflow](https://forum.sambapos.com/u/Posflow)\
**Post date:** [July 7, 2020, 2:00pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/2 "2020-07-07T14:00:53Z")

</div>

If I remember correctly, they made a limit to how many characters you can use in Price definitions. I think it was something to do with formatting of the order line.

---

<div class="post-metadata">

**Author:** ![rodrigorila](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rodrigorila/32/24511_2.png) [@rodrigorila](https://forum.sambapos.com/u/rodrigorila)\
**Post date:** [July 7, 2020, 2:05pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/3 "2020-07-07T14:05:33Z")

</div>

Sounds fair but the crashing is unpleasant I think 🤔

---

<div class="post-metadata">

**Author:** ![Posflow](https://forum.sambapos.com/user_avatar/forum.sambapos.com/posflow/32/63001_2.png) [@Posflow](https://forum.sambapos.com/u/Posflow)\
**Post date:** [July 7, 2020, 2:08pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/4 "2020-07-07T14:08:54Z")

</div>

Yes, I think it cant validate last change because it cant have over 10 characters. But yes, maybe a popup or warning not to do it is fine lol

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [July 7, 2020, 2:44pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/5 "2020-07-07T14:44:04Z")

</div>

Sometimes a crash is good. It lets you know you did something you shouldn’t have done and a crash saves you from really messing it all up. But I do agree something to say there is a limit would be good.

---

<div class="post-metadata">

**Author:** ![rodrigorila](https://forum.sambapos.com/user_avatar/forum.sambapos.com/rodrigorila/32/24511_2.png) [@rodrigorila](https://forum.sambapos.com/u/rodrigorila)\
**Post date:** [July 7, 2020, 5:19pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/6 "2020-07-07T17:19:52Z")

</div>

> [@Jesse](#):
>
> Sometimes a crash is good…

I don’t agree, sorry. A message is better. A crash is scary and may result in data loss!

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [July 7, 2020, 5:50pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/7 "2020-07-07T17:50:42Z")

</div>

Usually most crashes preserve data and prevent further loss. But yes a message for this specific instance is better.

---

<div class="post-metadata">

**Author:** ![nickexmoor1](https://forum.sambapos.com/letter_avatar_proxy/v4/letter/n/d26b3c/32.png) [@nickexmoor1](https://forum.sambapos.com/u/nickexmoor1)\
**Post date:** [July 10, 2020, 4:16pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/8 "2020-07-10T16:16:22Z")

</div>

How the hell can a crash be good…  
Poor programming practice

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [July 10, 2020, 6:17pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/9 "2020-07-10T18:17:19Z")

</div>

It’s not a poor programming practice it’s a very common practice to control that. It prevents unrepairable damage from happening. I’m not saying we should allow crashes all the time. I think you misunderstood me. Because of the level of access we give you with SambaPOS and automation it would be impossible to predixt everything our users are going to attempt to do with our system. So allowing a crash when something is not right and we didn’t anticipate it is a good thing. We can solve those as they happen when a user finds a new way to do something wrong.

---

<div class="post-metadata">

**Author:** ![Jesse](https://forum.sambapos.com/user_avatar/forum.sambapos.com/jesse/32/61493_2.png) [@Jesse](https://forum.sambapos.com/u/Jesse)\
**Post date:** [July 10, 2020, 6:20pm UTC](https://forum.sambapos.com/t/adding-price-definitions-crashes-sambapos/22518/10 "2020-07-10T18:20:06Z")

</div>

But yes in systems that don’t allow you those customization freedoms a crash is bad.
