killbill-avatax 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +11 -1
- data/app/assets/javascripts/application.js +1 -4
- data/app/assets/stylesheets/application.css +1 -3
- data/app/controllers/avatax/configuration_controller.rb +4 -3
- data/app/views/avatax/configuration/_plugin_form.html.erb +14 -6
- data/app/views/avatax/layouts/avatax_application.html.erb +29 -26
- data/lib/avatax/engine.rb +1 -3
- data/lib/avatax/version.rb +1 -1
- metadata +3 -46
- data/app/assets/stylesheets/bootstrap_and_overrides.css +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 76ce1321141078c211c92b31182358d5115c5e9d5a298c963dc9e0df5019eb5f
|
4
|
+
data.tar.gz: 4d70b3546ec39fbf82de53ffd1a42e3fc625c6cce75932d93ce434909afab6cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d558f61cad6c2d93bb65f48ce847228032347d50c508b6914fde9badc68a0866ad52aae4af70baa47d8e687c0d921d3f898cc1bc9805118b303cbf42cd49123
|
7
|
+
data.tar.gz: 9acb0237c96d96bb14aca8bb898e59d6ced831cf09db3624e5b86f69d3a3deb018388e19aac5312a17d53e75d25aa1ecf75272ab275f1c264115ceb3c259cf09
|
data/README.md
CHANGED
@@ -16,7 +16,8 @@ Kill Bill compatibility
|
|
16
16
|
| 0.1.y | 0.18.z (Rails 4) |
|
17
17
|
| 0.2.y | 0.18.z (Rails 5) |
|
18
18
|
| 1.x.y | 0.20.z (Rails 5) |
|
19
|
-
| 2.
|
19
|
+
| 2.1.y | 0.22.z (Rails 5) |
|
20
|
+
| 2.2.y | 0.24.z (Rails 6) |
|
20
21
|
| 3.x.y | 0.24.z (Rails 7) |
|
21
22
|
|
22
23
|
Functionality
|
@@ -53,3 +54,12 @@ To run tests:
|
|
53
54
|
```
|
54
55
|
rails t
|
55
56
|
```
|
57
|
+
This plugin is using [killbill-assets-ui](https://github.com/killbill/killbill-assets-ui) to load the common assets.
|
58
|
+
If you want to override the assets you can add it to ```app/assets/stylesheet/avatax``` or ```app/assets/stylesheet/avatax```
|
59
|
+
|
60
|
+
For integrate run with [killbill-admin-ui-standalone](https://github.com/killbill/killbill-admin-ui-standalone), please update the Gemfile to use Avatax locally
|
61
|
+
|
62
|
+
```
|
63
|
+
# gem 'killbill-avatax'
|
64
|
+
gem 'killbill-avatax', :path => '../killbill-avatax-ui'
|
65
|
+
```
|
@@ -10,8 +10,5 @@
|
|
10
10
|
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
11
|
// about supported directives.
|
12
12
|
//
|
13
|
-
//= require
|
14
|
-
//= require jquery_ujs
|
15
|
-
//= require dataTables/jquery.dataTables
|
16
|
-
//= require dataTables/bootstrap/3/jquery.dataTables.bootstrap
|
13
|
+
//= require assets/common
|
17
14
|
//= require avatax/avatax
|
@@ -14,7 +14,8 @@ module Avatax
|
|
14
14
|
#
|
15
15
|
|
16
16
|
def set_tax_code
|
17
|
-
|
17
|
+
simple_catalog = KillBillClient::Model::Catalog.simple_catalog(nil, options_for_klient).last
|
18
|
+
@products = simple_catalog ? simple_catalog.products.map(&:name) : []
|
18
19
|
end
|
19
20
|
|
20
21
|
def do_set_tax_code
|
@@ -104,8 +105,8 @@ org.killbill.billing.plugin.avatax.licenseKey=#{params.require(:license_key)}\n"
|
|
104
105
|
# The user should really use the more powerful /admin_tenants screen - this plugin screen was just created
|
105
106
|
# to be able to pass the initial AvaTax certification.
|
106
107
|
current_config = KillBillClient::Model::Tenant.get_tenant_plugin_config('killbill-avatax', options_for_klient)
|
107
|
-
|
108
|
-
|
108
|
+
config_values = current_config.values
|
109
|
+
config_values.present? && config_values.first.split.each do |property|
|
109
110
|
k, v = property.split('=')
|
110
111
|
plugin_config << case k
|
111
112
|
when 'org.killbill.billing.plugin.avatax.accountId', 'org.killbill.billing.plugin.avatax.licenseKey', 'org.killbill.billing.plugin.avatax.companyCode', 'org.killbill.billing.plugin.avatax.commitDocuments'
|
@@ -1,20 +1,20 @@
|
|
1
1
|
<%= form_tag update_plugin_configuration_path, :class => 'form-horizontal' do %>
|
2
2
|
<div class="form-group">
|
3
|
-
<%= label_tag :account_id, 'Account ID', :class => 'col-sm-2 control-label' %>
|
3
|
+
<%= label_tag :account_id, 'Account ID', :class => 'col-sm-2 control-label', :data => {:toggle=>"popover", :trigger=> "hover", :content=> "Your AvaTax account number"} %>
|
4
4
|
<div class="col-sm-10">
|
5
|
-
<%= text_field_tag :account_id, @configuration[:account_id], :class => 'form-control' %>
|
5
|
+
<%= text_field_tag :account_id, @configuration[:account_id], :class => 'form-control', :required => true %>
|
6
6
|
</div>
|
7
7
|
</div>
|
8
8
|
<div class="form-group">
|
9
|
-
<%= label_tag :license_key, 'License key', :class => 'col-sm-2 control-label' %>
|
9
|
+
<%= label_tag :license_key, 'License key', :class => 'col-sm-2 control-label', :data => {:toggle=>"popover", :trigger=> "hover", :content=> "Your AvaTax license key"} %>
|
10
10
|
<div class="col-sm-10">
|
11
|
-
<%= text_field_tag :license_key, @configuration[:license_key], :class => 'form-control' %>
|
11
|
+
<%= text_field_tag :license_key, @configuration[:license_key], :class => 'form-control', :required => true %>
|
12
12
|
</div>
|
13
13
|
</div>
|
14
14
|
<div class="form-group">
|
15
|
-
<%= label_tag :company_code, 'Company code', :class => 'col-sm-2 control-label' %>
|
15
|
+
<%= label_tag :company_code, 'Company code', :class => 'col-sm-2 control-label', :data => {:toggle=>"popover", :trigger=> "hover", :content=> "Your company code"} %>
|
16
16
|
<div class="col-sm-10">
|
17
|
-
<%= text_field_tag :company_code, @configuration[:company_code], :class => 'form-control' %>
|
17
|
+
<%= text_field_tag :company_code, @configuration[:company_code], :class => 'form-control', :required => true %>
|
18
18
|
</div>
|
19
19
|
</div>
|
20
20
|
<div class="form-group">
|
@@ -32,3 +32,11 @@
|
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
<% end %>
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
<%= javascript_tag do %>
|
39
|
+
$(function () {
|
40
|
+
$('[data-toggle="popover"]').popover()
|
41
|
+
})
|
42
|
+
<% end %>
|
@@ -1,31 +1,34 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
|
-
<head>
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</head>
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
3
|
+
<head>
|
4
|
+
<title>Avatax</title>
|
5
|
+
<%= yield :scripts %>
|
6
|
+
<%= stylesheet_link_tag 'application', :media => 'all' %>
|
7
|
+
<%= javascript_include_tag 'application' %>
|
8
|
+
<%= csrf_meta_tags %>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<div class="container">
|
12
|
+
<div class="container-fluid">
|
13
|
+
<%- # :alert used by devise -%>
|
14
|
+
<% [:error, :alert].each do |key| %>
|
15
|
+
<% if flash[key] %>
|
16
|
+
<div class="row">
|
17
|
+
<div class="col-md-10 col-md-offset-2">
|
18
|
+
<div class="alert alert-error"><%= flash[key] %></div>
|
19
|
+
</div>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
<% end %>
|
23
|
+
<% if flash[:notice] %>
|
24
|
+
<div class="row">
|
25
|
+
<div class="col-md-10 col-md-offset-2">
|
26
|
+
<div class="alert alert-info"><%= flash[:notice] %></div>
|
27
|
+
</div>
|
17
28
|
</div>
|
18
|
-
|
19
|
-
|
20
|
-
<% end %>
|
21
|
-
<% if flash[:notice] %>
|
22
|
-
<div class="row">
|
23
|
-
<div class="col-md-10 col-md-offset-2">
|
24
|
-
<div class="alert alert-info"><%= flash[:notice] %></div>
|
25
|
-
</div>
|
29
|
+
<% end %>
|
30
|
+
<%= yield %>
|
26
31
|
</div>
|
27
|
-
|
28
|
-
|
29
|
-
</div>
|
30
|
-
</body>
|
32
|
+
</div>
|
33
|
+
</body>
|
31
34
|
</html>
|
data/lib/avatax/engine.rb
CHANGED
@@ -6,9 +6,7 @@
|
|
6
6
|
# We need to explicitly require all of our dependencies listed in avatax.gemspec
|
7
7
|
#
|
8
8
|
# See also https://github.com/carlhuda/bundler/issues/49
|
9
|
-
require '
|
10
|
-
require 'jquery-datatables-rails'
|
11
|
-
require 'font-awesome-rails'
|
9
|
+
require 'killbill_assets_ui'
|
12
10
|
require 'killbill_client'
|
13
11
|
|
14
12
|
module Avatax
|
data/lib/avatax/version.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-avatax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kill Bill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: killbill-assets-ui
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -24,34 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: jquery-datatables-rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: jquery-rails
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 4.5.1
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 4.5.1
|
55
27
|
- !ruby/object:Gem::Dependency
|
56
28
|
name: killbill-client
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +52,6 @@ dependencies:
|
|
80
52
|
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
54
|
version: '7.0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: sass-rails
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
55
|
description: Rails UI plugin for the Avatax plugin.
|
98
56
|
email: killbilling-users@googlegroups.com
|
99
57
|
executables: []
|
@@ -108,7 +66,6 @@ files:
|
|
108
66
|
- app/assets/javascripts/avatax/avatax.js
|
109
67
|
- app/assets/stylesheets/application.css
|
110
68
|
- app/assets/stylesheets/avatax/avatax.css
|
111
|
-
- app/assets/stylesheets/bootstrap_and_overrides.css
|
112
69
|
- app/controllers/avatax/configuration_controller.rb
|
113
70
|
- app/controllers/avatax/engine_controller.rb
|
114
71
|
- app/helpers/avatax/application_helper.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/* Override Bootstrap 3 font locations */
|
2
|
-
@font-face {
|
3
|
-
font-family: 'Glyphicons Halflings';
|
4
|
-
src: url('../assets/glyphicons-halflings-regular.eot');
|
5
|
-
src: url('../assets/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),
|
6
|
-
url('../assets/glyphicons-halflings-regular.woff') format('woff'),
|
7
|
-
url('../assets/glyphicons-halflings-regular.ttf') format('truetype'),
|
8
|
-
url('../assets/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
|
9
|
-
}
|