kaui 2.1.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +8 -7
- data/Rakefile +4 -2
- data/app/assets/config/kaui_manifest.js +45 -0
- data/app/assets/javascripts/jquery.spin.js +76 -0
- data/app/assets/javascripts/kaui/kaui.js +76 -0
- data/app/assets/javascripts/kaui_application.js +25 -0
- data/app/assets/javascripts/spin.js +76 -0
- data/app/assets/stylesheets/bootstrap_and_overrides.scss +240 -0
- data/app/assets/stylesheets/kaui/{account.less → account.scss} +4 -0
- data/app/assets/stylesheets/kaui/{audit.less → audit.scss} +5 -1
- data/app/assets/stylesheets/kaui/{common.less → common.scss} +17 -15
- data/app/assets/stylesheets/kaui/{datatable.less → datatable.scss} +6 -3
- data/app/assets/stylesheets/kaui/{header.less → header.scss} +16 -12
- data/app/assets/stylesheets/kaui/{home.less → home.scss} +7 -4
- data/app/assets/stylesheets/kaui/{invoice.less → invoice.scss} +7 -3
- data/app/assets/stylesheets/kaui/kaui.scss +265 -0
- data/app/assets/stylesheets/kaui/kaui_bootstrap.scss +3 -0
- data/app/assets/stylesheets/kaui/{overdue.less → overdue.scss} +3 -1
- data/app/assets/stylesheets/kaui/{payment.less → payment.scss} +3 -0
- data/app/assets/stylesheets/kaui/{subscription.less → subscription.scss} +4 -1
- data/app/assets/stylesheets/kaui/{tags.less → tags.scss} +9 -5
- data/app/assets/stylesheets/kaui/timeline.scss +7 -0
- data/app/assets/stylesheets/kaui/tooltip.scss +15 -0
- data/app/controllers/kaui/account_children_controller.rb +25 -28
- data/app/controllers/kaui/account_custom_fields_controller.rb +16 -15
- data/app/controllers/kaui/account_emails_controller.rb +28 -25
- data/app/controllers/kaui/account_tags_controller.rb +37 -34
- data/app/controllers/kaui/account_timelines_controller.rb +38 -33
- data/app/controllers/kaui/accounts_controller.rb +268 -250
- data/app/controllers/kaui/admin_allowed_users_controller.rb +105 -99
- data/app/controllers/kaui/admin_controller.rb +32 -31
- data/app/controllers/kaui/admin_tenants_controller.rb +434 -388
- data/app/controllers/kaui/audit_logs_controller.rb +86 -83
- data/app/controllers/kaui/bundle_tags_controller.rb +24 -20
- data/app/controllers/kaui/bundles_controller.rb +96 -82
- data/app/controllers/kaui/chargebacks_controller.rb +36 -33
- data/app/controllers/kaui/charges_controller.rb +23 -20
- data/app/controllers/kaui/credits_controller.rb +28 -25
- data/app/controllers/kaui/custom_fields_controller.rb +172 -38
- data/app/controllers/kaui/engine_controller.rb +2 -1
- data/app/controllers/kaui/engine_controller_util.rb +130 -117
- data/app/controllers/kaui/home_controller.rb +230 -217
- data/app/controllers/kaui/invoice_items_controller.rb +43 -39
- data/app/controllers/kaui/invoice_tags_controller.rb +24 -20
- data/app/controllers/kaui/invoices_controller.rb +132 -117
- data/app/controllers/kaui/login_proxy_controller.rb +2 -1
- data/app/controllers/kaui/payment_methods_controller.rb +102 -94
- data/app/controllers/kaui/payments_controller.rb +95 -92
- data/app/controllers/kaui/queues_controller.rb +47 -14
- data/app/controllers/kaui/refunds_controller.rb +36 -33
- data/app/controllers/kaui/registrations_controller.rb +7 -7
- data/app/controllers/kaui/role_definitions_controller.rb +17 -14
- data/app/controllers/kaui/sessions_controller.rb +7 -4
- data/app/controllers/kaui/subscriptions_controller.rb +197 -187
- data/app/controllers/kaui/tag_definitions_controller.rb +28 -27
- data/app/controllers/kaui/tags_controller.rb +25 -22
- data/app/controllers/kaui/tenants_controller.rb +30 -28
- data/app/controllers/kaui/transactions_controller.rb +43 -38
- data/app/helpers/kaui/account_helper.rb +16 -14
- data/app/helpers/kaui/application_helper.rb +8 -3
- data/app/helpers/kaui/date_helper.rb +3 -2
- data/app/helpers/kaui/home_helper.rb +2 -0
- data/app/helpers/kaui/locale_helper.rb +7 -6
- data/app/helpers/kaui/money_helper.rb +2 -1
- data/app/helpers/kaui/object_helper.rb +11 -10
- data/app/helpers/kaui/payment_helper.rb +7 -6
- data/app/helpers/kaui/payment_method_helper.rb +3 -2
- data/app/helpers/kaui/permissions_helper.rb +9 -9
- data/app/helpers/kaui/plugin_helper.rb +25 -23
- data/app/helpers/kaui/subscription_helper.rb +27 -29
- data/app/helpers/kaui/us_states_helper.rb +7 -6
- data/app/helpers/kaui/uuid_helper.rb +7 -5
- data/app/models/kaui/ability.rb +19 -12
- data/app/models/kaui/account.rb +45 -28
- data/app/models/kaui/account_email.rb +23 -20
- data/app/models/kaui/account_timeline.rb +5 -1
- data/app/models/kaui/admin.rb +65 -64
- data/app/models/kaui/admin_tenant.rb +81 -82
- data/app/models/kaui/allowed_user.rb +13 -9
- data/app/models/kaui/allowed_user_tenant.rb +4 -2
- data/app/models/kaui/application_record.rb +2 -0
- data/app/models/kaui/audit_log.rb +6 -3
- data/app/models/kaui/base.rb +13 -7
- data/app/models/kaui/bundle.rb +41 -24
- data/app/models/kaui/catalog.rb +118 -113
- data/app/models/kaui/chargeback.rb +5 -1
- data/app/models/kaui/credit.rb +4 -1
- data/app/models/kaui/custom_field.rb +9 -6
- data/app/models/kaui/invoice.rb +25 -22
- data/app/models/kaui/invoice_item.rb +9 -6
- data/app/models/kaui/invoice_payment.rb +49 -54
- data/app/models/kaui/killbill_authenticatable.rb +14 -8
- data/app/models/kaui/killbill_registerable.rb +7 -0
- data/app/models/kaui/overdue.rb +64 -65
- data/app/models/kaui/payment.rb +22 -19
- data/app/models/kaui/payment_method.rb +48 -39
- data/app/models/kaui/payment_state.rb +41 -38
- data/app/models/kaui/rails_methods.rb +9 -9
- data/app/models/kaui/refund.rb +7 -1
- data/app/models/kaui/role_definition.rb +5 -1
- data/app/models/kaui/simple_plan.rb +5 -3
- data/app/models/kaui/subscription.rb +10 -7
- data/app/models/kaui/tag.rb +25 -22
- data/app/models/kaui/tag_definition.rb +50 -45
- data/app/models/kaui/tenant.rb +6 -5
- data/app/models/kaui/transaction.rb +43 -31
- data/app/models/kaui/user.rb +10 -16
- data/app/models/kaui/user_role.rb +8 -5
- data/app/views/kaui/accounts/_billing_info.html.erb +1 -1
- data/app/views/kaui/accounts/_form.html.erb +2 -2
- data/app/views/kaui/accounts/index.html.erb +2 -0
- data/app/views/kaui/admin_allowed_users/_form.html.erb +3 -3
- data/app/views/kaui/admin_tenants/_form_catalog_translation.erb +1 -1
- data/app/views/kaui/admin_tenants/_form_invoice_template.erb +1 -1
- data/app/views/kaui/admin_tenants/_form_invoice_translation.erb +1 -1
- data/app/views/kaui/admin_tenants/_show_catalog_simple.erb +11 -5
- data/app/views/kaui/admin_tenants/new_catalog.html.erb +2 -2
- data/app/views/kaui/admin_tenants/new_overdue_config.html.erb +2 -2
- data/app/views/kaui/admin_tenants/new_plan_currency.html.erb +1 -1
- data/app/views/kaui/bundles/index.html.erb +1 -1
- data/app/views/kaui/bundles/transfer.html.erb +13 -5
- data/app/views/kaui/invoices/_invoice_table.html.erb +1 -1
- data/app/views/kaui/layouts/kaui_flash.html.erb +24 -0
- data/app/views/kaui/layouts/kaui_header.html.erb +19 -2
- data/app/views/kaui/payment_methods/_payment_methods_details_table.html.erb +13 -4
- data/app/views/kaui/payments/_payment_table.html.erb +21 -11
- data/app/views/kaui/payments/index.html.erb +9 -9
- data/app/views/kaui/queues/index.html.erb +1 -1
- data/app/views/kaui/subscriptions/_cancel_by_date_modal.html.erb +1 -4
- 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/app/views/kaui/subscriptions/edit_bcd.erb +1 -1
- data/app/views/kaui/tag_definitions/index.html.erb +2 -2
- data/app/views/kaui/tags/index.html.erb +1 -0
- data/config/initializers/bootstrap_datepicker_rails.rb +3 -0
- data/config/initializers/devise.rb +8 -6
- data/config/initializers/js_routes.rb +9 -0
- data/config/initializers/kilbill_client_init.rb +13 -0
- data/config/initializers/killbill_authenticatable.rb +71 -21
- data/config/initializers/killbill_registerable.rb +5 -3
- data/config/initializers/time_formats.rb +6 -4
- data/config/locales/en.yml +78 -1
- data/config/routes.rb +34 -32
- data/db/migrate/20130812155313_devise_create_kaui_users.rb +10 -8
- data/db/migrate/20150109214021_create_kaui_tenants.rb +10 -8
- data/db/migrate/20150112232813_create_kaui_allowed_users.rb +10 -8
- data/lib/generators/kaui/install/install_generator.rb +23 -20
- data/lib/generators/kaui/install/templates/config/initializers/kaui.rb +3 -1
- data/lib/kaui/engine.rb +17 -5
- data/lib/kaui/installer/installer.rb +27 -26
- data/lib/kaui/version.rb +3 -1
- data/lib/kaui.rb +26 -37
- data/lib/tasks/kaui_tasks.rake +1 -0
- metadata +140 -442
- data/app/assets/javascripts/application.js +0 -17
- data/app/assets/javascripts/kaui/bootstrap-tweaks.js +0 -172
- data/app/assets/stylesheets/bootstrap_and_overrides.css.less +0 -44
- data/app/assets/stylesheets/kaui/kaui.less +0 -21
- data/app/assets/stylesheets/kaui/timeline.less +0 -4
- data/config/initializers/asset.rb +0 -1
- data/config/initializers/kilbill-client-init.rb +0 -9
- data/db/schema.rb +0 -15
- data/test/dummy/README.rdoc +0 -261
- data/test/dummy/Rakefile +0 -7
- data/test/dummy/app/controllers/application_controller.rb +0 -9
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/bin/bundle +0 -3
- data/test/dummy/bin/rails +0 -4
- data/test/dummy/bin/rake +0 -4
- data/test/dummy/bin/setup +0 -38
- data/test/dummy/bin/update +0 -29
- data/test/dummy/bin/yarn +0 -11
- data/test/dummy/config/application.rb +0 -18
- data/test/dummy/config/boot.rb +0 -3
- data/test/dummy/config/database.yml +0 -27
- data/test/dummy/config/environment.rb +0 -5
- data/test/dummy/config/environments/development.rb +0 -58
- data/test/dummy/config/environments/production.rb +0 -91
- data/test/dummy/config/environments/test.rb +0 -49
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -6
- data/test/dummy/config/initializers/assets.rb +0 -14
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/test/dummy/config/initializers/inflections.rb +0 -16
- data/test/dummy/config/initializers/killbill_client.rb +0 -1
- data/test/dummy/config/initializers/mime_types.rb +0 -4
- data/test/dummy/config/initializers/money.rb +0 -2
- data/test/dummy/config/initializers/new_framework_defaults_5_1.rb +0 -14
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/test/dummy/config/locales/en.yml +0 -33
- data/test/dummy/config/routes.rb +0 -3
- data/test/dummy/config/secrets.yml +0 -32
- data/test/dummy/config/symmetric-encryption.yml +0 -135
- data/test/dummy/config.ru +0 -4
- data/test/dummy/db/schema.rb +0 -52
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/fixtures/SpyCarAdvanced.xml +0 -824
- data/test/fixtures/catalog-v1.xml +0 -73
- data/test/fixtures/catalog_translation_fr-v1.properties +0 -1
- data/test/fixtures/invoice_template-v1.html +0 -100
- data/test/fixtures/invoice_translation_fr-v1.properties +0 -23
- data/test/fixtures/overdue-v1.xml +0 -49
- data/test/fixtures/stripe.yml +0 -2
- data/test/functional/kaui/account_children_controller_test.rb +0 -32
- data/test/functional/kaui/account_custom_fields_controller_test.rb +0 -29
- data/test/functional/kaui/account_emails_controller_test.rb +0 -55
- data/test/functional/kaui/account_tags_controller_test.rb +0 -48
- data/test/functional/kaui/account_timelines_controller_test.rb +0 -20
- data/test/functional/kaui/accounts_controller_test.rb +0 -297
- data/test/functional/kaui/admin_allowed_users_controller_test.rb +0 -234
- data/test/functional/kaui/admin_controller_test.rb +0 -45
- data/test/functional/kaui/admin_tenants_controller_test.rb +0 -352
- data/test/functional/kaui/audit_logs_controller_test.rb +0 -71
- data/test/functional/kaui/bundle_tags_controller_test.rb +0 -23
- data/test/functional/kaui/bundles_controller_test.rb +0 -130
- data/test/functional/kaui/chargebacks_controller_test.rb +0 -42
- data/test/functional/kaui/charges_controller_test.rb +0 -60
- data/test/functional/kaui/credits_controller_test.rb +0 -54
- data/test/functional/kaui/custom_fields_controller_test.rb +0 -52
- data/test/functional/kaui/functional_test_helper.rb +0 -13
- data/test/functional/kaui/functional_test_helper_nosetup.rb +0 -120
- data/test/functional/kaui/home_controller_test.rb +0 -407
- data/test/functional/kaui/invoice_items_controller_test.rb +0 -82
- data/test/functional/kaui/invoices_controller_test.rb +0 -88
- data/test/functional/kaui/login_proxy_controller_test.rb +0 -12
- data/test/functional/kaui/payment_methods_controller_test.rb +0 -52
- data/test/functional/kaui/payments_controller_test.rb +0 -59
- data/test/functional/kaui/queues_controller_test.rb +0 -17
- data/test/functional/kaui/refunds_controller_test.rb +0 -63
- data/test/functional/kaui/registrations_controller_test.rb +0 -49
- data/test/functional/kaui/role_definitions_controller_test.rb +0 -47
- data/test/functional/kaui/subscriptions_controller_test.rb +0 -194
- data/test/functional/kaui/tag_definitions_controller_test.rb +0 -29
- data/test/functional/kaui/tags_controller_test.rb +0 -21
- data/test/functional/kaui/tenants_controller_test.rb +0 -60
- data/test/functional/kaui/transactions_controller_test.rb +0 -90
- data/test/integration/kaui/date_helper_integration_test.rb +0 -16
- data/test/integration/kaui/integration_test_helper.rb +0 -32
- data/test/integration/kaui/navigation_test.rb +0 -43
- data/test/killbill_test_helper.rb +0 -219
- data/test/test_helper.rb +0 -22
- data/test/unit/helpers/kaui/admin_allowed_users_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/admin_tenants_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/payment_method_helper_test.rb +0 -17
- data/test/unit/helpers/kaui/tenants_helper_test.rb +0 -6
- data/test/unit/helpers/kaui/uuid_helper_test.rb +0 -16
- data/test/unit/kaui/account_email_test.rb +0 -19
- data/test/unit/kaui/account_test.rb +0 -14
- data/test/unit/kaui/admin_tenant_test.rb +0 -132
- data/test/unit/kaui/allowed_user_test.rb +0 -34
- data/test/unit/kaui/base_test.rb +0 -23
- data/test/unit/kaui/date_helper_test.rb +0 -26
- data/test/unit/kaui/invoice_item_test.rb +0 -11
- data/test/unit/kaui/invoice_payment_test.rb +0 -42
- data/test/unit/kaui/invoice_test.rb +0 -20
- data/test/unit/kaui/money_helper_test.rb +0 -16
- data/test/unit/kaui/payment_test.rb +0 -42
- data/test/unit/kaui/tag_definition_test.rb +0 -11
- data/test/unit/kaui/tenant_test.rb +0 -19
- /data/app/assets/stylesheets/{application.css → kaui_application.css} +0 -0
@@ -1,73 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
-
<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
3
|
-
xsi:noNamespaceSchemaLocation="CatalogSchema.xsd ">
|
4
|
-
<effectiveDate>2013-02-08T00:00:00+00:00</effectiveDate>
|
5
|
-
<catalogName>Movies</catalogName>
|
6
|
-
<recurringBillingMode>IN_ADVANCE</recurringBillingMode>
|
7
|
-
<currencies>
|
8
|
-
<currency>USD</currency>
|
9
|
-
</currencies>
|
10
|
-
<products>
|
11
|
-
<product name="Basic">
|
12
|
-
<category>BASE</category>
|
13
|
-
</product>
|
14
|
-
</products>
|
15
|
-
<rules>
|
16
|
-
<changePolicy>
|
17
|
-
<changePolicyCase>
|
18
|
-
<policy>END_OF_TERM</policy>
|
19
|
-
</changePolicyCase>
|
20
|
-
</changePolicy>
|
21
|
-
<changeAlignment>
|
22
|
-
<changeAlignmentCase>
|
23
|
-
<alignment>START_OF_BUNDLE</alignment>
|
24
|
-
</changeAlignmentCase>
|
25
|
-
</changeAlignment>
|
26
|
-
<cancelPolicy>
|
27
|
-
<cancelPolicyCase>
|
28
|
-
<policy>END_OF_TERM</policy>
|
29
|
-
</cancelPolicyCase>
|
30
|
-
</cancelPolicy>
|
31
|
-
<createAlignment>
|
32
|
-
<createAlignmentCase>
|
33
|
-
<alignment>START_OF_BUNDLE</alignment>
|
34
|
-
</createAlignmentCase>
|
35
|
-
</createAlignment>
|
36
|
-
<billingAlignment>
|
37
|
-
<billingAlignmentCase>
|
38
|
-
<alignment>ACCOUNT</alignment>
|
39
|
-
</billingAlignmentCase>
|
40
|
-
</billingAlignment>
|
41
|
-
<priceList>
|
42
|
-
<priceListCase>
|
43
|
-
<toPriceList>DEFAULT</toPriceList>
|
44
|
-
</priceListCase>
|
45
|
-
</priceList>
|
46
|
-
</rules>
|
47
|
-
<plans>
|
48
|
-
<plan name="basic-monthly">
|
49
|
-
<product>Basic</product>
|
50
|
-
<finalPhase type="EVERGREEN">
|
51
|
-
<duration>
|
52
|
-
<unit>UNLIMITED</unit>
|
53
|
-
</duration>
|
54
|
-
<recurring>
|
55
|
-
<billingPeriod>MONTHLY</billingPeriod>
|
56
|
-
<recurringPrice>
|
57
|
-
<price>
|
58
|
-
<currency>USD</currency>
|
59
|
-
<value>1000.00</value>
|
60
|
-
</price>
|
61
|
-
</recurringPrice>
|
62
|
-
</recurring>
|
63
|
-
</finalPhase>
|
64
|
-
</plan>
|
65
|
-
</plans>
|
66
|
-
<priceLists>
|
67
|
-
<defaultPriceList name="DEFAULT">
|
68
|
-
<plans>
|
69
|
-
<plan>basic-monthly</plan>
|
70
|
-
</plans>
|
71
|
-
</defaultPriceList>
|
72
|
-
</priceLists>
|
73
|
-
</catalog>
|
@@ -1 +0,0 @@
|
|
1
|
-
sports-monthly = Voiture Sport
|
@@ -1,100 +0,0 @@
|
|
1
|
-
<meta charset="UTF-8">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<style type="text/css">
|
5
|
-
th {
|
6
|
-
align: left;
|
7
|
-
width: 225px;
|
8
|
-
border-bottom: solid 2px black;
|
9
|
-
}
|
10
|
-
</style>
|
11
|
-
</head>
|
12
|
-
<body>
|
13
|
-
<h1>Tenant template: {{text.invoiceTitle}}</h1>
|
14
|
-
<table>
|
15
|
-
<tr>
|
16
|
-
<td rowspan=3 width=350px>Insert image here</td>
|
17
|
-
<td width=100px/>
|
18
|
-
<td width=225px/>
|
19
|
-
<td width=225px/>
|
20
|
-
</tr>
|
21
|
-
<tr>
|
22
|
-
<td/>
|
23
|
-
<td align=right>{{text.invoiceDate}}</td>
|
24
|
-
<td>{{invoice.formattedInvoiceDate}}</td>
|
25
|
-
</tr>
|
26
|
-
<tr>
|
27
|
-
<td/>
|
28
|
-
<td align=right>{{text.invoiceNumber}}</td>
|
29
|
-
<td>{{invoice.invoiceNumber}}</td>
|
30
|
-
</tr>
|
31
|
-
<tr>
|
32
|
-
<td>{{text.companyName}}</td>
|
33
|
-
<td></td>
|
34
|
-
<td align=right>{{text.accountOwnerName}}</td>
|
35
|
-
<td>{{account.name}}</td>
|
36
|
-
</tr>
|
37
|
-
<tr>
|
38
|
-
<td>{{text.companyAddress}}</td>
|
39
|
-
<td/>
|
40
|
-
<td/>
|
41
|
-
<td>{{account.email}}</td>
|
42
|
-
</tr>
|
43
|
-
<tr>
|
44
|
-
<td>{{text.companyCityProvincePostalCode}}</td>
|
45
|
-
<td/>
|
46
|
-
<td/>
|
47
|
-
<td>{{account.phone}}</td>
|
48
|
-
</tr>
|
49
|
-
<tr>
|
50
|
-
<td>{{text.companyCountry}}</td>
|
51
|
-
<td/>
|
52
|
-
<td/>
|
53
|
-
<td/>
|
54
|
-
</tr>
|
55
|
-
<tr>
|
56
|
-
<td><{{text.companyUrl}}</td>
|
57
|
-
<td/>
|
58
|
-
<td/>
|
59
|
-
<td/>
|
60
|
-
</tr>
|
61
|
-
</table>
|
62
|
-
<br/>
|
63
|
-
<br/>
|
64
|
-
<br/>
|
65
|
-
<table>
|
66
|
-
<tr>
|
67
|
-
<th>{{text.invoiceItemBundleName}}</th>
|
68
|
-
<th>{{text.invoiceItemDescription}}</th>
|
69
|
-
<th>{{text.invoiceItemServicePeriod}}</th>
|
70
|
-
<th>{{text.invoiceItemAmount}}</th>
|
71
|
-
</tr>
|
72
|
-
{{#invoice.invoiceItems}}
|
73
|
-
<tr>
|
74
|
-
<td>{{description}}</td>
|
75
|
-
<td>{{planName}}</td>
|
76
|
-
<td>{{formattedStartDate}}{{#formattedEndDate}} - {{formattedEndDate}}{{/formattedEndDate}}</td>
|
77
|
-
<td>{{invoice.currency}} {{amount}}</td>
|
78
|
-
</tr>
|
79
|
-
{{/invoice.invoiceItems}}
|
80
|
-
<tr>
|
81
|
-
<td colspan=4/>
|
82
|
-
</tr>
|
83
|
-
<tr>
|
84
|
-
<td colspan=2/>
|
85
|
-
<td align=right><strong>{{text.invoiceAmount}}</strong></td>
|
86
|
-
<td align=right><strong>{{invoice.chargedAmount}}</strong></td>
|
87
|
-
</tr>
|
88
|
-
<tr>
|
89
|
-
<td colspan=2/>
|
90
|
-
<td align=right><strong>{{text.invoiceAmountPaid}}</strong></td>
|
91
|
-
<td align=right><strong>{{invoice.paidAmount}}</strong></td>
|
92
|
-
</tr>
|
93
|
-
<tr>
|
94
|
-
<td colspan=2/>
|
95
|
-
<td align=right><strong>{{text.invoiceBalance}}</strong></td>
|
96
|
-
<td align=right><strong>{{invoice.balance}}</strong></td>
|
97
|
-
</tr>
|
98
|
-
</table>
|
99
|
-
</body>
|
100
|
-
</html>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
invoiceEmailSubject=Nouvelle Facture
|
2
|
-
invoiceTitle=FACTURE
|
3
|
-
invoiceDate=Date:
|
4
|
-
invoiceNumber=Facture #
|
5
|
-
invoiceAmount=Montant à payer
|
6
|
-
invoiceAmountPaid=Montant payé
|
7
|
-
invoiceBalance=Nouveau montant
|
8
|
-
|
9
|
-
accountOwnerName=Chauffeur
|
10
|
-
|
11
|
-
companyName=Killbill, Inc.
|
12
|
-
companyAddress=P.O. Box 1234
|
13
|
-
companyCityProvincePostalCode=Springfield
|
14
|
-
companyCountry=USA
|
15
|
-
companyUrl=http://killbill.io
|
16
|
-
|
17
|
-
invoiceItemBundleName=Armes
|
18
|
-
invoiceItemDescription=Description
|
19
|
-
invoiceItemServicePeriod=Période de facturation
|
20
|
-
invoiceItemAmount=Montant
|
21
|
-
|
22
|
-
processedPaymentCurrency=(*) Le payment à été payé en
|
23
|
-
processedPaymentRate=Le taux de conversion est
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<overdueConfig>
|
2
|
-
<accountOverdueStates>
|
3
|
-
<state name="OD3">
|
4
|
-
<condition>
|
5
|
-
<timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
6
|
-
<unit>DAYS</unit>
|
7
|
-
<number>50</number>
|
8
|
-
</timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
9
|
-
</condition>
|
10
|
-
<externalMessage>Reached OD3</externalMessage>
|
11
|
-
<blockChanges>true</blockChanges>
|
12
|
-
<disableEntitlementAndChangesBlocked>true</disableEntitlementAndChangesBlocked>
|
13
|
-
<autoReevaluationInterval>
|
14
|
-
<unit>DAYS</unit>
|
15
|
-
<number>5</number>
|
16
|
-
</autoReevaluationInterval>
|
17
|
-
</state>
|
18
|
-
<state name="OD2">
|
19
|
-
<condition>
|
20
|
-
<timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
21
|
-
<unit>DAYS</unit>
|
22
|
-
<number>40</number>
|
23
|
-
</timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
24
|
-
</condition>
|
25
|
-
<externalMessage>Reached OD2</externalMessage>
|
26
|
-
<blockChanges>true</blockChanges>
|
27
|
-
<disableEntitlementAndChangesBlocked>true</disableEntitlementAndChangesBlocked>
|
28
|
-
<autoReevaluationInterval>
|
29
|
-
<unit>DAYS</unit>
|
30
|
-
<number>5</number>
|
31
|
-
</autoReevaluationInterval>
|
32
|
-
</state>
|
33
|
-
<state name="OD1">
|
34
|
-
<condition>
|
35
|
-
<timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
36
|
-
<unit>DAYS</unit>
|
37
|
-
<number>30</number>
|
38
|
-
</timeSinceEarliestUnpaidInvoiceEqualsOrExceeds>
|
39
|
-
</condition>
|
40
|
-
<externalMessage>Reached OD1</externalMessage>
|
41
|
-
<blockChanges>true</blockChanges>
|
42
|
-
<disableEntitlementAndChangesBlocked>false</disableEntitlementAndChangesBlocked>
|
43
|
-
<autoReevaluationInterval>
|
44
|
-
<unit>DAYS</unit>
|
45
|
-
<number>5</number>
|
46
|
-
</autoReevaluationInterval>
|
47
|
-
</state>
|
48
|
-
</accountOverdueStates>
|
49
|
-
</overdueConfig>
|
data/test/fixtures/stripe.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::AccountChildrenControllerTest < Kaui::FunctionalTestHelper
|
4
|
-
|
5
|
-
test 'should get index' do
|
6
|
-
get :index, :account_id => @account.account_id
|
7
|
-
assert_response :success
|
8
|
-
end
|
9
|
-
|
10
|
-
test 'should list account children' do
|
11
|
-
children_size = 3
|
12
|
-
# create children
|
13
|
-
for i in 1..children_size
|
14
|
-
create_account(@tenant,USERNAME,PASSWORD,"Kaui test#{i}",nil,nil,@account.account_id)
|
15
|
-
end
|
16
|
-
|
17
|
-
parameters = {
|
18
|
-
:search => { :value => @account.account_id},
|
19
|
-
:format => :json,
|
20
|
-
:account_id => @account.account_id
|
21
|
-
}
|
22
|
-
get :pagination, parameters
|
23
|
-
assert_response :success
|
24
|
-
|
25
|
-
body = MultiJson.decode(@response.body)
|
26
|
-
|
27
|
-
assert_instance_of Array, body['data']
|
28
|
-
assert_equal children_size, body['data'].size
|
29
|
-
assert_nil body['error']
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::AccountCustomFieldsControllerTest < Kaui::FunctionalTestHelper
|
4
|
-
|
5
|
-
test 'should list all account custom fields' do
|
6
|
-
new_account = create_account(@tenant)
|
7
|
-
|
8
|
-
# set a custom field
|
9
|
-
created_custom_field = Kaui::CustomField.new
|
10
|
-
created_custom_field.object_id = new_account.account_id
|
11
|
-
created_custom_field.object_type = 'ACCOUNT'
|
12
|
-
created_custom_field.name = 'test'
|
13
|
-
created_custom_field.value = 'value'
|
14
|
-
|
15
|
-
new_account.add_custom_field(created_custom_field, 'Kaui test', nil, nil, build_options(@tenant, USERNAME, PASSWORD))
|
16
|
-
|
17
|
-
|
18
|
-
# get custom field list
|
19
|
-
get :index, :account_id => new_account.account_id
|
20
|
-
assert_response :success
|
21
|
-
custom_fields_from_response = get_value_from_input_field('custom-fields').gsub!('"','"');
|
22
|
-
assert_not_nil custom_fields_from_response
|
23
|
-
custom_fields = JSON.parse(custom_fields_from_response)
|
24
|
-
assert_equal 1, custom_fields.count
|
25
|
-
assert_equal 'ACCOUNT', custom_fields[0][1]
|
26
|
-
assert_equal 'test', custom_fields[0][2]
|
27
|
-
assert_equal 'value', custom_fields[0][3]
|
28
|
-
end
|
29
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::AccountEmailsControllerTest < Kaui::FunctionalTestHelper
|
4
|
-
|
5
|
-
test 'should be redirected if no valid account_email was specified during creation' do
|
6
|
-
post :create, :account_id => @account.account_id
|
7
|
-
assert_redirected_to account_path(@account.account_id)
|
8
|
-
assert_equal 'Required parameter missing: account_email', flash[:error]
|
9
|
-
|
10
|
-
post :create, :account_id => @account.account_id, :account_email => {}
|
11
|
-
assert_redirected_to account_path(@account.account_id)
|
12
|
-
assert_equal 'Required parameter missing: account_email', flash[:error]
|
13
|
-
|
14
|
-
post :create, :account_id => @account.account_id, :account_email => {:foo => :bar}
|
15
|
-
assert_redirected_to account_path(@account.account_id)
|
16
|
-
assert_equal 'Required parameter missing: email', flash[:error]
|
17
|
-
end
|
18
|
-
|
19
|
-
test 'should handle Kill Bill errors during creation' do
|
20
|
-
account_id = SecureRandom.uuid.to_s
|
21
|
-
post :create,
|
22
|
-
:account_id => account_id,
|
23
|
-
:account_email => {
|
24
|
-
:email => 'toto@example.com'
|
25
|
-
}
|
26
|
-
assert_redirected_to account_path(account_id)
|
27
|
-
assert_equal "Error while communicating with the Kill Bill server: Object id=#{account_id} type=ACCOUNT doesn't exist!", flash[:error]
|
28
|
-
end
|
29
|
-
|
30
|
-
test 'should handle Kill Bill errors during deletion' do
|
31
|
-
account_id = 'invalid-id'
|
32
|
-
delete :destroy, :account_id => account_id, :id => 'toto@example.com'
|
33
|
-
assert_redirected_to account_path(account_id)
|
34
|
-
assert_equal 'Error while communicating with the Kill Bill server: ', flash[:error]
|
35
|
-
end
|
36
|
-
|
37
|
-
test 'should add and destroy email' do
|
38
|
-
get :new, :account_id => @account.account_id
|
39
|
-
assert_response 200
|
40
|
-
assert_not_nil assigns(:account_email)
|
41
|
-
|
42
|
-
email = SecureRandom.uuid.to_s + '@example.com'
|
43
|
-
post :create,
|
44
|
-
:account_id => @account.account_id,
|
45
|
-
:account_email => {
|
46
|
-
:email => email
|
47
|
-
}
|
48
|
-
assert_redirected_to account_path(@account.account_id)
|
49
|
-
assert_equal 'Account email was successfully added', flash[:notice]
|
50
|
-
|
51
|
-
delete :destroy, :account_id => @account.account_id, :id => email
|
52
|
-
assert_redirected_to account_path(@account.account_id)
|
53
|
-
assert_equal 'Account email was successfully deleted', flash[:notice]
|
54
|
-
end
|
55
|
-
end
|
@@ -1,48 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::AccountTagsControllerTest < Kaui::FunctionalTestHelper
|
4
|
-
|
5
|
-
test 'should handle Kill Bill errors when getting edit screen' do
|
6
|
-
account_id = '1234'
|
7
|
-
get :edit, :account_id => account_id
|
8
|
-
assert_redirected_to account_path(account_id)
|
9
|
-
assert_equal 'Error while communicating with the Kill Bill server: ', flash[:error]
|
10
|
-
end
|
11
|
-
|
12
|
-
test 'should get edit' do
|
13
|
-
get :edit, :account_id => @account.account_id
|
14
|
-
assert_response 200
|
15
|
-
assert_not_nil assigns(:account_id)
|
16
|
-
assert_not_nil assigns(:tag_names)
|
17
|
-
assert_not_nil assigns(:available_tags)
|
18
|
-
end
|
19
|
-
|
20
|
-
test 'should update tags' do
|
21
|
-
post :update,
|
22
|
-
:account_id => @account.account_id,
|
23
|
-
:'tag_00000000-0000-0000-0000-000000000001' => 'AUTO_PAY_OFF',
|
24
|
-
:'tag_00000000-0000-0000-0000-000000000005' => 'MANUAL_PAY',
|
25
|
-
:'tag_00000000-0000-0000-0000-000000000003' => 'OVERDUE_ENFORCEMENT_OFF'
|
26
|
-
assert_redirected_to account_path(@account.account_id)
|
27
|
-
assert_equal 'Account tags successfully set', flash[:notice]
|
28
|
-
end
|
29
|
-
|
30
|
-
test 'should list all account tags' do
|
31
|
-
new_account = create_account(@tenant)
|
32
|
-
# set some tags
|
33
|
-
post :update,
|
34
|
-
:account_id => new_account.account_id,
|
35
|
-
:'tag_00000000-0000-0000-0000-000000000001' => 'AUTO_PAY_OFF',
|
36
|
-
:'tag_00000000-0000-0000-0000-000000000005' => 'MANUAL_PAY',
|
37
|
-
:'tag_00000000-0000-0000-0000-000000000003' => 'OVERDUE_ENFORCEMENT_OFF'
|
38
|
-
assert_redirected_to account_path(new_account.account_id)
|
39
|
-
assert_equal 'Account tags successfully set', flash[:notice]
|
40
|
-
|
41
|
-
# get tag list
|
42
|
-
get :index, :account_id => new_account.account_id
|
43
|
-
assert_response :success
|
44
|
-
tags_from_response = get_value_from_input_field('tags').gsub!('"','"');
|
45
|
-
assert_not_nil tags_from_response
|
46
|
-
assert_equal 3, JSON.parse(tags_from_response).count
|
47
|
-
end
|
48
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class Kaui::AccountTimelinesControllerTest < Kaui::FunctionalTestHelper
|
4
|
-
|
5
|
-
test 'should show the timeline page' do
|
6
|
-
get :show, :account_id => @account.account_id
|
7
|
-
assert_response 200
|
8
|
-
|
9
|
-
assert_not_nil assigns(:account)
|
10
|
-
assert_not_nil assigns(:bundles)
|
11
|
-
assert_not_nil assigns(:bundle_keys_by_invoice_id)
|
12
|
-
assert_not_nil assigns(:bundle_names_by_invoice_id)
|
13
|
-
assert_not_nil assigns(:invoices)
|
14
|
-
assert_not_nil assigns(:payments)
|
15
|
-
assert_not_nil assigns(:invoices_by_id)
|
16
|
-
|
17
|
-
assert_equal @account.account_id, assigns(:account).account_id
|
18
|
-
assert_equal @invoice_item.invoice_id, assigns(:invoices_by_id)[@invoice_item.invoice_id].invoice_id
|
19
|
-
end
|
20
|
-
end
|