merge automatic group order invoice generation
see https://github.com/foodcoops/foodsoft/pull/907 for reference and original work by viehlieb Co-authored-by: viehlieb <pf@pragma-shift.net> fix PDF Pdf make explicit deposit in invoices work add ordergroupname to invoice file name mark bold sum for vat exempt foodcoops download multiple group order invoice as zip
This commit is contained in:
parent
6abf998b56
commit
93143c28f2
37 changed files with 988 additions and 69 deletions
|
|
@ -7,11 +7,27 @@ module PriceCalculation
|
|||
add_percent(price + deposit, tax)
|
||||
end
|
||||
|
||||
def gross_price_without_deposit
|
||||
add_percent(price, tax)
|
||||
end
|
||||
|
||||
def gross_deposit_price
|
||||
add_percent(deposit, tax)
|
||||
end
|
||||
|
||||
# @return [Number] Price for the foodcoop-member.
|
||||
def fc_price
|
||||
add_percent(gross_price, FoodsoftConfig[:price_markup].to_i)
|
||||
end
|
||||
|
||||
def fc_price_without_deposit
|
||||
add_percent(gross_price_without_deposit, FoodsoftConfig[:price_markup].to_i)
|
||||
end
|
||||
|
||||
def fc_deposit_price
|
||||
add_percent(gross_deposit_price, FoodsoftConfig[:price_markup].to_i)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def add_percent(value, percent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue