Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implemented multiple payment slips, refs #425
- Loading branch information
Showing
18 changed files
with
221 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-# Copyright (c) 2012-2017, Jungwacht Blauring Schweiz. This file is part of | ||
-# hitobito and licensed under the Affero General Public License version 3 | ||
-# or later. See the COPYING file at the top-level directory or at | ||
-# https://github.com/hitobito/hitobito. | ||
%dl.dl-horizontal | ||
= labeled_attr(entry, :contact) | ||
= labeled_attr(entry, :due_days) | ||
= labeled_attr(entry, :payment_information) | ||
|
||
= labeled(captionize(:payment_slip, object_class(entry)), entry.payment_slip_label) | ||
= labeled_attr(entry, :beneficiary) | ||
= labeled_attr(entry, :address) | ||
= labeled_attr(entry, :account_number) | ||
= labeled_attr(entry, :iban) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
-# Copyright (c) 2012-2017, Jungwacht Blauring Schweiz. This file is part of | ||
-# hitobito and licensed under the Affero General Public License version 3 | ||
-# or later. See the COPYING file at the top-level directory or at | ||
-# https://github.com/hitobito/hitobito. | ||
.invoice-info.clearfix | ||
%dl.dl-horizontal | ||
.invoice-recipient-address | ||
.contactable | ||
.address | ||
= invoice_receiver_address(entry) | ||
|
||
.invoice-payment | ||
= labeled(captionize(:payment_slip, object_class(entry)), entry.payment_slip_label) | ||
= labeled_attr(entry, :beneficiary) | ||
= labeled_attr(entry, :address) | ||
= labeled_attr(entry, :account_number) | ||
= labeled_attr(entry, :iban) if entry.iban.present? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
-# Copyright (c) 2012-2017, Jungwacht Blauring Schweiz. This file is part of | ||
-# hitobito and licensed under the Affero General Public License version 3 | ||
-# or later. See the COPYING file at the top-level directory or at | ||
-# https://github.com/hitobito/hitobito. | ||
.invoice-articles-table | ||
%h2= entry.title | ||
|
||
%table.header | ||
%tr | ||
%td.left | ||
= "#{t('activerecord.models.invoice.one')}: ##{entry.sequence_number}" | ||
%td.right | ||
= l(entry.sent_at, format: :long) if entry.sent_at? | ||
|
||
= table(entry.invoice_items.list, class: 'table table-striped') do |t| | ||
- t.attr(:name) | ||
- t.attr(:description) | ||
- t.attr(:count) | ||
- t.attr(:vat_rate) { |i| i.decorate.vat_rate } | ||
- t.attr(:unit_cost) { |i| i.decorate.unit_cost } | ||
- t.attr(:total) { |i| i.decorate.cost } | ||
|
||
.invoice-items-total | ||
%table | ||
%tr | ||
%td.left | ||
= captionize(:cost, Invoice) | ||
%td.right | ||
= entry.cost | ||
%tr | ||
%td.left | ||
= captionize(:vat_rate, InvoiceItem) | ||
%td.right | ||
= entry.vat | ||
%tr | ||
%td.left | ||
%b= captionize(:total_inkl_vat, Invoice) | ||
%td.right | ||
%b= entry.total |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# encoding: utf-8 | ||
|
||
# Copyright (c) 2012-2017, Jungwacht Blauring Schweiz. This file is part of | ||
# hitobito and licensed under the Affero General Public License version 3 | ||
# or later. See the COPYING file at the top-level directory or at | ||
# https://github.com/hitobito/hitobito. | ||
|
||
class MultiplePaymentSlips < ActiveRecord::Migration | ||
def change | ||
add_column :invoices, :payment_slip, :string, null: false, default: 'ch_es' | ||
add_column :invoices, :beneficiary, :text | ||
|
||
add_column :invoice_configs, :payment_slip, :string, null: false, default: 'ch_es' | ||
add_column :invoice_configs, :beneficiary, :text | ||
end | ||
end |
Oops, something went wrong.