Giter VIP home page Giter VIP logo

Comments (5)

dacook avatar dacook commented on June 30, 2024

If this resulted in payments not being captured, we should list each one of these cases so we can let the affected enterprises know. And the same for all other bugsnag instances.. 😬

from openfoodnetwork.

mkllnk avatar mkllnk commented on June 30, 2024

If this resulted in payments not being captured, we should list each one of these cases so we can let the affected enterprises know.

I went through Australian Bugsnag and send all affected order ids to @amidaOFN. But we should check others as well. Oh, and some subscriptions were affected bug I can't see the ids in Bugsnag.

from openfoodnetwork.

mkllnk avatar mkllnk commented on June 30, 2024

Potential causing change reverted.

Comment added in Bugsnag by Maikel
ActiveRecord::RecordInvalid in checkout#update

from openfoodnetwork.

mkllnk avatar mkllnk commented on June 30, 2024

An error linked to this issue has been marked as fixed in Bugsnag
ActiveRecord::RecordInvalid in checkout#update

from openfoodnetwork.

mkllnk avatar mkllnk commented on June 30, 2024

Looking at the code, I have a suspicion:

  • Stock items can have negative stock if they are backorderable (on demand).
  • But variant overrides can set on_demand while not overriding the stock level (count_on_hand == nil).

A distributor with inventory can set a variant to on demand while not overriding the stock level. In the old model, orders would then not affect the stock level because on demand would disable stock tracking. But the offending pull request starting tracking stock for on demand products as well. I didn't consider this and thought that tracking stock for in this case was hidden to the user but it's actually a big change in logic. Now a sale of a distributor can reduce stock levels of the producer even though the distributor chose on demand.

I think that the solution is to enforce stock tracking on variant overrides when on demand is set. So the sales don't affect the producers stock level and the distributor has its own hidden stock tracking.

from openfoodnetwork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.