Permalink
Browse files

fix bug when updating price

  • Loading branch information...
1 parent e893bc1 commit b80e368d7ae6a104b3352821bcc04b1ac97c2fbc @esmil esmil committed Jan 13, 2012
Showing with 7 additions and 9 deletions.
  1. +7 −9 drinkomatic.lua
View
@@ -264,16 +264,14 @@ PROD_EDIT_NAME = {
barcode = 'PROD_EDIT_NAME',
- keyboard = {
- [''] = function(product)
- return 'PROD_EDIT_PRICE', product
- end,
- function(name, product) --default
+ keyboard = function(name, product)
+ if name ~= '' then
product.name = name
- print("Type new price (or press enter to keep %.2f DKK):", product.price)
- return 'PROD_EDIT_PRICE', product
- end,
- },
+ end
+
+ print("Type new price (or press enter to keep %.2f DKK):", product.price)
+ return 'PROD_EDIT_PRICE', product
+ end,
}
PROD_EDIT_PRICE = {

0 comments on commit b80e368

Please sign in to comment.