mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 05:56:20 +02:00
Merge pull request #2482 from internetee/2480-fix-monthly-invoices
Fixed dates for yearly domains in monthly invoices
This commit is contained in:
commit
30fd6d2465
1 changed files with 3 additions and 2 deletions
|
@ -59,8 +59,9 @@ module Invoice::BookKeeping
|
|||
|
||||
duration.times do |dur|
|
||||
single_item_dup = single_item.dup
|
||||
single_item_dup['start_date'] = (issue_date + dur.year).end_of_month.strftime('%Y-%m-%d')
|
||||
single_item_dup['end_date'] = (issue_date + (dur + 1).year).end_of_month.strftime('%Y-%m-%d')
|
||||
date = (issue_date + dur.year).end_of_month.strftime('%Y-%m-%d')
|
||||
single_item_dup['start_date'] = date
|
||||
single_item_dup['end_date'] = date
|
||||
single_item_dup['price'] = (item['price'].to_f / duration).round(2)
|
||||
lines << single_item_dup
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue