Problem with webservice methods and inventory modules - Printable Version +- CoreBOSBB (https://discussions.corebos.org) +-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18) +--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4) +--- Thread: Problem with webservice methods and inventory modules (/showthread.php?tid=480) Pages:
1
2
|
Problem with webservice methods and inventory modules - Guido1982 - 11-03-2016 Since the update I did last weekend I noticed a problem with webservice methods. Whenever one is used on inventory modules, the number multiply by a million. So € 3.500,- becomes € 3.500.000.000,-. My user settings are:
RE: Problem with webservice methods and inventory modules - joebordes - 11-04-2016 We will check this and get back to you. RE: Problem with webservice methods and inventory modules - Guido1982 - 11-04-2016 Great, thanks. I tried updating through the ->save() method, but that created a new SO. Tried setting the focus->mode to "edit" but no luck. RE: Problem with webservice methods and inventory modules - joebordes - 11-04-2016 Try also $_REQUEST['mode']='edit'; although I'd say that with the ->mode should be enough RE: Problem with webservice methods and inventory modules - Guido1982 - 11-04-2016 Thanks, will try and get back here if I have something.... RE: Problem with webservice methods and inventory modules - Guido1982 - 11-07-2016 Okay, I'm kind of an idiot here... I tried setting the mode as if it was a method. So focus->mode("edit"). Should have been $focus->mode = "edit"... RE: Problem with webservice methods and inventory modules - joebordes - 11-07-2016 :-) RE: Problem with webservice methods and inventory modules - joebordes - 11-22-2016 I tried this and it seems to have worked correctly for me. I did a retrieve of an invoice record, then I sent the information back in with an update. - I updated only the subject and it respected all the values - I changed the list price and saw that the price wasn't being updated. I fixed this error we introduced a few weeks ago: https://github.com/tsolucio/corebos/commit/98e6367e6661eb82b28ff45937867003f8638165 this is not related to your problem - once fixed, the list price on the line was updated correctly and all the totals also That was done with admin user with english settings: point as decimal separator and comma as thousands, the numbers were formatted in that way Now I changed to a user who has the settings reveresed, comma as decimal and point as thousands separator. - with the english number settings all the numbers were broken. this is expected because the user is saying that he works with comma as decimal and point as thousands, so if you send in a number with that reversed the number is read incorrectly. - I set the numbers to the format of the user and try again. All numbers are updated correctly, except the product lines. I see that product line currency has not been updated to work with the connected user format so I change that: https://github.com/tsolucio/corebos/commit/6e6edf23c611e608208d189b2880bda31ec26b7b In short: I think it is working correctly, which means: you must send the currency numbers in the format of the user that is connected. This is exactly like the application, On screen you introduce the numbers in the format you have selected, if it is incorrect, the application will give you an error and not let you save. The webservice interface does the same, but with no validation, it expects you to do the validations. Reached this point I have to say that this is a complex issue which that we have dedicated a lot of time to. I would really like to make sure we have it nailed down and working correctly, so if you think it isn't working right I would like you to use the coreBOS webservice development tool against the coreBOS demo and share with us a couple ot test scripts to reproduce where it isn't working so we can fix it. Thanks! RE: Problem with webservice methods and inventory modules - Guido1982 - 11-28-2016 Will set this on my to-do list. But really, shouldn't we say that any developer would need to make sure he sets the currencies to system format before sending them into the webservice methods? I'll get doing some tests on my to-do lists, will report back if I have anything. RE: Problem with webservice methods and inventory modules - joebordes - 11-28-2016 You must send the currency formatted in the settngs of the user you have connected with. |