Make StockEvent a base class for Delivery and StockTaking
This helps to share code between the two entities and allows easier extensions in the future.
This commit is contained in:
parent
a5582e9542
commit
785313ac23
9 changed files with 69 additions and 33 deletions
|
|
@ -24,7 +24,7 @@
|
|||
%th.numeric= t '.sum'
|
||||
%tbody
|
||||
- total_net, total_gross = 0,0
|
||||
- @delivery.stock_changes.each do |stock_change|
|
||||
- @stock_changes.each do |stock_change|
|
||||
- quantity = stock_change.quantity
|
||||
- sum = quantity * stock_change.stock_article.price
|
||||
- total_net += sum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue