fix deposit is net value
This commit is contained in:
parent
f29ab603b6
commit
90e06a475f
10 changed files with 75 additions and 34 deletions
|
|
@ -99,6 +99,14 @@ class OrderArticle < ApplicationRecord
|
|||
units * price.unit_quantity * price.gross_price
|
||||
end
|
||||
|
||||
def total_gross_price_without_deposit
|
||||
units * price.unit_quantity * price.gross_price_without_deposit
|
||||
end
|
||||
|
||||
def total_deposit_price
|
||||
units * price.unit_quantity * price.deposit
|
||||
end
|
||||
|
||||
def ordered_quantities_different_from_group_orders?(ordered_mark = '!', billed_mark = '?', received_mark = '?')
|
||||
if !units_received.nil?
|
||||
(units_received * price.unit_quantity) == group_orders_sum[:quantity] ? false : received_mark
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue