kaui 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/README.md +5 -29
- data/app/assets/javascripts/kaui/kaui.js +1 -1
- data/app/assets/stylesheets/kaui/account.less +9 -1
- data/app/assets/stylesheets/kaui/common.less +46 -3
- data/app/controllers/kaui/accounts_controller.rb +11 -15
- data/app/controllers/kaui/admin_tenants_controller.rb +77 -106
- data/app/controllers/kaui/audit_logs_controller.rb +3 -3
- data/app/controllers/kaui/bundles_controller.rb +4 -0
- data/app/controllers/kaui/engine_controller_util.rb +25 -17
- data/app/controllers/kaui/invoice_tags_controller.rb +28 -0
- data/app/controllers/kaui/invoices_controller.rb +65 -14
- data/app/controllers/kaui/payment_methods_controller.rb +14 -3
- data/app/controllers/kaui/sessions_controller.rb +6 -0
- data/app/controllers/kaui/subscriptions_controller.rb +13 -4
- data/app/helpers/kaui/account_helper.rb +10 -2
- data/app/helpers/kaui/payment_method_helper.rb +5 -3
- data/app/helpers/kaui/plugin_helper.rb +10 -49
- data/app/helpers/kaui/subscription_helper.rb +26 -9
- data/app/helpers/kaui/uuid_helper.rb +1 -0
- data/app/models/kaui/admin_tenant.rb +8 -84
- data/app/models/kaui/catalog.rb +28 -2
- data/app/models/kaui/tag.rb +1 -1
- data/app/views/kaui/account_emails/_form.html.erb +1 -1
- data/app/views/kaui/accounts/_billing_info.html.erb +4 -0
- data/app/views/kaui/accounts/_form.html.erb +1 -1
- data/app/views/kaui/accounts/_payment_methods.html.erb +3 -0
- data/app/views/kaui/accounts/index.html.erb +7 -4
- data/app/views/kaui/admin_tenants/_form_plugin_config.erb +59 -241
- data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +2 -2
- data/app/views/kaui/admin_tenants/new_catalog.html.erb +16 -15
- data/app/views/kaui/bundles/_bundle_details.html.erb +12 -0
- data/app/views/kaui/bundles/index.html.erb +3 -14
- data/app/views/kaui/chargebacks/_form.html.erb +1 -1
- data/app/views/kaui/charges/_form.html.erb +1 -1
- data/app/views/kaui/invoice_tags/_form.html.erb +33 -0
- data/app/views/kaui/invoice_tags/_form_bar.html.erb +21 -0
- data/app/views/kaui/invoice_tags/edit.html.erb +10 -0
- data/app/views/kaui/invoices/_invoice_table.html.erb +30 -9
- data/app/views/kaui/invoices/index.html.erb +6 -4
- data/app/views/kaui/invoices/show.html.erb +11 -2
- data/app/views/kaui/layouts/kaui_flash.html.erb +8 -1
- data/app/views/kaui/payments/_form.html.erb +1 -1
- data/app/views/kaui/payments/_payment_table.html.erb +2 -2
- data/app/views/kaui/payments/index.html.erb +3 -1
- data/app/views/kaui/subscriptions/_edit_form.html.erb +1 -1
- data/app/views/kaui/subscriptions/_form.html.erb +1 -1
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +3 -3
- data/config/routes.rb +6 -1
- data/lib/kaui.rb +55 -0
- data/lib/kaui/version.rb +1 -1
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/config/initializers/cookies_serializer.rb +1 -1
- data/test/dummy/config/initializers/money.rb +2 -0
- data/test/functional/kaui/account_emails_controller_test.rb +2 -2
- data/test/functional/kaui/account_tags_controller_test.rb +1 -1
- data/test/functional/kaui/accounts_controller_test.rb +4 -4
- data/test/functional/kaui/admin_tenants_controller_test.rb +3 -23
- data/test/functional/kaui/bundle_tags_controller_test.rb +1 -1
- data/test/functional/kaui/bundles_controller_test.rb +3 -3
- data/test/functional/kaui/chargebacks_controller_test.rb +2 -2
- data/test/functional/kaui/charges_controller_test.rb +2 -2
- data/test/functional/kaui/credits_controller_test.rb +5 -5
- data/test/functional/kaui/home_controller_test.rb +5 -5
- data/test/functional/kaui/invoice_items_controller_test.rb +3 -3
- data/test/functional/kaui/invoices_controller_test.rb +2 -2
- data/test/functional/kaui/refunds_controller_test.rb +2 -2
- data/test/functional/kaui/subscriptions_controller_test.rb +6 -6
- data/test/killbill_test_helper.rb +8 -6
- data/test/unit/helpers/kaui/payment_method_helper_test.rb +17 -0
- data/test/unit/kaui/account_test.rb +2 -2
- data/test/unit/kaui/admin_tenant_test.rb +10 -47
- data/test/unit/kaui/invoice_item_test.rb +1 -1
- data/test/unit/kaui/invoice_payment_test.rb +7 -7
- data/test/unit/kaui/invoice_test.rb +4 -4
- data/test/unit/kaui/payment_test.rb +7 -7
- metadata +110 -86
@@ -106,8 +106,8 @@
|
|
106
106
|
plan['new_plan_currency_path'] = Routes.kaui_engine_admin_tenant_new_plan_currency_path(<%= @tenant.id %>, {plan_id: plan['plan_id']});
|
107
107
|
plan['humanized_product_name'] = function(){
|
108
108
|
return function (input, render) {
|
109
|
-
|
110
|
-
return
|
109
|
+
// Keep the product name as-is to avoid confusing with casing
|
110
|
+
return render(input);
|
111
111
|
}
|
112
112
|
}
|
113
113
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<div class="form-group" id="form_category">
|
12
12
|
<%= f.label :product_category, 'Product Category', :class => 'col-sm-3 control-label' %>
|
13
13
|
<div class="col-sm-4">
|
14
|
-
<%= f.select :product_category, options_for_select(@product_categories.map {|p| [humanized_product_category(p), p] },
|
14
|
+
<%= f.select :product_category, options_for_select(@product_categories.map {|p| [humanized_product_category(p), p] }, @simple_plan.product_category), :class => 'form-control' %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
<div class="form-group">
|
@@ -47,31 +47,31 @@
|
|
47
47
|
<div class="form-group">
|
48
48
|
<%= f.label :amount, 'Amount', :class => 'col-sm-3 control-label' %>
|
49
49
|
<div class="col-sm-4">
|
50
|
-
<%= f.number_field :amount, :class => 'form-control', :
|
50
|
+
<%= f.number_field :amount, :class => 'form-control', :step => :any %>
|
51
51
|
</div>
|
52
52
|
</div>
|
53
53
|
<div class="form-group">
|
54
54
|
<%= f.label :currency, 'Currency', :class => 'col-sm-3 control-label' %>
|
55
55
|
<div class="col-sm-4">
|
56
|
-
<%= f.select :currency, currencies, {:selected =>
|
56
|
+
<%= f.select :currency, currencies, {:selected => @simple_plan.currency}, :class => 'form-control' %>
|
57
57
|
</div>
|
58
58
|
</div>
|
59
59
|
<div class="form-group">
|
60
60
|
<%= f.label :billing_period, 'Billing Period', :class => 'col-sm-3 control-label' %>
|
61
61
|
<div class="col-sm-4">
|
62
|
-
<%= f.select :billing_period, options_for_select(@billing_period.map {|bp| [humanized_billing_period(bp), bp] },
|
62
|
+
<%= f.select :billing_period, options_for_select(@billing_period.map {|bp| [humanized_billing_period(bp), bp] }, @simple_plan.billing_period), :class => 'form-control' %>
|
63
63
|
</div>
|
64
64
|
</div>
|
65
65
|
<div class="form-group">
|
66
66
|
<%= f.label :trial_length, 'Trial Length', :class => 'col-sm-3 control-label' %>
|
67
67
|
<div class="col-sm-4">
|
68
|
-
<%= f.number_field :trial_length, :class => 'form-control', :
|
68
|
+
<%= f.number_field :trial_length, :class => 'form-control', :type => 'number', :min => 0, :step => 1 %>
|
69
69
|
</div>
|
70
70
|
</div>
|
71
71
|
<div class="form-group">
|
72
72
|
<%= f.label :trial_time_unit, 'Trial Time Unit', :class => 'col-sm-3 control-label' %>
|
73
73
|
<div class="col-sm-4">
|
74
|
-
<%= f.select :trial_time_unit, options_for_select(@time_units.map {|tu| [humanized_time_unit(tu), tu]},
|
74
|
+
<%= f.select :trial_time_unit, options_for_select(@time_units.map {|tu| [humanized_time_unit(tu), tu]}, @simple_plan.trial_time_unit), :class => 'form-control' %>
|
75
75
|
</div>
|
76
76
|
</div>
|
77
77
|
<div class="form-group">
|
@@ -111,15 +111,19 @@
|
|
111
111
|
|
112
112
|
function known_products() {
|
113
113
|
var result = [];
|
114
|
-
var selected_category = $("#simple_plan_product_category option:selected"
|
115
|
-
if (selected_category == '
|
114
|
+
var selected_category = $("#simple_plan_product_category option:selected").val();
|
115
|
+
if (selected_category == 'BASE') {
|
116
116
|
result = $('#simple_plan_product_name').attr('known_base');
|
117
|
-
} else if (selected_category == '
|
117
|
+
} else if (selected_category == 'ADD_ON') {
|
118
118
|
result = $('#simple_plan_product_name').attr('known_ao');
|
119
119
|
} else {
|
120
120
|
result = $('#simple_plan_product_name').attr('known_std');
|
121
121
|
}
|
122
|
-
|
122
|
+
if (result) {
|
123
|
+
return result.split(",");
|
124
|
+
} else {
|
125
|
+
return [];
|
126
|
+
}
|
123
127
|
}
|
124
128
|
|
125
129
|
function switch_xml_config() {
|
@@ -128,7 +132,7 @@ function switch_xml_config() {
|
|
128
132
|
}
|
129
133
|
|
130
134
|
function recompute_available_base_products_for_ao() {
|
131
|
-
if ($("#simple_plan_product_category option:selected" ).
|
135
|
+
if ($("#simple_plan_product_category option:selected" ).val() != 'ADD_ON') {
|
132
136
|
return;
|
133
137
|
}
|
134
138
|
var product_name = $('#simple_plan_product_name').val();
|
@@ -147,10 +151,7 @@ function recompute_available_base_products_for_ao() {
|
|
147
151
|
}
|
148
152
|
|
149
153
|
function display_available_base_products_for_ao() {
|
150
|
-
|
151
|
-
$('#simple_plan_product_name').val('');
|
152
|
-
|
153
|
-
if ($("#simple_plan_product_category option:selected" ).text() == 'Add_on') {
|
154
|
+
if ($("#simple_plan_product_category option:selected" ).val() == 'ADD_ON') {
|
154
155
|
$('#form_base_products').show();
|
155
156
|
} else {
|
156
157
|
$('#form_base_products').hide();
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<table class="transparent subtitle">
|
2
|
+
<tr>
|
3
|
+
<th>Bundle ID</th>
|
4
|
+
<td><%= bundle.bundle_id %></td>
|
5
|
+
</tr>
|
6
|
+
<% unless bundle.bundle_id == bundle.external_key %>
|
7
|
+
<tr>
|
8
|
+
<th>Bundle key</th>
|
9
|
+
<td><%= bundle.external_key %></td>
|
10
|
+
</tr>
|
11
|
+
<% end %>
|
12
|
+
</table>
|
@@ -10,19 +10,8 @@
|
|
10
10
|
|
11
11
|
<% @bundles.each_with_index do |bundle, idx| %>
|
12
12
|
<div class="row">
|
13
|
-
<div class="col-md-
|
14
|
-
|
15
|
-
<tr>
|
16
|
-
<th>Bundle ID</th>
|
17
|
-
<td><%= bundle.bundle_id %></td>
|
18
|
-
</tr>
|
19
|
-
<% unless bundle.bundle_id == bundle.external_key %>
|
20
|
-
<tr>
|
21
|
-
<th>Bundle key</th>
|
22
|
-
<td><%= bundle.external_key %></td>
|
23
|
-
</tr>
|
24
|
-
<% end %>
|
25
|
-
</table>
|
13
|
+
<div class="col-md-6">
|
14
|
+
<%= render :partial => Kaui.bundle_details_partial, :locals => { :bundle => bundle, :account => @account, :catalog => @catalog } %>
|
26
15
|
</div>
|
27
16
|
</div>
|
28
17
|
|
@@ -76,7 +65,7 @@
|
|
76
65
|
|
77
66
|
<% if bundle.subscriptions.present? %>
|
78
67
|
<div class="search">
|
79
|
-
<%= render :partial => 'kaui/subscriptions/subscriptions_table', :locals => {:bundle => bundle, :account => @account} %>
|
68
|
+
<%= render :partial => 'kaui/subscriptions/subscriptions_table', :locals => {:bundle => bundle, :account => @account, :catalog => @catalog} %>
|
80
69
|
</div>
|
81
70
|
<% end %>
|
82
71
|
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<div class="form-group">
|
6
6
|
<%= f.label :amount, 'Amount', :class => 'col-sm-2 control-label' %>
|
7
7
|
<div class="col-sm-10">
|
8
|
-
<%= f.number_field :amount, :id => 'chargeback_amount', :class => 'form-control' %>
|
8
|
+
<%= f.number_field :amount, :step => :any, :id => 'chargeback_amount', :class => 'form-control' %>
|
9
9
|
<p class="help-block">Currency: <%= @chargeback.currency %></p>
|
10
10
|
</div>
|
11
11
|
</div>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
<div class="form-group">
|
16
16
|
<%= f.label :amount, 'Amount', :class => 'col-sm-2 control-label' %>
|
17
17
|
<div class="col-sm-10">
|
18
|
-
<%= f.number_field :amount, :id => 'charge_amount', :class => 'form-control' %>
|
18
|
+
<%= f.number_field :amount, :step => :any, :id => 'charge_amount', :class => 'form-control' %>
|
19
19
|
<% if @invoice.present? %>
|
20
20
|
<p class="help-block">Currency: <%= @invoice.currency %></p>
|
21
21
|
<% end %>
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<%= form_tag update_invoice_tags_path, :class => 'form-horizontal' do %>
|
2
|
+
<%= hidden_field_tag :invoice_id, @invoice_id %>
|
3
|
+
|
4
|
+
<div class='form-group'>
|
5
|
+
<div class="col-sm-offset-2 col-sm-10">
|
6
|
+
<% @available_tags.each do |tag| %>
|
7
|
+
<div class="checkbox">
|
8
|
+
<label>
|
9
|
+
<%= check_box_tag "tag_#{tag.id}", tag.name, @tag_names.include?(tag.name) %>
|
10
|
+
<span class='tag-description' rel='tooltip' title='<%= tag.description %>'><%= tag.name %></span>
|
11
|
+
</label>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
</div>
|
15
|
+
</div>
|
16
|
+
<div class="form-group">
|
17
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
18
|
+
<div class="col-sm-10">
|
19
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
20
|
+
</div>
|
21
|
+
</div>
|
22
|
+
<div class="form-group">
|
23
|
+
<div class="col-sm-offset-2 col-sm-10">
|
24
|
+
<%= submit_tag 'Update', :class => 'btn btn-default' %>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
<% end %>
|
28
|
+
|
29
|
+
<%= javascript_tag do %>
|
30
|
+
$(function() {
|
31
|
+
$(".tag-description").tooltip();
|
32
|
+
});
|
33
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<% can_change_tags = can?(:add, Kaui::Tag) || can?(:delete, Kaui::Tag) %>
|
2
|
+
<%= form_tag update_invoice_tags_path do %>
|
3
|
+
<%= hidden_field_tag :invoice_id, invoice_id %>
|
4
|
+
|
5
|
+
<% available_tags.each do |tag| %>
|
6
|
+
<%= check_box_tag "tag_#{tag.id}", tag.name, tag_names.include?(tag.name), :disabled => !can_change_tags, :readonly => !can_change_tags %>
|
7
|
+
<label class='tag-description' rel='tooltip' title='<%= tag.description %>'><%= tag.name %></label>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
<% if can_change_tags %>
|
11
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
12
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
13
|
+
<%= submit_tag 'Update', :class => 'btn btn-default' %>
|
14
|
+
<% end %>
|
15
|
+
<% end %>
|
16
|
+
|
17
|
+
<%= javascript_tag do %>
|
18
|
+
$(function() {
|
19
|
+
$(".tag-description").tooltip();
|
20
|
+
});
|
21
|
+
<% end %>
|
@@ -1,14 +1,22 @@
|
|
1
1
|
<div class="info-wrapper">
|
2
2
|
|
3
3
|
<% display_payment_options = (!dry_run && ((can?(:credit, Kaui::Account) && @invoice.status == 'DRAFT') || (can?(:charge, Kaui::Account) && @invoice.status == 'DRAFT') || (@invoice.balance > 0 && can?(:trigger, Kaui::Payment))))
|
4
|
-
if !(@custom_fields ||= nil).blank? || display_payment_options %>
|
4
|
+
if !(@available_invoice_tags ||= nil).blank? || !(@custom_fields ||= nil).blank? || display_payment_options %>
|
5
5
|
<div class="tag-bar">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
<% unless @available_invoice_tags.blank? %>
|
7
|
+
<div class="tag-select" onclick="void(0)">
|
8
|
+
<span><i class="fa fa-tag"></i><i class="fa fa-caret-down"></i></span>
|
9
|
+
|
10
|
+
<div class="tag-select-box">
|
11
|
+
<strong>Tag As:</strong>
|
12
|
+
<%= render :partial => 'kaui/invoice_tags/form_bar',
|
13
|
+
:locals => {:account_id => @account.account_id,
|
14
|
+
:invoice_id => @invoice.invoice_id,
|
15
|
+
:tag_names => @invoice_tags.map { |tag| tag.tag_definition_name },
|
16
|
+
:available_tags => @available_invoice_tags} %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<% end %>
|
12
20
|
<%= render :partial => 'kaui/custom_fields/list_bar',
|
13
21
|
:locals => {:custom_fields => @custom_fields} %>
|
14
22
|
|
@@ -35,6 +43,19 @@
|
|
35
43
|
</div>
|
36
44
|
<% end %>
|
37
45
|
|
46
|
+
<% if can?(:void, Kaui::Invoice) && @invoice.status != 'VOID' && @invoice_tags.find { |t| t.tag_definition_name == 'WRITTEN_OFF' }.nil? # The backend will do more comprehensive checks %>
|
47
|
+
<div class="tag-select" onclick="void(0)">
|
48
|
+
<span><i class="fa fa-trash"></i><i class="fa fa-caret-down"></i></span>
|
49
|
+
|
50
|
+
<div class="tag-select-box">
|
51
|
+
<%= form_tag void_invoice_path(:id => @invoice.invoice_id), :method => :delete do %>
|
52
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
53
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
54
|
+
<%= submit_tag 'Void', :class => 'btn btn-default' %>
|
55
|
+
<% end %>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<% end %>
|
38
59
|
</div>
|
39
60
|
<% end %>
|
40
61
|
|
@@ -82,7 +103,7 @@
|
|
82
103
|
|
83
104
|
</td>
|
84
105
|
<% end %>
|
85
|
-
<td onClick="hightlightLinkedItems('<%= item.invoice_item_id %>', '<%= item.linked_invoice_item_id %>'); return false;"><%= item.description %></td>
|
106
|
+
<td onClick="hightlightLinkedItems('<%= item.invoice_item_id %>', '<%= item.linked_invoice_item_id %>'); return false;"><%= item.pretty_plan_name.blank? || !item.item_type.in?(%w{USAGE RECURRING}) ? item.description : item.pretty_plan_name %></td>
|
86
107
|
<td onClick="hightlightLinkedItems('<%= item.invoice_item_id %>', '<%= item.linked_invoice_item_id %>'); return false;"><%= item.start_date.html_safe if item.start_date %></td>
|
87
108
|
<td onClick="hightlightLinkedItems('<%= item.invoice_item_id %>', '<%= item.linked_invoice_item_id %>'); return false;"><%= item.end_date.html_safe if item.end_date %></td>
|
88
109
|
<td onClick="hightlightLinkedItems('<%= item.invoice_item_id %>', '<%= item.linked_invoice_item_id %>'); return false;"><%= item.subscription_id %></td>
|
@@ -130,7 +151,7 @@
|
|
130
151
|
|
131
152
|
<script language="javascript">
|
132
153
|
function hightlightLinkedItems(invoice_item_id, linked_invoice_item_id) {
|
133
|
-
$("#
|
154
|
+
$("#invoice-table tr:gt(0)").each(function (index) {
|
134
155
|
var ids = $(this).attr("id").split("_");
|
135
156
|
var item_id = ids[2];
|
136
157
|
var linked_item_id = ids[3];
|
@@ -8,9 +8,9 @@
|
|
8
8
|
<thead>
|
9
9
|
<tr>
|
10
10
|
<th>Number</th>
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
<% (@account.account_id.blank? ? Kaui.invoice_search_columns : Kaui.account_invoices_columns).call()[0].each do |title| %>
|
12
|
+
<th><%= title %></th>
|
13
|
+
<% end %>
|
14
14
|
</tr>
|
15
15
|
</thead>
|
16
16
|
<tbody>
|
@@ -43,7 +43,9 @@ $(document).ready(function() {
|
|
43
43
|
"paging": false,
|
44
44
|
"ajax": "<%= invoices_pagination_path :format => :json %>",
|
45
45
|
<% end %>
|
46
|
-
<%
|
46
|
+
<% if @search_query.blank? %>
|
47
|
+
"ordering": false,
|
48
|
+
<% elsif !@ordering.blank? %>
|
47
49
|
"order": [[ 0, "<%= @ordering %>" ]],
|
48
50
|
<% end %>
|
49
51
|
"processing": true,
|
@@ -5,7 +5,7 @@
|
|
5
5
|
<h1>
|
6
6
|
Invoice <%= @invoice.invoice_number %>
|
7
7
|
<% unless @invoice.invoice_number.blank? %>
|
8
|
-
<%=
|
8
|
+
<%= Kaui.customer_invoice_link.call(@invoice, self) %>
|
9
9
|
<% end %>
|
10
10
|
</h1>
|
11
11
|
|
@@ -22,6 +22,15 @@
|
|
22
22
|
This is a DRAFT invoice.
|
23
23
|
<%= link_to 'Commit it', kaui_engine.commit_invoice_path(:id => @invoice.invoice_id), :method => :post %>.
|
24
24
|
</div>
|
25
|
+
<% elsif @invoice.status == 'VOID' %>
|
26
|
+
<div class="alert alert-danger">
|
27
|
+
This invoice has been voided.
|
28
|
+
</div>
|
29
|
+
<% end %>
|
30
|
+
<% unless @invoice_tags.find { |t| t.tag_definition_name == 'WRITTEN_OFF' }.nil? %>
|
31
|
+
<div class="alert alert-danger">
|
32
|
+
This invoice has been written off.
|
33
|
+
</div>
|
25
34
|
<% end %>
|
26
35
|
|
27
36
|
<div class="row">
|
@@ -105,7 +114,7 @@
|
|
105
114
|
$('#invoice-table').dataTable({
|
106
115
|
"dom": "t",
|
107
116
|
"paging": false,
|
108
|
-
"order": [
|
117
|
+
"order": [],
|
109
118
|
"columns": [
|
110
119
|
null,
|
111
120
|
null,
|
@@ -8,6 +8,13 @@
|
|
8
8
|
</div>
|
9
9
|
<% end %>
|
10
10
|
<% end %>
|
11
|
+
<% if flash[:warning] %>
|
12
|
+
<div class="row server-alert">
|
13
|
+
<div class="col-md-12">
|
14
|
+
<div class="alert alert-warning"><%= flash[:warning] %></div>
|
15
|
+
</div>
|
16
|
+
</div>
|
17
|
+
<% end %>
|
11
18
|
<% if flash[:notice] %>
|
12
19
|
<div class="row server-alert">
|
13
20
|
<div class="col-md-12">
|
@@ -36,4 +43,4 @@
|
|
36
43
|
<span id="ajaxInfoAlertMessage" class="ajaxAlertMessage"></span>
|
37
44
|
</div>
|
38
45
|
</div>
|
39
|
-
</div>
|
46
|
+
</div>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<div class="form-group">
|
15
15
|
<%= f.label :purchased_amount, 'Amount', :class => 'col-sm-3 control-label' %>
|
16
16
|
<div class="col-sm-9">
|
17
|
-
<%= f.number_field :purchased_amount, :id => 'payment_amount', :class => 'form-control' %>
|
17
|
+
<%= f.number_field :purchased_amount, :step => :any, :id => 'payment_amount', :class => 'form-control' %>
|
18
18
|
<p class="help-block">Currency: <%= @invoice.present? ? @invoice.currency : @account.currency %></p>
|
19
19
|
</div>
|
20
20
|
</div>
|
@@ -126,8 +126,8 @@
|
|
126
126
|
<% end %>
|
127
127
|
<% (transaction.properties || []).sort_by { |p| p.key }.each do |property| %>
|
128
128
|
<% next if property.value.blank? %>
|
129
|
-
<li><%= property.key
|
130
|
-
|
129
|
+
<li><strong><%= property.key %>:</strong>
|
130
|
+
<%= is_json?(property.value) ? "<pre>#{JSON.pretty_generate(JSON.parse(property.value))}</pre>".html_safe : property.value %></li>
|
131
131
|
<% end %>
|
132
132
|
</ul>
|
133
133
|
</td>
|
@@ -46,7 +46,9 @@ $(document).ready(function() {
|
|
46
46
|
"paging": false,
|
47
47
|
"ajax": "<%= payments_pagination_path :format => :json %>",
|
48
48
|
<% end %>
|
49
|
-
<%
|
49
|
+
<% if @search_query.blank? %>
|
50
|
+
"ordering": false,
|
51
|
+
<% elsif !@ordering.blank? %>
|
50
52
|
"order": [[ 0, "<%= @ordering %>" ]],
|
51
53
|
<% end %>
|
52
54
|
"processing": true,
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="form-group">
|
10
10
|
<%= label_tag :price_override, 'Price Override', :class => 'col-sm-3 control-label' %>
|
11
11
|
<div class="col-sm-9">
|
12
|
-
<%= number_field_tag :price_override, nil, :class => 'form-control' %>
|
12
|
+
<%= number_field_tag :price_override, nil, :step => :any, :class => 'form-control' %>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
15
|
<div class="form-group">
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<div class="form-group">
|
38
38
|
<%= label_tag :price_override, 'Price Override', :class => 'col-sm-2 control-label' %>
|
39
39
|
<div class="col-sm-10">
|
40
|
-
<%= number_field_tag :price_override, nil, :class => 'form-control' %>
|
40
|
+
<%= number_field_tag :price_override, nil, :step => :any, :class => 'form-control' %>
|
41
41
|
</div>
|
42
42
|
</div>
|
43
43
|
<div class="form-group">
|
@@ -4,8 +4,8 @@
|
|
4
4
|
<% unless @available_subscription_tags.blank? && @custom_fields_per_subscription.blank? %>
|
5
5
|
<th></th>
|
6
6
|
<% end %>
|
7
|
-
<th>
|
8
|
-
<th>
|
7
|
+
<th>Category</th>
|
8
|
+
<th>Name</th>
|
9
9
|
<th>Phase type</th>
|
10
10
|
<th>Start date</th>
|
11
11
|
<th>Charged through date</th>
|
@@ -47,7 +47,7 @@
|
|
47
47
|
<%= humanized_subscription_product_category(sub) %>
|
48
48
|
</span>
|
49
49
|
</td>
|
50
|
-
<td><%=
|
50
|
+
<td><%= humanized_subscription_plan_or_product_name(sub, catalog) %></td>
|
51
51
|
<td><%= humanized_subscription_phase_type(sub) %></td>
|
52
52
|
<td><%= humanized_subscription_start_date(sub, account) %></td>
|
53
53
|
<td><%= humanized_subscription_charged_through_date(sub, account) %></td>
|