dorsale 3.14.5 → 3.14.10

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/app/assets/javascripts/dorsale/common/tags.coffee +1 -1
  4. data/app/controllers/dorsale/billing_machine/invoices_controller.rb +3 -1
  5. data/app/controllers/dorsale/billing_machine/quotations_controller.rb +3 -1
  6. data/app/controllers/dorsale/customer_vault/events_controller.rb +0 -2
  7. data/app/controllers/dorsale/customer_vault/people_controller.rb +11 -5
  8. data/app/models/dorsale/billing_machine/invoice.rb +2 -4
  9. data/app/models/dorsale/billing_machine/quotation.rb +2 -3
  10. data/app/models/dorsale/customer_vault/person.rb +7 -7
  11. data/app/pdfs/dorsale/billing_machine/invoice_single_vat_pdf.rb +2 -2
  12. data/app/policies/dorsale/application_policy.rb +1 -0
  13. data/app/services/dorsale/billing_machine/invoice/copy.rb +1 -0
  14. data/app/services/dorsale/billing_machine/pdf_file_generator.rb +1 -0
  15. data/app/services/dorsale/billing_machine/quotation/copy.rb +1 -0
  16. data/app/services/dorsale/billing_machine/quotation/to_invoice.rb +1 -0
  17. data/app/services/dorsale/expense_gun/expense/copy.rb +1 -0
  18. data/app/services/dorsale/flyboy/task/copy.rb +1 -0
  19. data/app/services/dorsale/flyboy/task/snoozer.rb +1 -0
  20. data/app/services/dorsale/tag_list_for_model.rb +1 -0
  21. data/app/uploaders/dorsale/image_uploader.rb +1 -1
  22. data/app/uploaders/dorsale/pdf_uploader.rb +1 -1
  23. data/app/views/dorsale/billing_machine/invoices/show.pdf.ruby +1 -1
  24. data/app/views/dorsale/billing_machine/quotations/show.pdf.ruby +1 -1
  25. data/app/views/dorsale/customer_vault/people/_form.html.slim +9 -1
  26. data/app/views/dorsale/customer_vault/people/create_corporation_js.html.slim +7 -0
  27. data/config/locales/billing_machine.en.yml +1 -0
  28. data/config/locales/billing_machine.fr.yml +1 -0
  29. data/features/customer_vault_individuals.feature +9 -1
  30. data/features/step_definitions/billing_machine_payment_terms_steps.rb +1 -1
  31. data/features/step_definitions/billing_machine_quotations_steps.rb +1 -1
  32. data/features/step_definitions/customer_vault_activity_types_steps.rb +1 -1
  33. data/features/step_definitions/customer_vault_individuals_steps.rb +11 -0
  34. data/features/step_definitions/customer_vault_origins_steps.rb +1 -1
  35. data/features/step_definitions/customer_vault_search_steps.rb +10 -10
  36. data/features/step_definitions/expense_gun_categories_steps.rb +1 -1
  37. data/lib/dorsale/engine.rb +1 -1
  38. data/lib/dorsale/version.rb +1 -1
  39. data/spec/models/dorsale/billing_machine/quotation_spec.rb +1 -1
  40. data/spec/services/dorsale/billing_machine/quotation/copy_spec.rb +1 -1
  41. metadata +20 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64ed8f65abd6ae12d960fe88cc17c321b7838660d09d206bc79f7b234e984ac3
4
- data.tar.gz: 0247c7a10d86060d9f869e0659254506de509de49e0d591e086f4a750f7db739
3
+ metadata.gz: bed10bfd8955fa8dec1e5c01787b450201bfb08941099fbe6d2e413f8b679dd1
4
+ data.tar.gz: 7bdab067a557c8d7ceb4d660462be2452bb429cf6bdbd540c84b6b3dc5972446
5
5
  SHA512:
6
- metadata.gz: 734d3ea40626c063c7afe6c713f7e43d4934b27554a513898eb072cf9222ac48b3159f546de818c6c436367dbc86fef4f63c2b954892db24c5b5910aab0c1a51
7
- data.tar.gz: e73667d0999d746a7d5dfb16ab07abb77c2dae0a410c98d0b0b621d16b6d646fcd45c3e8a1a3ccc31f4cf88068b8d3b5cd754204d3ef8921e35ec76f5b552491
6
+ metadata.gz: 83a3b664703cae40e41a194157e4369474d461b29042e48e13b4d259dd02f3db99e2835c885b73d83e1bc254e1d1a3c51ef7b4a025db86d45ab3653bb7da4fb0
7
+ data.tar.gz: '03826fb01f8843a16685a23d319611d393f988376b59418d37cbfa60fcc7e0f3baf44f518ed9a581d682615cce7061e5c35e805087eacf7dac3803edb19506ca'
@@ -2,6 +2,24 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 3.14.10
6
+ - Change BillingMachine PDF filenames
7
+ - Fix CustomerVault layout
8
+
9
+ ## 3.14.9
10
+ - Create corporation from individual form
11
+ - Quotations: add draft state
12
+ - Fix carrierwave white lists
13
+
14
+ ## 3.14.8
15
+ - Rails 6
16
+
17
+ ## 3.14.7
18
+ - Freeze ttfunk to <1.6 to fix PDF errors
19
+
20
+ ## 3.14.6
21
+ - Small changes on BM policy check
22
+
5
23
  ## 3.14.5
6
24
  - Restore test files in gemspec
7
25
 
@@ -1,4 +1,4 @@
1
- $(document).on "turbolinks:load", ->
1
+ $(document).on "turbolinks:load modal:load", ->
2
2
  $("form:not([action*=filters]) select[multiple][name*=tag]").not(".select2-hidden-accessible").map ->
3
3
  placeholder = $(this).attr("placeholder")
4
4
 
@@ -75,9 +75,11 @@ class Dorsale::BillingMachine::InvoicesController < ::Dorsale::BillingMachine::A
75
75
 
76
76
  def update
77
77
  # callback in BillingMachine::ApplicationController
78
+ @invoice.attributes = invoice_params_for_update
79
+
78
80
  authorize @invoice, :update?
79
81
 
80
- if @invoice.update(invoice_params_for_update)
82
+ if @invoice.save
81
83
  Dorsale::BillingMachine::PdfFileGenerator.(@invoice)
82
84
  flash[:notice] = t("messages.invoices.update_ok")
83
85
  redirect_to default_back_url
@@ -65,9 +65,11 @@ class Dorsale::BillingMachine::QuotationsController < ::Dorsale::BillingMachine:
65
65
 
66
66
  def update
67
67
  # callback in BillingMachine::ApplicationController
68
+ @quotation.attributes = quotation_params_for_update
69
+
68
70
  authorize @quotation, :update?
69
71
 
70
- if @quotation.update(quotation_params_for_update)
72
+ if @quotation.save
71
73
  Dorsale::BillingMachine::PdfFileGenerator.(@quotation)
72
74
  flash[:notice] = t("messages.quotations.update_ok")
73
75
  redirect_to default_back_url
@@ -1,8 +1,6 @@
1
1
  class Dorsale::CustomerVault::EventsController < ::Dorsale::CustomerVault::ApplicationController
2
2
  before_action :set_objects
3
3
 
4
- layout -> { action_name == "index" ? nil : false }
5
-
6
4
  def index
7
5
  authorize model, :list?
8
6
 
@@ -45,13 +45,19 @@ class Dorsale::CustomerVault::PeopleController < ::Dorsale::CustomerVault::Appli
45
45
 
46
46
  @person ||= scope.new(person_params_for_create)
47
47
 
48
- if @person.save
49
- generate_event!("create")
50
- flash[:notice] = t("messages.#{person_type.to_s.pluralize}.create_ok")
51
- redirect_to back_url
52
- else
48
+ unless @person.save
53
49
  render :new
50
+ return
54
51
  end
52
+
53
+ if request.xhr? && @person.corporation?
54
+ render :create_corporation_js
55
+ return
56
+ end
57
+
58
+ generate_event!("create")
59
+ flash[:notice] = t("messages.#{person_type.to_s.pluralize}.create_ok")
60
+ redirect_to back_url
55
61
  end
56
62
 
57
63
  def show
@@ -22,6 +22,8 @@ class Dorsale::BillingMachine::Invoice < ::Dorsale::ApplicationRecord
22
22
  :invoice
23
23
  end
24
24
 
25
+ after_initialize :assign_default_dates
26
+ before_save :update_totals
25
27
  before_create :assign_unique_index
26
28
  before_create :assign_tracking_id
27
29
 
@@ -43,15 +45,11 @@ class Dorsale::BillingMachine::Invoice < ::Dorsale::ApplicationRecord
43
45
  assign_default :paid, false
44
46
  end
45
47
 
46
- after_initialize :assign_default_dates
47
-
48
48
  def assign_default_dates
49
49
  assign_default :date, Date.current
50
50
  assign_default :due_date, Date.current + 30.days
51
51
  end
52
52
 
53
- before_save :update_totals
54
-
55
53
  def update_totals
56
54
  assign_default_values
57
55
  lines.each(&:update_total)
@@ -1,7 +1,7 @@
1
1
  class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
2
2
  self.table_name = "dorsale_billing_machine_quotations"
3
3
 
4
- STATES = %w(pending accepted refused canceled)
4
+ STATES = %w(draft pending accepted refused canceled)
5
5
 
6
6
  belongs_to :customer, polymorphic: true
7
7
  belongs_to :payment_term
@@ -33,6 +33,7 @@ class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
33
33
  :quotation
34
34
  end
35
35
 
36
+ before_save :update_totals
36
37
  before_create :assign_unique_index
37
38
  before_create :assign_tracking_id
38
39
 
@@ -55,8 +56,6 @@ class Dorsale::BillingMachine::Quotation < ::Dorsale::ApplicationRecord
55
56
  assign_default :total_excluding_taxes, 0
56
57
  end
57
58
 
58
- before_save :update_totals
59
-
60
59
  def update_totals
61
60
  assign_default_values
62
61
  lines.each(&:update_total)
@@ -9,8 +9,6 @@ class Dorsale::CustomerVault::Person < ::Dorsale::ApplicationRecord
9
9
  Dorsale::CustomerVault::PersonPolicy
10
10
  end
11
11
 
12
- after_initialize :verify_class
13
-
14
12
  def verify_class
15
13
  if self.class == ::Dorsale::CustomerVault::Person
16
14
  # self.abstract_class does not work with STI
@@ -30,6 +28,13 @@ class Dorsale::CustomerVault::Person < ::Dorsale::ApplicationRecord
30
28
  belongs_to :activity_type, class_name: "Dorsale::CustomerVault::ActivityType"
31
29
  belongs_to :origin, class_name: "Dorsale::CustomerVault::Origin"
32
30
 
31
+ validate :validate_taken_emails
32
+
33
+ after_initialize :verify_class
34
+ after_initialize :build_address, if: proc { new_record? && address.nil? }
35
+
36
+ before_validation :build_address, if: proc { address.nil? }
37
+
33
38
  after_destroy :destroy_links
34
39
 
35
40
  default_scope -> {
@@ -50,9 +55,6 @@ class Dorsale::CustomerVault::Person < ::Dorsale::ApplicationRecord
50
55
 
51
56
  scope :having_email, -> (email) { where("email = :e OR :e = ANY (secondary_emails)", e: email) }
52
57
 
53
- after_initialize :build_address, if: proc { new_record? && address.nil? }
54
- before_validation :build_address, if: proc { address.nil? }
55
-
56
58
  def taken_emails
57
59
  taken_emails = {}
58
60
  ([email] + secondary_emails).select(&:present?).each do |e|
@@ -62,8 +64,6 @@ class Dorsale::CustomerVault::Person < ::Dorsale::ApplicationRecord
62
64
  taken_emails
63
65
  end
64
66
 
65
- validate :validate_taken_emails
66
-
67
67
  def validate_taken_emails
68
68
  return if taken_emails.empty?
69
69
 
@@ -177,11 +177,11 @@ class Dorsale::BillingMachine::InvoiceSingleVatPdf < Dorsale::ApplicationPdf
177
177
  end
178
178
 
179
179
  def has_advance
180
- main_document.try(:advance) && main_document.advance != 0.0
180
+ main_document.try(:advance) && main_document.advance.to_d != 0.0.to_d
181
181
  end
182
182
 
183
183
  def has_discount
184
- main_document.try(:commercial_discount) && main_document.commercial_discount != 0.0
184
+ main_document.try(:commercial_discount) && main_document.commercial_discount.to_d != 0.0.to_d
185
185
  end
186
186
 
187
187
  def build_table
@@ -19,6 +19,7 @@ class Dorsale::ApplicationPolicy
19
19
  end
20
20
 
21
21
  def self.inherited(klass)
22
+ super(klass)
22
23
  klass.define_subject_accessor!
23
24
  end
24
25
 
@@ -2,6 +2,7 @@ class Dorsale::BillingMachine::Invoice::Copy < ::Dorsale::Service
2
2
  attr_accessor :invoice, :copy
3
3
 
4
4
  def initialize(invoice)
5
+ super()
5
6
  @invoice = invoice
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::BillingMachine::PdfFileGenerator < Dorsale::Service
2
2
  attr_reader :document
3
3
 
4
4
  def initialize(document)
5
+ super()
5
6
  @document = document
6
7
 
7
8
  # I have no idea why I need to do that,
@@ -2,6 +2,7 @@ class Dorsale::BillingMachine::Quotation::Copy < ::Dorsale::Service
2
2
  attr_accessor :quotation, :copy
3
3
 
4
4
  def initialize(quotation)
5
+ super()
5
6
  @quotation = quotation
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::BillingMachine::Quotation::ToInvoice < ::Dorsale::Service
2
2
  attr_accessor :quotation, :invoice
3
3
 
4
4
  def initialize(quotation)
5
+ super()
5
6
  @quotation = quotation
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::ExpenseGun::Expense::Copy < ::Dorsale::Service
2
2
  attr_accessor :expense, :copy
3
3
 
4
4
  def initialize(expense)
5
+ super()
5
6
  @expense = expense
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::Flyboy::Task::Copy < ::Dorsale::Service
2
2
  attr_accessor :task, :copy
3
3
 
4
4
  def initialize(task)
5
+ super()
5
6
  @task = task
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::Flyboy::Task::Snoozer < ::Dorsale::Service
2
2
  attr_reader :task
3
3
 
4
4
  def initialize(task)
5
+ super()
5
6
  @task = task
6
7
  end
7
8
 
@@ -2,6 +2,7 @@ class Dorsale::TagListForModel < ::Dorsale::Service
2
2
  attr_reader :model
3
3
 
4
4
  def initialize(model)
5
+ super()
5
6
  @model = model
6
7
  end
7
8
 
@@ -1,5 +1,5 @@
1
1
  class Dorsale::ImageUploader < ::Dorsale::ApplicationUploader
2
- def extension_white_list
2
+ def extension_whitelist
3
3
  %w(jpg jpeg gif png)
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  class Dorsale::PdfUploader < ::Dorsale::ApplicationUploader
2
- def extension_white_list
2
+ def extension_whitelist
3
3
  %w(pdf)
4
4
  end
5
5
  end
@@ -1,7 +1,7 @@
1
1
  filename = [
2
2
  @invoice.t.capitalize,
3
3
  @invoice.tracking_id,
4
- @invoice.customer.try(:short_name),
4
+ @invoice.customer.to_s.tr(" ", "_"),
5
5
  ].join("_").concat(".pdf")
6
6
 
7
7
  response.headers["Content-Disposition"] = %(inline; filename="#{filename}")
@@ -1,7 +1,7 @@
1
1
  filename = [
2
2
  @quotation.t.capitalize,
3
3
  @quotation.tracking_id,
4
- @quotation.customer.try(:short_name),
4
+ @quotation.customer.to_s.tr(" ", "_"),
5
5
  ].join("_").concat(".pdf")
6
6
 
7
7
  response.headers["Content-Disposition"] = %(inline; filename="#{filename}")
@@ -30,8 +30,16 @@
30
30
 
31
31
  - if @person.individual?
32
32
  = f.input :title
33
- = f.association :corporation, collection: policy_scope(Dorsale::CustomerVault::Corporation), input_html: {class: 'select2'}
33
+ .row.form-group
34
+ = f.label :corporation, class: "control-label col-sm-3"
35
+ .col-sm-9
36
+ div style="display:flex"
37
+ = f.collection_select :corporation_id, policy_scope(Dorsale::CustomerVault::Corporation), :id, :to_s, {include_blank: true}, {class: "select2", style: "width:100%"}
38
+ a.btn.btn-success.btn-xs href=new_customer_vault_corporation_path data-modal="nested" style="margin-left:1em;padding-top:5px"
39
+ = icon(:plus)
40
+
34
41
  = f.input :context, as: :text, input_html: {rows: 4}
42
+
35
43
  .panel.panel-default
36
44
  .panel-heading: .panel-title = t("customer_vault.contact_informations")
37
45
  .panel-body
@@ -0,0 +1,7 @@
1
+ javascript:
2
+ option = document.createElement("option")
3
+ option.value = #{@person.id.to_json.html_safe}
4
+ option.innerHTML = #{@person.to_s.to_json.html_safe}
5
+ option.selected = true
6
+ $("select[id$=corporation_id]").append(option)
7
+ modal.close()
@@ -66,6 +66,7 @@ en:
66
66
 
67
67
  dorsale/billing_machine/quotation/state:
68
68
  all: "All states"
69
+ draft: Draft
69
70
  pending: "Pending"
70
71
  accepted: "Accepted"
71
72
  refused: "Refused"
@@ -66,6 +66,7 @@ fr:
66
66
 
67
67
  dorsale/billing_machine/quotation/state:
68
68
  all: "Tous les états"
69
+ draft: Brouillon
69
70
  pending: "En attente"
70
71
  accepted: "Accepté"
71
72
  refused: "Refusé"
@@ -14,7 +14,7 @@ Feature: Manage individuals
14
14
  And I validate the new individual
15
15
  Then the individual is created
16
16
 
17
- Scenario: New individual without individual
17
+ Scenario: New individual errors
18
18
  When I create an new individual
19
19
  And I fill the address
20
20
  And I validate the new individual
@@ -33,3 +33,11 @@ Feature: Manage individuals
33
33
  And I remove tags to this individual
34
34
  And I submit this individual
35
35
  Then tags are removed
36
+
37
+ Scenario: Create corporation from individual
38
+ When I create an new individual
39
+ And I create corporation from individual
40
+ And I add his first_name, last_name and email
41
+ And I validate the new individual
42
+ Then the individual is created
43
+ And the new corporation is associated to individual
@@ -28,7 +28,7 @@ When(/^the user edits the payment_term$/) do
28
28
  find(".link_update").click
29
29
  end
30
30
 
31
- Then(/^the current payment_term's label should be pre\-filled$/) do
31
+ Then(/^the current payment_term's label should be pre-filled$/) do
32
32
  expect(page).to have_field("billing_machine_payment_term_label", with: @payment_term.label)
33
33
  end
34
34
 
@@ -58,7 +58,7 @@ When(/^the quotation line shows the right date$/) do
58
58
  expect(page).to have_selector ".date", text: I18n.l(@quotation.date)
59
59
  end
60
60
 
61
- When(/^the quotation line shows the right traking\-id$/) do
61
+ When(/^the quotation line shows the right traking-id$/) do
62
62
  expect(page).to have_selector ".tracking_id", text: @quotation.tracking_id
63
63
  end
64
64
 
@@ -28,7 +28,7 @@ When(/^I edit the activity type$/) do
28
28
  find(".link_update").click
29
29
  end
30
30
 
31
- Then(/^the current activity type's name should be pre\-filled$/) do
31
+ Then(/^the current activity type's name should be pre-filled$/) do
32
32
  expect(page).to have_field("activity_type_name", with: @activity_type.name)
33
33
  end
34
34
 
@@ -65,3 +65,14 @@ end
65
65
  When(/^I go on this individual$/) do
66
66
  visit dorsale.customer_vault_individual_path(@individual)
67
67
  end
68
+
69
+ When("I create corporation from individual") do
70
+ find("a[href*=corporation][href$=new]").click
71
+ fill_in :person_corporation_name, with: "agilidée"
72
+ find("#modal [type=submit]").click
73
+ end
74
+
75
+ Then("the new corporation is associated to individual") do
76
+ expect(@individual.corporation).to be_present
77
+ expect(@individual.corporation.name).to eq "agilidée"
78
+ end
@@ -28,7 +28,7 @@ When(/^I edit the origin$/) do
28
28
  find(".link_update").click
29
29
  end
30
30
 
31
- Then(/^the current origin's name should be pre\-filled$/) do
31
+ Then(/^the current origin's name should be pre-filled$/) do
32
32
  expect(page).to have_field("origin_name", with: @origin.name)
33
33
  end
34
34
 
@@ -1,48 +1,48 @@
1
- Lorsqu(/^he go to the people list$/) do
1
+ When(/^he go to the people list$/) do
2
2
  visit dorsale.customer_vault_people_path
3
3
  end
4
4
 
5
- Etantdonné(/^existing individuals$/) do
5
+ Given(/^existing individuals$/) do
6
6
  @individual1 = create(:customer_vault_individual, first_name: "Jean", last_name: "DUPONT")
7
7
  @individual2 = create(:customer_vault_individual, first_name: "Laurent", last_name: "DURAND")
8
8
  end
9
9
 
10
- Etantdonné(/^existing corporations$/) do
10
+ Given(/^existing corporations$/) do
11
11
  @corporation1 = create(:customer_vault_corporation, name: "aaa", email: "contact@aaa.com")
12
12
  @corporation2 = create(:customer_vault_corporation, name: "zzz", email: "contact@zzz.com")
13
13
  end
14
14
 
15
- Lorsqu(/^he search an individual by first name$/) do
15
+ When(/^he search an individual by first name$/) do
16
16
  fill_in "q", with: "Jean"
17
17
  find(".search-submit").click
18
18
  end
19
19
 
20
- Alors(/^this individual appear in search results$/) do
20
+ Then(/^this individual appear in search results$/) do
21
21
  expect(page).to have_content "Jean"
22
22
  expect(page).to have_content "DUPONT"
23
23
  end
24
24
 
25
- Alors(/^other individuals do not appear in search results$/) do
25
+ Then(/^other individuals do not appear in search results$/) do
26
26
  expect(page).to have_no_content "Laurent"
27
27
  expect(page).to have_no_content "DURAND"
28
28
  end
29
29
 
30
- Lorsqu(/^he search an individual by last name$/) do
30
+ When(/^he search an individual by last name$/) do
31
31
  fill_in "q", with: "DUPONT"
32
32
  find(".search-submit").click
33
33
  end
34
34
 
35
- Lorsqu(/^he search a corporation by name$/) do
35
+ When(/^he search a corporation by name$/) do
36
36
  fill_in "q", with: "aaa"
37
37
  find(".search-submit").click
38
38
  end
39
39
 
40
- Alors(/^this corporation appear in search results$/) do
40
+ Then(/^this corporation appear in search results$/) do
41
41
  expect(page).to have_content "aaa"
42
42
  expect(page).to have_content "contact@aaa.com"
43
43
  end
44
44
 
45
- Alors(/^other corporations do not appear in search results$/) do
45
+ Then(/^other corporations do not appear in search results$/) do
46
46
  expect(page).to have_no_content "zzz"
47
47
  expect(page).to have_no_content "contact@zzz.com"
48
48
  end
@@ -28,7 +28,7 @@ When(/^I edit the expense category$/) do
28
28
  find(".link_update").click
29
29
  end
30
30
 
31
- Then(/^the current expense category's label should be pre\-filled$/) do
31
+ Then(/^the current expense category's label should be pre-filled$/) do
32
32
  expect(page).to have_field("category_name", with: @category.name)
33
33
  end
34
34
 
@@ -48,7 +48,7 @@ module Dorsale
48
48
  end
49
49
  end
50
50
 
51
- initializer "check_pundit_policies" do
51
+ config.after_initialize do
52
52
  Dorsale::PolicyChecker.check! if Rails.env.test? || Rails.env.development?
53
53
  end
54
54
 
@@ -1,3 +1,3 @@
1
1
  module Dorsale
2
- VERSION = "3.14.5"
2
+ VERSION = "3.14.10"
3
3
  end
@@ -36,7 +36,7 @@ describe Dorsale::BillingMachine::Quotation do
36
36
  end
37
37
 
38
38
  it "default state should be pending" do
39
- expect(described_class.new.state).to eq "pending"
39
+ expect(described_class.new.state).to eq "draft"
40
40
  end
41
41
  end
42
42
 
@@ -50,6 +50,6 @@ RSpec.describe Dorsale::BillingMachine::Quotation::Copy do
50
50
 
51
51
  it "should reset state to pending" do
52
52
  expect(quotation.reload.state).to eq "canceled"
53
- expect(copy.reload.state).to eq "pending"
53
+ expect(copy.reload.state).to eq "draft"
54
54
  end
55
55
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dorsale
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.5
4
+ version: 3.14.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-17 00:00:00.000000000 Z
11
+ date: 2020-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -288,6 +288,20 @@ dependencies:
288
288
  - - "<"
289
289
  - !ruby/object:Gem::Version
290
290
  version: '99'
291
+ - !ruby/object:Gem::Dependency
292
+ name: ttfunk
293
+ requirement: !ruby/object:Gem::Requirement
294
+ requirements:
295
+ - - "<"
296
+ - !ruby/object:Gem::Version
297
+ version: 1.6.0
298
+ type: :runtime
299
+ prerelease: false
300
+ version_requirements: !ruby/object:Gem::Requirement
301
+ requirements:
302
+ - - "<"
303
+ - !ruby/object:Gem::Version
304
+ version: 1.6.0
291
305
  - !ruby/object:Gem::Dependency
292
306
  name: combine_pdf
293
307
  requirement: !ruby/object:Gem::Requirement
@@ -700,6 +714,7 @@ files:
700
714
  - app/views/dorsale/customer_vault/people/_list_item.html.slim
701
715
  - app/views/dorsale/customer_vault/people/_show_layout.html.slim
702
716
  - app/views/dorsale/customer_vault/people/_show_tabs.html.slim
717
+ - app/views/dorsale/customer_vault/people/create_corporation_js.html.slim
703
718
  - app/views/dorsale/customer_vault/people/edit.html.slim
704
719
  - app/views/dorsale/customer_vault/people/index.html.slim
705
720
  - app/views/dorsale/customer_vault/people/index.xlsx.ruby
@@ -959,7 +974,7 @@ homepage: https://github.com/agilidee/dorsale
959
974
  licenses:
960
975
  - Nonstandard
961
976
  metadata: {}
962
- post_install_message:
977
+ post_install_message:
963
978
  rdoc_options: []
964
979
  require_paths:
965
980
  - lib
@@ -975,7 +990,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
975
990
  version: '0'
976
991
  requirements: []
977
992
  rubygems_version: 3.0.3
978
- signing_key:
993
+ signing_key:
979
994
  specification_version: 4
980
995
  summary: Modular ERP made with Ruby on Rails
981
996
  test_files: