From 7857ca5c733d8516ab636a5be4f7f6b61f8cf28e Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Sun, 4 Nov 2012 00:09:04 +0100 Subject: support € values with . notation in web forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/web.vala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/web.vala') diff --git a/src/web.vala b/src/web.vala index ae6cbca..6722f17 100644 --- a/src/web.vala +++ b/src/web.vala @@ -472,8 +472,8 @@ public class WebServer { if(query != null && query.contains("name") && query.contains("id") && query.contains("memberprice") && query.contains("guestprice")) { var name = query["name"]; var ean = uint64.parse(query["id"]); - Price memberprice = int.parse(query["memberprice"]); - Price guestprice = int.parse(query["guestprice"]); + Price memberprice = Price.parse(query["memberprice"]); + Price guestprice = Price.parse(query["guestprice"]); if(ean > 0 && memberprice > 0 && guestprice > 0 && db.new_product(ean, name, memberprice, guestprice)) { template.replace("NAME", name); @@ -516,7 +516,7 @@ public class WebServer { if(query != null && query.contains("amount") && query.contains("price")) { int amount = int.parse(query["amount"]); - Price price = int.parse(query["price"]); + Price price = Price.parse(query["price"]); if(amount >= 1 && price >= 1) { if(db.restock(session.user, id, amount, price)) { -- cgit v1.2.3