{"action":"created","issue":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/1694","repository_url":"https://api.github.com/repos/opensourcepos/opensourcepos","labels_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/1694/labels{/name}","comments_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/1694/comments","events_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/1694/events","html_url":"https://github.com/opensourcepos/opensourcepos/issues/1694","id":267939779,"number":1694,"title":"Gift Cards with Decimals and localization using comma separator instead of period","user":{"login":"objecttothis","id":17935339,"avatar_url":"https://avatars1.githubusercontent.com/u/17935339?v=4","gravatar_id":"","url":"https://api.github.com/users/objecttothis","html_url":"https://github.com/objecttothis","followers_url":"https://api.github.com/users/objecttothis/followers","following_url":"https://api.github.com/users/objecttothis/following{/other_user}","gists_url":"https://api.github.com/users/objecttothis/gists{/gist_id}","starred_url":"https://api.github.com/users/objecttothis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objecttothis/subscriptions","organizations_url":"https://api.github.com/users/objecttothis/orgs","repos_url":"https://api.github.com/users/objecttothis/repos","events_url":"https://api.github.com/users/objecttothis/events{/privacy}","received_events_url":"https://api.github.com/users/objecttothis/received_events","type":"User","site_admin":false},"labels":[{"id":67840973,"url":"https://api.github.com/repos/opensourcepos/opensourcepos/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"objecttothis","id":17935339,"avatar_url":"https://avatars1.githubusercontent.com/u/17935339?v=4","gravatar_id":"","url":"https://api.github.com/users/objecttothis","html_url":"https://github.com/objecttothis","followers_url":"https://api.github.com/users/objecttothis/followers","following_url":"https://api.github.com/users/objecttothis/following{/other_user}","gists_url":"https://api.github.com/users/objecttothis/gists{/gist_id}","starred_url":"https://api.github.com/users/objecttothis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objecttothis/subscriptions","organizations_url":"https://api.github.com/users/objecttothis/orgs","repos_url":"https://api.github.com/users/objecttothis/repos","events_url":"https://api.github.com/users/objecttothis/events{/privacy}","received_events_url":"https://api.github.com/users/objecttothis/received_events","type":"User","site_admin":false},"assignees":[{"login":"objecttothis","id":17935339,"avatar_url":"https://avatars1.githubusercontent.com/u/17935339?v=4","gravatar_id":"","url":"https://api.github.com/users/objecttothis","html_url":"https://github.com/objecttothis","followers_url":"https://api.github.com/users/objecttothis/followers","following_url":"https://api.github.com/users/objecttothis/following{/other_user}","gists_url":"https://api.github.com/users/objecttothis/gists{/gist_id}","starred_url":"https://api.github.com/users/objecttothis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objecttothis/subscriptions","organizations_url":"https://api.github.com/users/objecttothis/orgs","repos_url":"https://api.github.com/users/objecttothis/repos","events_url":"https://api.github.com/users/objecttothis/events{/privacy}","received_events_url":"https://api.github.com/users/objecttothis/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/milestones/11","html_url":"https://github.com/opensourcepos/opensourcepos/milestone/11","labels_url":"https://api.github.com/repos/opensourcepos/opensourcepos/milestones/11/labels","id":2159680,"number":11,"title":"3.2.0","description":"","creator":{"login":"daN4cat","id":636048,"avatar_url":"https://avatars1.githubusercontent.com/u/636048?v=4","gravatar_id":"","url":"https://api.github.com/users/daN4cat","html_url":"https://github.com/daN4cat","followers_url":"https://api.github.com/users/daN4cat/followers","following_url":"https://api.github.com/users/daN4cat/following{/other_user}","gists_url":"https://api.github.com/users/daN4cat/gists{/gist_id}","starred_url":"https://api.github.com/users/daN4cat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daN4cat/subscriptions","organizations_url":"https://api.github.com/users/daN4cat/orgs","repos_url":"https://api.github.com/users/daN4cat/repos","events_url":"https://api.github.com/users/daN4cat/events{/privacy}","received_events_url":"https://api.github.com/users/daN4cat/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":104,"state":"open","created_at":"2016-11-27T23:21:47Z","updated_at":"2018-03-10T13:20:29Z","due_on":"2018-03-31T07:00:00Z","closed_at":null},"comments":47,"created_at":"2017-10-24T08:23:52Z","updated_at":"2018-03-12T09:33:57Z","closed_at":null,"author_association":"COLLABORATOR","body":"### Issue / Question / Bug\r\n\r\nBefore submitting an issue please make sure you tick (add an x between the square brackets with no spaces) the following check boxes:\r\n\r\n- [x] I'm reporting an issue of an unmodified OSPOS installation\r\n- [x] I checked open and closed issues database and no similar issue was already discussed (please make sure you searched!)\r\n- [x] I read the README, WHATS_NEW and UPGRADE\r\n- [x] I read the FAQ (https://github.com/jekkos/opensourcepos#faq) for any known install and/or upgrade gotchas (in specific PHP has php-gd, php-intl, sockets and etc. installed)\r\n- [x] I read the wiki\r\n- [x] I ran any database upgrade scripts (e.g. database/2.4_to_3.0.sql), and migrating function\r\n- [x] I'm aware the latest master could be a development version and therefore not stable\r\n- [x] I know the version of OSPOS and git commit hash (check the footer of your OSPOS), the name and version of OS, Web server, PHP and MySQL and will add them to my issue report\r\n\r\n### Installation information\r\n\r\n- OSPOS version is: 3.2.0\r\n- OSPOS git commit hash is: 4f5ad57\r\n- PHP version is:   (e.g. 5.5, 5.6, 7.0, 7.1) 5.6.32\r\n- MySQL or MariaDB version is:   (e.g. MySQL 5.5, MySQL 5.6, MySQL 5.7, MariaDB 10.0, MariaDB 10.1, MariaDB 10.2) MySQL 5.7\r\n- OS and version is:   (e.g. CentOS 6.9, Ubuntu 16.4, Windows 10) FreeBSD 11.0\r\n- WebServer is:   (e.g. Apache 2.2, Apache 2.4, Nginx 1.12, Nginx 1.13) Apache 2.4\r\n- (If applicable) Installation package for the LAMP/LEMP stack is:   (e.g. WAMP, XAMPP)\r\n\r\n### Expected behaviour\r\nWhen using a localization such as az-AZ or ru that uses a x.xxx,yy number format instead of x,xxx.yy changing or adding a gift card involving decimals would result in an updated amount or an error message indicating the format is incorrect or would properly update the database.\r\n\r\n### Actual behaviour\r\nThe data is saved in the database as 0.\r\n\r\n### Steps to reproduce the issue\r\nIf x.xxx,yy is entered for the gift card amount when using a locale that uses that format an error appears \"Gift Card Value must be a number.\" \r\n![error with correct formatting](https://user-images.githubusercontent.com/17935339/31931453-5a77206c-b8b4-11e7-93e3-ba7cd7777148.JPG)\r\n\r\nIf x,xxx.yy format is used it sends the message \"You have successfully updated Gift Card ...\", however it then shows a zero balance of the gift card rather than the number previously entered.\r\n![result of incorrect format](https://user-images.githubusercontent.com/17935339/31931533-8dd5fe1a-b8b4-11e7-9a56-22785a520d85.JPG)\r\n\r\nThere are no error logs generated.  I turned on database logs and here is the difference in the two update scripts.\r\n\r\nWhen entering 231 with no period or comma\r\n`UPDATE 'ospos_giftcards' SET 'record_time' = '2017-10-24 11:53:56', 'giftcard_number' = '0514230362', 'value' = 231, 'person_id' = '26'`\r\n`WHERE 'giftcard_id' = '654354382'`\r\n`Execution Time:0.0484459400177`\r\n\r\nSo, you can see there is no problem and the database gets updated properly.\r\n\r\nWhen entering 231.30 (231,30 produces an error)\r\n`UPDATE 'ospos_giftcards' SET 'record_time' = '2017-10-24 11:54:05', 'giftcard_number' = '0514230362', 'value' = 0, 'person_id' = '26'`\r\n`WHERE 'giftcard_id' = '654354382'`\r\n`Execution Time:0.029716014862061`\r\n\r\nYou can see the database query is updating it to 0 which means this is a code problem rather than a database problem.  There are two possible appropriate behaviors here.  The strict behavior should be to require the exact same locale format in the gift card entry field that the locale is set to, then update the database accordingly or error when the format is incorrect.  The permissive behavior would be to allow formatting in x,xxx.yy or x.xxx,yy format and update the database accordingly or error if not one of those formats.\r\n\r\nThe quickest fix on this would be to update our error checking code to allow the locale format and not expect x,xxx.yy every time."},"comment":{"url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/comments/372245863","html_url":"https://github.com/opensourcepos/opensourcepos/issues/1694#issuecomment-372245863","issue_url":"https://api.github.com/repos/opensourcepos/opensourcepos/issues/1694","id":372245863,"user":{"login":"objecttothis","id":17935339,"avatar_url":"https://avatars1.githubusercontent.com/u/17935339?v=4","gravatar_id":"","url":"https://api.github.com/users/objecttothis","html_url":"https://github.com/objecttothis","followers_url":"https://api.github.com/users/objecttothis/followers","following_url":"https://api.github.com/users/objecttothis/following{/other_user}","gists_url":"https://api.github.com/users/objecttothis/gists{/gist_id}","starred_url":"https://api.github.com/users/objecttothis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/objecttothis/subscriptions","organizations_url":"https://api.github.com/users/objecttothis/orgs","repos_url":"https://api.github.com/users/objecttothis/repos","events_url":"https://api.github.com/users/objecttothis/events{/privacy}","received_events_url":"https://api.github.com/users/objecttothis/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T09:33:57Z","updated_at":"2018-03-12T09:33:57Z","author_association":"COLLABORATOR","body":"So, bintray doesn't have a build for the last 8 days.  Is something broken in the build process?"}}
{"actor":{"display_login":"objecttothis"}}