Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add new model purchase to plugin basic with fields:
    • product - product from basic plugin,
    • quantity - quantity of product,
    • price - price of product,
    • date - date with time.
  2. Add validator which would check if product price is > 0.
  3. Add validator which would check if product quantity is > 0.
  4. Add validator which would check if there is no product purchase with the same name product and price.
  5. Add views for that model with list and add/edit details.
  6. (OPTIONAL) Add hooks which would set product unit
    1. add disabled input field next to quantity field in purchase details view
    2. when product changes, this field also should be updated.
  7. Add button to ribbon in purchases list or details which will count average price of all purchases or average price of product. The result can be presented in any way (for example as a simple popup or field on the view).

...