im new in laravel and php and im working on a project that has a specific requirements. I would appreciate if you would help me get into right direction. Use case is:
I need a project for my client that’s gonna track balances between
warehouses, generating documents and updating balances and transfers
between ones. Every item in warehouse should have its own LOT code (ex
2 items that received in warehouse can have different codes and i need
to update balance for that particular LOT code but still be able to
show balance sum for that item with all LOT codes). Users with right
permission should have access to only 1 warehouse (and admin should
have access for all), and be able to transfer items to another by
which LOT code would be generated. So lets give an example:User 1 has access to warehouse Storage and Finished products; User 2
has access to warehouse Preparation;Balance of Storage for item sugar is 1000kg with LOT code “28012022”;
User 1 receives 500kg of ex sugar with LOT code “02022022” (or
autogenerated if no input), he enters all the data about that
reception in fields. He then sends 200kg with LOT code 28012022 and
100kg with “02022022” to Preparation warehouse. User 2 confirms
transaction and Storage balance is updated with new values subtracted
with that amounts, and Preparation warehouse is updated with new item
values and new LOT code is generated (28012022/02022022)User 2 then enters spent amounts and how much of Finished products is
made from it, his balance is updated with balance left and LOT code
(in this example 28012022/02022022). Then user 2 commits transaction
and user 1 confirms it and Finished Products balance is updated with
new generated LOT code (28012022/02022022/currentDate);
My question is, should i use pivot tables in laravel, and as im using spatie laravel permission, how should i implement that so that i can give access to some users only for certain warehouses?
Any pointers in right direction will be appreciated.
Here is git of a project:
https://github.com/cile1993/cmss