Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating prices when Fee = 100%, Net Price = $0, Sale Price = $1 #3492

Open
rbarreca opened this issue Nov 5, 2018 · 0 comments
Open

Comments

@rbarreca
Copy link
Contributor

rbarreca commented Nov 5, 2018

Describe the bug
If you try to set product price with custom Fee % and net price = $0 (say it's a supplier freebie or something but buyer still pays) you'll get an app error

To Reproduce
Steps to reproduce the behavior:

  1. Log in as market manager
  2. Go to Prices tab for a product
  3. Click Edit
  4. Set Fee % to Product and value = 100
  5. Set Net Price = 0
  6. Set Sale Price = 1
  7. Click Save
  8. See error like PG::NumericValueOutOfRange: ERROR: numeric field overflow DETAIL: A field with precision 5, scale 3 must round to an absolute value less than 10^2. : UPDATE "prices" SET "net_price" = $1, "product_fee_pct" = $2, "sale_price" = $3, "updated_at" = $4 WHERE "prices"."id" = 200782

Expected behavior
This would save and work in the system correctly or at least provide a valid error message in short-term (if a $0.00 net price product is too high of effort to do at this time).

Screenshots
screen shot 2018-11-04 at 3 28 37 pm
screen shot 2018-11-04 at 3 29 10 pm

Rollbar instances

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant