Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jamie Townsend 62 posts 287 karma points c-trib
    Mar 30, 2020 @ 14:22
    Jamie Townsend
    0

    Stock Level

    Hey Vendr,

    Congrats on the release, I am having a play and noticed a potential issue with the Vendr:Stock field - this is throwing an error if I enter a stock value > 99

    So setting a product stock level to 99 works but 100 fails with an error:

    An error occured Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated.

    Exception Details System.Data.SqlClient.SqlException: Arithmetic overflow error converting numeric to data type numeric. The statement has been terminated.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 30, 2020 @ 14:31
    Matt Brailsford
    0

    Oh wow, that's a weird one. Let me see if I can replicate it on my local install. 🤔

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 30, 2020 @ 14:49
    Matt Brailsford
    100

    Ok, it looks like we've used the wrong db type for the stock field, using numeric(10, 8) which has a maximum value of 99.99999999. It should be numeric(18, 6).

    We'll have to create an update to increase the table value, but in the mean time you can change it at the DB level and I think that should be ok.

    ALTER TABLE [vendrStock] ALTER COLUMN [stock] numeric(18, 6)
    

    Matt

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Mar 30, 2020 @ 15:14
    Matt Brailsford
    0

    Ok, just to let you know, I've raised this as a bug on the issue tracker here https://github.com/vendrhub/vendr/issues/44

    I have fixed this locally, but I'm going to hang fire for a day or two to see if anything else pops up post launch. You can follow the issue on the issue tracker to stay up to date on it's progress.

    Thanks for spotting / reporting this though.

  • Jamie Townsend 62 posts 287 karma points c-trib
    Mar 30, 2020 @ 15:25
    Jamie Townsend
    0

    Awesome thanks!

Please Sign in or register to post replies

Write your reply to:

Draft