GithubHelp home page GithubHelp logo

laravel-stock's People

Contributors

gizburdt avatar it-can avatar kluverp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

laravel-stock's Issues

Warehouse support

Would it be possible to add warehouse support? Maybe like an extra pivot model so like:

Book + Warehouse = the stock

Decimal amount

Hello. I'm wondering why the package only consider amount as integer. If we consider a supermarket selling meat in kilograms... someone could buy 2.5 kilograms in this case for instance, the package will not suit.

Option to directly save stock in stockable model table

The stock method of the HasStock trait returns the current stock value if no date is given.
It gets the value by summing all the stock mutations the stockable model has.

It works without issues, however if there are thousands of stock mutations and it's required to have a page that shows hundreads of products and their stock, such SQL query might be quite expensive.

I think it would be useful to have an option to save the current stock after a stock mutation, so when calling the stock method without a date, it just returns the value, without the need to sum everything.

Would a PR for this feature be welcome?

MongoDB Support

As a developer I want to be able to use MongoDB instead of a SQL database.

Stock History

How could a stock history be implemented to keep track of how many sales or additions were made to a given product?

How to handle variants?

I'm creating an application which uses variants, what would be the suggested way to handle stock of main product and variants using your package?

For example if I used a table layout like this

products
products_variants
products_variants_options

Where variants are like size and color

variants options are small, medium, large and blue, red, white

Thanks

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.