kaui 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Gemfile +1 -1
- data/README.md +10 -15
- data/app/assets/images/kaui/duck.png +0 -0
- data/app/assets/images/kaui/logo.png +0 -0
- data/app/assets/images/kaui/search.png +0 -0
- data/app/assets/images/kaui/search_white.png +0 -0
- data/app/assets/javascripts/application.js +3 -0
- data/app/assets/javascripts/kaui/bootstrap-tweaks.js +3 -0
- data/app/assets/javascripts/kaui/kaui.js +99 -0
- data/app/assets/stylesheets/application.css +3 -1
- data/app/assets/stylesheets/bootstrap_and_overrides.less +39 -0
- data/app/assets/stylesheets/kaui/common.less +538 -0
- data/app/assets/stylesheets/kaui/datatable.less +75 -0
- data/app/assets/stylesheets/kaui/header.less +186 -0
- data/app/assets/stylesheets/kaui/home.less +82 -0
- data/app/assets/stylesheets/kaui/invoice.less +54 -0
- data/app/assets/stylesheets/kaui/kaui.less +16 -0
- data/app/assets/stylesheets/kaui/payment.less +29 -0
- data/app/assets/stylesheets/kaui/subscription.less +5 -0
- data/app/assets/stylesheets/kaui/tags.less +175 -0
- data/app/assets/stylesheets/kaui/timeline.less +4 -0
- data/app/controllers/kaui/account_emails_controller.rb +18 -18
- data/app/controllers/kaui/account_tags_controller.rb +8 -30
- data/app/controllers/kaui/account_timelines_controller.rb +13 -23
- data/app/controllers/kaui/accounts_controller.rb +65 -62
- data/app/controllers/kaui/admin_allowed_users_controller.rb +48 -32
- data/app/controllers/kaui/admin_tenants_controller.rb +147 -142
- data/app/controllers/kaui/bundle_tags_controller.rb +9 -33
- data/app/controllers/kaui/bundles_controller.rb +23 -62
- data/app/controllers/kaui/chargebacks_controller.rb +5 -11
- data/app/controllers/kaui/charges_controller.rb +11 -18
- data/app/controllers/kaui/credits_controller.rb +19 -22
- data/app/controllers/kaui/custom_fields_controller.rb +44 -16
- data/app/controllers/kaui/engine_controller.rb +56 -3
- data/app/controllers/kaui/engine_controller_util.rb +75 -1
- data/app/controllers/kaui/home_controller.rb +19 -0
- data/app/controllers/kaui/invoice_items_controller.rb +16 -21
- data/app/controllers/kaui/invoices_controller.rb +31 -53
- data/app/controllers/kaui/payment_methods_controller.rb +14 -46
- data/app/controllers/kaui/payments_controller.rb +60 -69
- data/app/controllers/kaui/refunds_controller.rb +11 -25
- data/app/controllers/kaui/registrations_controller.rb +38 -0
- data/app/controllers/kaui/subscriptions_controller.rb +82 -95
- data/app/controllers/kaui/tag_definitions_controller.rb +1 -5
- data/app/controllers/kaui/tags_controller.rb +17 -17
- data/app/controllers/kaui/tenants_controller.rb +38 -55
- data/app/controllers/kaui/transactions_controller.rb +8 -15
- data/app/helpers/kaui/application_helper.rb +4 -0
- data/app/helpers/kaui/object_helper.rb +24 -0
- data/app/helpers/kaui/payment_method_helper.rb +9 -0
- data/app/helpers/kaui/subscription_helper.rb +1 -1
- data/app/helpers/kaui/uuid_helper.rb +1 -0
- data/app/models/kaui/ability.rb +7 -1
- data/app/models/kaui/account.rb +6 -2
- data/app/models/kaui/account_email.rb +10 -0
- data/app/models/kaui/allowed_user.rb +16 -4
- data/app/models/kaui/audit_log.rb +5 -3
- data/app/models/kaui/bundle.rb +6 -11
- data/app/models/kaui/credit.rb +3 -0
- data/app/models/kaui/invoice.rb +10 -15
- data/app/models/kaui/invoice_payment.rb +10 -13
- data/app/models/kaui/killbill_registerable.rb +7 -0
- data/app/models/kaui/payment.rb +19 -12
- data/app/models/kaui/payment_method.rb +9 -0
- data/app/models/kaui/payment_state.rb +52 -0
- data/app/models/kaui/tag.rb +14 -0
- data/app/models/kaui/tag_definition.rb +8 -2
- data/app/models/kaui/user.rb +5 -4
- data/app/views/kaui/account_emails/_account_emails_table.html.erb +12 -9
- data/app/views/kaui/account_emails/_form.html.erb +9 -9
- data/app/views/kaui/account_emails/new.html.erb +9 -2
- data/app/views/kaui/account_tags/_form.html.erb +20 -29
- data/app/views/kaui/account_tags/_form_bar.html.erb +21 -0
- data/app/views/kaui/account_tags/edit.html.erb +9 -4
- data/app/views/kaui/account_timelines/show.html.erb +204 -287
- data/app/views/kaui/accounts/_account_info.html.erb +108 -0
- data/app/views/kaui/accounts/_billing_info.html.erb +129 -0
- data/app/views/kaui/accounts/_form.html.erb +127 -115
- data/app/views/kaui/accounts/_payment_methods.html.erb +28 -0
- data/app/views/kaui/accounts/edit.html.erb +10 -0
- data/app/views/kaui/accounts/index.html.erb +38 -23
- data/app/views/kaui/accounts/new.html.erb +9 -4
- data/app/views/kaui/accounts/show.html.erb +4 -106
- data/app/views/kaui/admin_allowed_users/_form.html.erb +19 -0
- data/app/views/kaui/admin_allowed_users/index.html.erb +35 -18
- data/app/views/kaui/admin_allowed_users/new.html.erb +9 -21
- data/app/views/kaui/admin_allowed_users/show.html.erb +42 -50
- data/app/views/kaui/admin_tenants/_form.html.erb +25 -0
- data/app/views/kaui/admin_tenants/_tenants_table.html.erb +27 -0
- data/app/views/kaui/admin_tenants/index.html.erb +14 -23
- data/app/views/kaui/admin_tenants/new.html.erb +8 -37
- data/app/views/kaui/admin_tenants/show.html.erb +128 -113
- data/app/views/kaui/bundle_tags/_form.html.erb +20 -28
- data/app/views/kaui/bundle_tags/_form_bar.html.erb +21 -0
- data/app/views/kaui/bundle_tags/edit.html.erb +9 -4
- data/app/views/kaui/bundles/index.html.erb +76 -29
- data/app/views/kaui/bundles/transfer.html.erb +28 -28
- data/app/views/kaui/chargebacks/_form.html.erb +31 -29
- data/app/views/kaui/chargebacks/new.html.erb +9 -4
- data/app/views/kaui/charges/_form.html.erb +35 -59
- data/app/views/kaui/charges/new.html.erb +9 -4
- data/app/views/kaui/credits/_form.html.erb +32 -59
- data/app/views/kaui/credits/new.html.erb +9 -4
- data/app/views/kaui/custom_fields/_form.html.erb +31 -0
- data/app/views/kaui/custom_fields/index.html.erb +33 -20
- data/app/views/kaui/custom_fields/new.html.erb +10 -0
- data/app/views/kaui/home/index.html.erb +12 -9
- data/app/views/kaui/invoice_items/_edit_form.html.erb +30 -0
- data/app/views/kaui/invoice_items/edit.html.erb +10 -91
- data/app/views/kaui/invoices/_invoice_table.html.erb +113 -0
- data/app/views/kaui/invoices/index.html.erb +31 -22
- data/app/views/kaui/invoices/show.html.erb +77 -91
- data/app/views/kaui/layouts/kaui_account_navbar.html.erb +11 -0
- data/app/views/kaui/layouts/kaui_application.html.erb +14 -53
- data/app/views/kaui/layouts/kaui_flash.html.erb +17 -0
- data/app/views/kaui/layouts/kaui_footer.html.erb +2 -0
- data/app/views/kaui/layouts/kaui_header.html.erb +17 -0
- data/app/views/kaui/layouts/kaui_navbar.html.erb +75 -0
- data/app/views/kaui/payment_methods/_form.html.erb +26 -23
- data/app/views/kaui/payment_methods/_new_creditcard_payment_method.html.erb +46 -41
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +25 -0
- data/app/views/kaui/payment_methods/_payment_methods_table.html.erb +50 -52
- data/app/views/kaui/payment_methods/new.html.erb +9 -4
- data/app/views/kaui/payments/_form.html.erb +55 -0
- data/app/views/kaui/payments/_payment_table.html.erb +117 -0
- data/app/views/kaui/payments/index.html.erb +31 -22
- data/app/views/kaui/payments/new.html.erb +9 -92
- data/app/views/kaui/payments/show.html.erb +38 -2
- data/app/views/kaui/refunds/_form.html.erb +240 -0
- data/app/views/kaui/refunds/new.html.erb +8 -280
- data/app/views/kaui/registrations/_form.html.erb +19 -0
- data/app/views/kaui/registrations/new.html.erb +10 -0
- data/app/views/kaui/sessions/_form.html.erb +19 -0
- data/app/views/kaui/sessions/new.html.erb +7 -18
- data/app/views/kaui/subscriptions/_edit_form.html.erb +26 -0
- data/app/views/kaui/subscriptions/_form.html.erb +34 -31
- data/app/views/kaui/subscriptions/_subscriptions_table.html.erb +37 -24
- data/app/views/kaui/subscriptions/edit.html.erb +10 -30
- data/app/views/kaui/subscriptions/new.html.erb +14 -11
- data/app/views/kaui/tag_definitions/_form.html.erb +14 -11
- data/app/views/kaui/tag_definitions/index.html.erb +56 -30
- data/app/views/kaui/tag_definitions/new.html.erb +9 -2
- data/app/views/kaui/tags/_tags_table.html.erb +7 -10
- data/app/views/kaui/tags/index.html.erb +29 -20
- data/app/views/kaui/tenants/_form.html.erb +13 -0
- data/app/views/kaui/tenants/index.html.erb +9 -16
- data/app/views/kaui/transactions/_form.html.erb +47 -67
- data/app/views/kaui/transactions/new.html.erb +9 -2
- data/config/initializers/killbill_registerable.rb +4 -0
- data/config/routes.rb +88 -93
- data/kaui.gemspec +11 -2
- data/lib/kaui/engine.rb +6 -4
- data/lib/kaui/version.rb +1 -1
- data/lib/kaui.rb +24 -1
- data/test/dummy/config/application.rb +2 -0
- data/test/dummy/config/database.yml +6 -3
- data/test/dummy/config/initializers/killbill_client.rb +0 -2
- data/test/fixtures/catalog-v1.xml +74 -0
- data/test/fixtures/catalog_translation_fr-v1.properties +1 -0
- data/test/fixtures/invoice_template-v1.html +100 -0
- data/test/fixtures/invoice_translation_fr-v1.properties +23 -0
- data/test/fixtures/overdue-v1.xml +49 -0
- data/test/fixtures/stripe.yml +2 -0
- data/test/functional/kaui/account_emails_controller_test.rb +35 -8
- data/test/functional/kaui/account_tags_controller_test.rb +8 -8
- data/test/functional/kaui/account_timelines_controller_test.rb +6 -7
- data/test/functional/kaui/accounts_controller_test.rb +72 -10
- data/test/functional/kaui/admin_allowed_users_controller_test.rb +6 -5
- data/test/functional/kaui/admin_tenants_controller_test.rb +104 -48
- data/test/functional/kaui/bundle_tags_controller_test.rb +14 -9
- data/test/functional/kaui/bundles_controller_test.rb +59 -23
- data/test/functional/kaui/chargebacks_controller_test.rb +29 -7
- data/test/functional/kaui/charges_controller_test.rb +31 -10
- data/test/functional/kaui/credits_controller_test.rb +25 -6
- data/test/functional/kaui/custom_fields_controller_test.rb +25 -1
- data/test/functional/kaui/functional_test_helper_nosetup.rb +6 -4
- data/test/functional/kaui/home_controller_test.rb +24 -0
- data/test/functional/kaui/invoice_items_controller_test.rb +56 -8
- data/test/functional/kaui/invoices_controller_test.rb +27 -18
- data/test/functional/kaui/payment_methods_controller_test.rb +2 -22
- data/test/functional/kaui/payments_controller_test.rb +8 -3
- data/test/functional/kaui/refunds_controller_test.rb +40 -21
- data/test/functional/kaui/subscriptions_controller_test.rb +77 -24
- data/test/functional/kaui/tag_definitions_controller_test.rb +1 -7
- data/test/functional/kaui/tags_controller_test.rb +1 -1
- data/test/functional/kaui/tenants_controller_test.rb +9 -9
- data/test/functional/kaui/transactions_controller_test.rb +41 -16
- data/test/integration/kaui/integration_test_helper.rb +0 -1
- data/test/integration/kaui/navigation_test.rb +4 -6
- data/test/test_helper.rb +2 -0
- metadata +155 -28
- data/Gemfile.lock +0 -210
- data/app/assets/stylesheets/bootstrap_and_overrides.css +0 -7
- data/app/assets/stylesheets/datatables.scss +0 -14
- data/app/assets/stylesheets/layout.scss +0 -19
- data/app/views/kaui/account_emails/show.html.erb +0 -25
- data/app/views/kaui/account_tags/_account_tags_table.html.erb +0 -32
- data/app/views/kaui/account_tags/show.html.erb +0 -6
- data/app/views/kaui/account_timelines/index.html.erb +0 -14
- data/app/views/kaui/bundle_tags/_bundle_tags_table.html.erb +0 -31
- data/app/views/kaui/bundle_tags/show.html.erb +0 -6
- data/app/views/kaui/bundles/show.html.erb +0 -18
- data/app/views/kaui/payment_methods/index.html.erb +0 -30
- data/app/views/kaui/payment_methods/show.html.erb +0 -3
- data/app/views/kaui/payments/_payments_table.html.erb +0 -41
- data/app/views/kaui/subscriptions/index.html.erb +0 -15
- data/app/views/kaui/subscriptions/show.html.erb +0 -33
- data/app/views/kaui/tag_definitions/show.html.erb +0 -15
- data/vendor/assets/images/img/glyphicons-halflings-white.png +0 -0
- data/vendor/assets/images/img/glyphicons-halflings.png +0 -0
- data/vendor/assets/stylesheets/css/bootstrap-datepicker.cd46d38.css +0 -274
@@ -1,38 +1,40 @@
|
|
1
|
-
<%= form_for
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</div>
|
1
|
+
<%= form_for @chargeback, :url => {:action => :create}, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :payment_id %>
|
3
|
+
<%= f.hidden_field :currency %>
|
4
|
+
|
5
|
+
<div class="form-group">
|
6
|
+
<%= f.label :amount, 'Amount', :class => 'col-sm-2 control-label' %>
|
7
|
+
<div class="col-sm-10">
|
8
|
+
<%= f.text_field :amount, :id => 'chargeback_amount', :class => 'form-control' %>
|
9
|
+
<p class="help-block">Currency: <%= @chargeback.currency %></p>
|
11
10
|
</div>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
</div>
|
12
|
+
<div class="form-group">
|
13
|
+
<%= label_tag :reason, 'Reason', :class => 'col-sm-2 control-label' %>
|
14
|
+
<div class="col-sm-10">
|
15
|
+
<%= select_tag :reason, options_for_select(Kaui::Chargeback::SAMPLE_REASON_CODES), :class => 'form-control' %>
|
17
16
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
17
|
+
</div>
|
18
|
+
<div class="form-group">
|
19
|
+
<div class="col-sm-offset-2 col-sm-10">
|
20
|
+
<div class="checkbox">
|
21
|
+
<%= label_tag :cancel_all_subs do %>
|
22
|
+
<%= check_box_tag :cancel_all_subs %>Cancel account subscriptions?
|
23
|
+
<% end %>
|
24
24
|
</div>
|
25
25
|
</div>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
</div>
|
27
|
+
<div class="form-group">
|
28
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
29
|
+
<div class="col-sm-10">
|
30
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
31
31
|
</div>
|
32
|
-
|
33
|
-
|
32
|
+
</div>
|
33
|
+
<div class="form-group">
|
34
|
+
<div class="col-sm-offset-2 col-sm-10">
|
35
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
34
36
|
</div>
|
35
|
-
</
|
37
|
+
</div>
|
36
38
|
<% end %>
|
37
39
|
|
38
40
|
<%= javascript_tag do %>
|
@@ -1,5 +1,10 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Process chargeback</h1>
|
6
|
+
<%= render 'form' %>
|
7
|
+
</div>
|
4
8
|
|
5
|
-
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,69 +1,45 @@
|
|
1
|
-
<%= form_for
|
2
|
-
<%= f.hidden_field :
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
<%= @invoice.invoice_number %><br/>
|
12
|
-
</label>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="control-group">
|
16
|
-
<label class="control-label">Invoice amount</label>
|
17
|
-
<div class="controls">
|
18
|
-
<label class="checkbox">
|
19
|
-
<%= @invoice.amount %> <%= @invoice.currency %>
|
20
|
-
</label>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div class="control-group">
|
24
|
-
<label class="control-label">Balance</label>
|
25
|
-
<div class="controls">
|
26
|
-
<label class="checkbox">
|
27
|
-
<%= @invoice.balance.nil? ? '0.00' : @invoice.balance %> <%= @invoice.currency %>
|
28
|
-
</label>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<% end %>
|
32
|
-
<div class="control-group">
|
33
|
-
<%= f.label :amount, 'Charge amount', :class => 'control-label' %>
|
34
|
-
<div class="controls">
|
35
|
-
<%= f.text_field :amount, :id => 'charge_amount', :class => 'input-sm' %>
|
36
|
-
<% if @invoice.present? %>
|
37
|
-
<p class="help-inline"><%= @invoice.currency %></p>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
1
|
+
<%= form_for @charge, :url => {:action => :create}, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :invoice_id %>
|
3
|
+
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label :amount, 'Amount', :class => 'col-sm-2 control-label' %>
|
6
|
+
<div class="col-sm-10">
|
7
|
+
<%= f.text_field :amount, :id => 'charge_amount', :class => 'form-control' %>
|
8
|
+
<% if @invoice.present? %>
|
9
|
+
<p class="help-block">Currency: <%= @invoice.currency %></p>
|
10
|
+
<% end %>
|
40
11
|
</div>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
12
|
+
</div>
|
13
|
+
<% unless @invoice.present? %>
|
14
|
+
<div class="form-group">
|
15
|
+
<%= f.label :currency, 'Currency', :class => 'col-sm-2 control-label' %>
|
16
|
+
<div class="col-sm-10">
|
17
|
+
<%= f.select :currency, currencies, {}, :class => 'form-control' %>
|
47
18
|
</div>
|
48
|
-
<% end %>
|
49
|
-
<div class="control-group">
|
50
|
-
<%= label_tag :comment, 'Comment', :class => 'control-label' %>
|
51
|
-
<div class="controls">
|
52
|
-
<%= text_area_tag :comment, '', :rows => 3, :class => 'input-xlarge' %>
|
53
19
|
</div>
|
20
|
+
<% else %>
|
21
|
+
<!--https://github.com/killbill/killbill/issues/388-->
|
22
|
+
<%= f.hidden_field :currency %>
|
23
|
+
<% end %>
|
24
|
+
<div class="form-group">
|
25
|
+
<%= f.label :description, 'Description', :class => 'col-sm-2 control-label' %>
|
26
|
+
<div class="col-sm-10">
|
27
|
+
<%= f.text_area :description, :rows => 3, :class => 'form-control' %>
|
54
28
|
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
29
|
+
</div>
|
30
|
+
<div class="form-group">
|
31
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
32
|
+
<div class="col-sm-10">
|
33
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
60
34
|
</div>
|
61
|
-
|
62
|
-
|
63
|
-
|
35
|
+
</div>
|
36
|
+
<div class="form-group">
|
37
|
+
<div class="col-sm-offset-2 col-sm-10">
|
38
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
64
39
|
</div>
|
65
|
-
</
|
40
|
+
</div>
|
66
41
|
<% end %>
|
42
|
+
|
67
43
|
<%= javascript_tag do %>
|
68
44
|
$(document).ready(function() {
|
69
45
|
$("#charge_amount").keydown(function(event) {
|
@@ -1,5 +1,10 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Add new charge</h1>
|
6
|
+
<%= render 'form' %>
|
7
|
+
</div>
|
4
8
|
|
5
|
-
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -1,69 +1,42 @@
|
|
1
|
-
<%= form_for
|
2
|
-
<%= f.hidden_field :
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
<%= @invoice.invoice_number %><br/>
|
12
|
-
</label>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="control-group">
|
16
|
-
<label class="control-label">Invoice amount</label>
|
17
|
-
<div class="controls">
|
18
|
-
<label class="checkbox">
|
19
|
-
<%= @invoice.amount %> <%= @invoice.currency %>
|
20
|
-
</label>
|
21
|
-
</div>
|
22
|
-
</div>
|
23
|
-
<div class="control-group">
|
24
|
-
<label class="control-label">Balance</label>
|
25
|
-
<div class="controls">
|
26
|
-
<label class="checkbox">
|
27
|
-
<%= @invoice.balance.nil? ? '0.00' : @invoice.balance %> <%= @invoice.currency %>
|
28
|
-
</label>
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
<% end %>
|
32
|
-
<div class="control-group">
|
33
|
-
<%= f.label :credit_amount, 'Credit amount', :class => 'control-label' %>
|
34
|
-
<div class="controls">
|
35
|
-
<%= f.text_field :credit_amount, :id => 'credit_amount', :class => 'input-sm' %>
|
36
|
-
<% if @invoice.present? %>
|
37
|
-
<p class="help-inline"><%= @invoice.currency %></p>
|
38
|
-
<% end %>
|
39
|
-
</div>
|
1
|
+
<%= form_for @credit, :url => {:action => :create}, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :invoice_id %>
|
3
|
+
|
4
|
+
<div class="form-group">
|
5
|
+
<%= f.label :credit_amount, 'Amount', :class => 'col-sm-2 control-label' %>
|
6
|
+
<div class="col-sm-10">
|
7
|
+
<%= f.text_field :credit_amount, :id => 'credit_amount', :class => 'form-control' %>
|
8
|
+
<% if @invoice.present? %>
|
9
|
+
<p class="help-block">Currency: <%= @invoice.currency %></p>
|
10
|
+
<% end %>
|
40
11
|
</div>
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
12
|
+
</div>
|
13
|
+
<% unless @invoice.present? %>
|
14
|
+
<div class="form-group">
|
15
|
+
<%= f.label :currency, 'Currency', :class => 'col-sm-2 control-label' %>
|
16
|
+
<div class="col-sm-10">
|
17
|
+
<%= f.select :currency, currencies, {}, :class => 'form-control' %>
|
47
18
|
</div>
|
48
|
-
<% end %>
|
49
|
-
<div class="control-group">
|
50
|
-
<%= label_tag :reason, 'Reason', :class => 'control-label' %>
|
51
|
-
<div class="controls">
|
52
|
-
<%= select_tag :reason, options_for_select(Kaui::Credit::SAMPLE_REASON_CODES) %>
|
53
19
|
</div>
|
20
|
+
<% end %>
|
21
|
+
<div class="form-group">
|
22
|
+
<%= label_tag :reason, 'Reason', :class => 'col-sm-2 control-label' %>
|
23
|
+
<div class="col-sm-10">
|
24
|
+
<%= select_tag :reason, options_for_select(Kaui::Credit::SAMPLE_REASON_CODES), :class => 'form-control' %>
|
54
25
|
</div>
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
26
|
+
</div>
|
27
|
+
<div class="form-group">
|
28
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
29
|
+
<div class="col-sm-10">
|
30
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
60
31
|
</div>
|
61
|
-
|
62
|
-
|
63
|
-
|
32
|
+
</div>
|
33
|
+
<div class="form-group">
|
34
|
+
<div class="col-sm-offset-2 col-sm-10">
|
35
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
64
36
|
</div>
|
65
|
-
</
|
37
|
+
</div>
|
66
38
|
<% end %>
|
39
|
+
|
67
40
|
<%= javascript_tag do %>
|
68
41
|
$(document).ready(function() {
|
69
42
|
$("#credit_amount").keydown(function(event) {
|
@@ -1,5 +1,10 @@
|
|
1
|
-
<div class="
|
2
|
-
<
|
3
|
-
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Add new credit</h1>
|
6
|
+
<%= render 'form' %>
|
7
|
+
</div>
|
4
8
|
|
5
|
-
|
9
|
+
</div>
|
10
|
+
</div>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%= form_for @custom_field, :html => {:class => 'form-horizontal'} do |f| %>
|
2
|
+
<div class="form-group">
|
3
|
+
<%= f.label :object_id, 'Object ID', :class => 'col-sm-2 control-label' %>
|
4
|
+
<div class="col-sm-10">
|
5
|
+
<%= f.text_field :object_id, :class => 'form-control' %>
|
6
|
+
</div>
|
7
|
+
</div>
|
8
|
+
<div class="form-group">
|
9
|
+
<%= f.label :object_type, 'Object type', :class => 'col-sm-2 control-label' %>
|
10
|
+
<div class="col-sm-10">
|
11
|
+
<%= f.select :object_type, [:ACCOUNT, :BUNDLE, :SUBSCRIPTION, :INVOICE, :PAYMENT], {:selected => :account}, :class => 'form-control' %>
|
12
|
+
</div>
|
13
|
+
</div>
|
14
|
+
<div class="form-group">
|
15
|
+
<%= f.label :name, 'Name', :class => 'col-sm-2 control-label' %>
|
16
|
+
<div class="col-sm-10">
|
17
|
+
<%= f.text_field :name, :class => 'form-control' %>
|
18
|
+
</div>
|
19
|
+
</div>
|
20
|
+
<div class="form-group">
|
21
|
+
<%= f.label :value, 'Value', :class => 'col-sm-2 control-label' %>
|
22
|
+
<div class="col-sm-10">
|
23
|
+
<%= f.text_field :value, :class => 'form-control' %>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
<div class="form-group">
|
27
|
+
<div class="col-sm-offset-2 col-sm-10">
|
28
|
+
<%= submit_tag 'Save', :class => 'btn btn-default' %>
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
<% end %>
|
@@ -1,28 +1,41 @@
|
|
1
|
-
<
|
1
|
+
<div class="search">
|
2
2
|
|
3
|
-
<
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
</
|
3
|
+
<div class="column-block">
|
4
|
+
|
5
|
+
<h1>Custom Fields
|
6
|
+
<% if can? :add, Kaui::CustomField %>
|
7
|
+
<%= link_to ' <i class="fa fa-plus-square"></i>'.html_safe, new_custom_field_path %>
|
8
|
+
<% end %>
|
9
|
+
</h1>
|
10
|
+
|
11
|
+
<table id="custom_fields-table" class="table table-condensed mobile-data">
|
12
|
+
<thead>
|
13
|
+
<tr>
|
14
|
+
<th>Object ID</th>
|
15
|
+
<th>Object type</th>
|
16
|
+
<th>Name</th>
|
17
|
+
<th>Value</th>
|
18
|
+
</tr>
|
19
|
+
</thead>
|
20
|
+
<tbody>
|
21
|
+
<tr>
|
22
|
+
<td colspan="1" class="dataTables_empty">Loading data from server</td>
|
23
|
+
</tr>
|
24
|
+
</tbody>
|
25
|
+
</table>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
</div>
|
17
30
|
|
18
31
|
<%= javascript_tag do %>
|
19
32
|
$(document).ready(function() {
|
20
33
|
$('#custom_fields-table').dataTable({
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
"
|
25
|
-
"
|
34
|
+
"dom": "<'row'<'col-md-6'l><'col-md-6'f>r>t<'row'<'col-md-6'i><'col-md-6'p>>",
|
35
|
+
"pagingType": "full_numbers",
|
36
|
+
"processing": true,
|
37
|
+
"serverSide": true,
|
38
|
+
"ajax": "<%= custom_fields_pagination_path :format => :json %>"
|
26
39
|
});
|
27
40
|
});
|
28
41
|
<% end %>
|
@@ -1,10 +1,13 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
1
|
+
<div class="home">
|
2
|
+
<div class="row">
|
3
|
+
<div class="col-md-6 col-md-offset-3 text-center">
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
</
|
5
|
+
<%= form_tag search_path, :id => 'home_searchform', :method => 'get' do %>
|
6
|
+
<%= text_field_tag :q, @search_query, :id => 'search', :placeholder => 'What are you looking for?' %>
|
7
|
+
<%= submit_tag 'Search' %>
|
8
|
+
<% end %>
|
9
|
+
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<span class="duck_help">You can search accounts by ID, external key, name, company or email address.</span>
|
13
|
+
</div>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<%= form_for @invoice_item, :as => :invoice_item, :url => invoice_item_path(@invoice_item.invoice_item_id), :html => {:method => :put, :class => 'form-horizontal'} do |f| %>
|
2
|
+
<%= f.hidden_field :invoice_id %>
|
3
|
+
<%= f.hidden_field :invoice_item_id %>
|
4
|
+
<%= f.hidden_field :account_id %>
|
5
|
+
|
6
|
+
<div class="form-group">
|
7
|
+
<%= f.label :amount, 'Item amount', :class => 'col-sm-2 control-label' %>
|
8
|
+
<div class="col-sm-10">
|
9
|
+
<%= f.text_field :amount, :class => 'form-control' %>
|
10
|
+
<p class="help-block">Currency: <%= @invoice_item.currency %></p>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<div class="form-group">
|
14
|
+
<%= label_tag :reason, 'Reason', :class => 'col-sm-2 control-label' %>
|
15
|
+
<div class="col-sm-10">
|
16
|
+
<%= select_tag :reason, options_for_select(Kaui::InvoiceItem::SAMPLE_REASON_CODES), :class => 'form-control' %>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
<div class="form-group">
|
20
|
+
<%= label_tag :comment, 'Comment', :class => 'col-sm-2 control-label' %>
|
21
|
+
<div class="col-sm-10">
|
22
|
+
<%= text_area_tag :comment, nil, :rows => 3, :class => 'form-control' %>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
<div class="form-group">
|
26
|
+
<div class="col-sm-offset-2 col-sm-10">
|
27
|
+
<%= f.submit 'Save', :class => 'btn btn-default' %>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
<% end %>
|
@@ -1,91 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
<
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<div class="controls">
|
12
|
-
<%= f.text_field :invoice_id, :class => 'input-xlarge disabled', :readonly => true %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
<div class="control-group">
|
16
|
-
<%= f.label :account_id, 'Account id:', :class => 'control-label' %>
|
17
|
-
<div class="controls">
|
18
|
-
<%= f.text_field :account_id, :class => 'input-xlarge disabled', :readonly => true %>
|
19
|
-
</div>
|
20
|
-
</div>
|
21
|
-
<div class="control-group">
|
22
|
-
<%= f.label :bundle_id, 'Bundle id:', :class => 'control-label' %>
|
23
|
-
<div class="controls">
|
24
|
-
<%= f.text_field :bundle_id, :class => 'input-xlarge disabled', :readonly => true %>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
<div class="control-group">
|
28
|
-
<%= f.label :subscription_id, 'Subscription id:', :class => 'control-label' %>
|
29
|
-
<div class="controls">
|
30
|
-
<%= f.text_field :subscription_id, :class => 'input-xlarge disabled', :readonly => true %>
|
31
|
-
</div>
|
32
|
-
</div>
|
33
|
-
<div class="control-group">
|
34
|
-
<%= f.label :plan_name, 'Plan name:', :class => 'control-label' %>
|
35
|
-
<div class="controls">
|
36
|
-
<%= f.text_field :plan_name, :class => 'input-xlarge disabled', :readonly => true %>
|
37
|
-
</div>
|
38
|
-
</div>
|
39
|
-
<div class="control-group">
|
40
|
-
<%= f.label :phase_name, 'Phase name:', :class => 'control-label' %>
|
41
|
-
<div class="controls">
|
42
|
-
<%= f.text_field :phase_name, :class => 'input-xlarge disabled', :readonly => true %>
|
43
|
-
</div>
|
44
|
-
</div>
|
45
|
-
<div class="control-group">
|
46
|
-
<%= f.label :description, 'Description:', :class => 'control-label' %>
|
47
|
-
<div class="controls">
|
48
|
-
<%= f.text_field :description, :class => 'input-xlarge disabled', :readonly => true %>
|
49
|
-
</div>
|
50
|
-
</div>
|
51
|
-
<div class="control-group">
|
52
|
-
<%= f.label :start_date, 'Start date:', :class => 'control-label' %>
|
53
|
-
<div class="controls">
|
54
|
-
<%= f.text_field :start_date, :class => 'input-xlarge disabled', :readonly => true %>
|
55
|
-
</div>
|
56
|
-
</div>
|
57
|
-
<div class="control-group">
|
58
|
-
<%= f.label :end_date, 'End date:', :class => 'control-label' %>
|
59
|
-
<div class="controls">
|
60
|
-
<%= f.text_field :end_date, :class => 'input-xlarge disabled', :readonly => true %>
|
61
|
-
</div>
|
62
|
-
</div>
|
63
|
-
<div class="control-group">
|
64
|
-
<%= f.label :currency, 'Currency:', :class => 'control-label' %>
|
65
|
-
<div class="controls">
|
66
|
-
<%= f.text_field :currency, :class => 'input-xlarge disabled', :readonly => true %>
|
67
|
-
</div>
|
68
|
-
</div>
|
69
|
-
<div class="control-group">
|
70
|
-
<%= f.label :amount, 'Item amount', :class => 'control-label' %>
|
71
|
-
<div class="controls">
|
72
|
-
<%= f.text_field :amount, :class => 'input-sm' %>
|
73
|
-
<p class="help-inline"><%= @invoice_item.currency %></p>
|
74
|
-
</div>
|
75
|
-
</div>
|
76
|
-
<div class="control-group">
|
77
|
-
<%= label_tag :reason, 'Reason', :class => 'control-label' %>
|
78
|
-
<div class="controls">
|
79
|
-
<%= select_tag :reason, options_for_select(Kaui::InvoiceItem::SAMPLE_REASON_CODES) %>
|
80
|
-
</div>
|
81
|
-
</div>
|
82
|
-
<div class="control-group">
|
83
|
-
<%= label_tag :comment, 'Comment', :class => 'control-label' %>
|
84
|
-
<div class="controls">
|
85
|
-
<%= text_area_tag :comment, '', :rows => 3, :class => 'input-xlarge' %>
|
86
|
-
</div>
|
87
|
-
</div>
|
88
|
-
<div class="form-actions">
|
89
|
-
<%= f.submit 'Create adjustment', :class => 'btn btn-primary' %>
|
90
|
-
</div>
|
91
|
-
<% end %>
|
1
|
+
<div class="register">
|
2
|
+
<div class="col-md-8 col-md-offset-2">
|
3
|
+
|
4
|
+
<div class="column-block">
|
5
|
+
<h1>Adjust invoice item</h1>
|
6
|
+
<%= render 'edit_form' %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
</div>
|
10
|
+
</div>
|