dorsale 3.14.3 → 3.14.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -0
  3. data/Rakefile +2 -0
  4. data/app/pdfs/dorsale/application_pdf.rb +11 -1
  5. data/app/pdfs/dorsale/expense_gun/expense_pdf.rb +75 -0
  6. data/app/views/dorsale/expense_gun/expenses/_show_actions.html.slim +2 -0
  7. data/app/views/dorsale/expense_gun/expenses/show.pdf.ruby +3 -0
  8. data/lib/dorsale/version.rb +1 -1
  9. metadata +125 -358
  10. data/features/access.feature +0 -17
  11. data/features/billing_machine_invoices.feature +0 -261
  12. data/features/billing_machine_multiple_vat.feature +0 -53
  13. data/features/billing_machine_payment_terms.feature +0 -19
  14. data/features/billing_machine_quotations.feature +0 -193
  15. data/features/customer_vault_activity_types.feature +0 -19
  16. data/features/customer_vault_corporations.feature +0 -95
  17. data/features/customer_vault_filters.feature +0 -14
  18. data/features/customer_vault_individuals.feature +0 -35
  19. data/features/customer_vault_invoices.feature +0 -10
  20. data/features/customer_vault_links.feature +0 -54
  21. data/features/customer_vault_origins.feature +0 -19
  22. data/features/customer_vault_people.feature +0 -25
  23. data/features/customer_vault_search.feature +0 -22
  24. data/features/customer_vault_tasks.feature +0 -35
  25. data/features/expense_gun_categories.feature +0 -19
  26. data/features/expense_gun_expenses.feature +0 -60
  27. data/features/flyboy_task_comments.feature +0 -21
  28. data/features/flyboy_tasks.feature +0 -122
  29. data/features/flyboy_tasks_summary.feature +0 -22
  30. data/features/step_definitions/access_steps.rb +0 -15
  31. data/features/step_definitions/alexandrie_steps.rb +0 -25
  32. data/features/step_definitions/billing_machine_invoices_steps.rb +0 -377
  33. data/features/step_definitions/billing_machine_multiple_vat.rb +0 -19
  34. data/features/step_definitions/billing_machine_payment_terms_steps.rb +0 -42
  35. data/features/step_definitions/billing_machine_quotations_steps.rb +0 -248
  36. data/features/step_definitions/common_steps.rb +0 -91
  37. data/features/step_definitions/customer_vault_activity_types_steps.rb +0 -42
  38. data/features/step_definitions/customer_vault_corporations_steps.rb +0 -218
  39. data/features/step_definitions/customer_vault_filters_steps.rb +0 -37
  40. data/features/step_definitions/customer_vault_individuals_steps.rb +0 -67
  41. data/features/step_definitions/customer_vault_invoices_steps.rb +0 -7
  42. data/features/step_definitions/customer_vault_links_steps.rb +0 -73
  43. data/features/step_definitions/customer_vault_origins_steps.rb +0 -42
  44. data/features/step_definitions/customer_vault_people_steps.rb +0 -26
  45. data/features/step_definitions/customer_vault_search_steps.rb +0 -48
  46. data/features/step_definitions/customer_vault_tasks_steps.rb +0 -34
  47. data/features/step_definitions/expense_gun_categories_steps.rb +0 -50
  48. data/features/step_definitions/expense_gun_expenses_steps.rb +0 -135
  49. data/features/step_definitions/flyboy_task_comments_steps.rb +0 -10
  50. data/features/step_definitions/flyboy_tasks_steps.rb +0 -196
  51. data/features/step_definitions/tasks_summary_steps.rb +0 -30
  52. data/features/step_definitions/users_management_step.rb +0 -29
  53. data/features/support/env.rb +0 -8
  54. data/features/users_management.feature +0 -18
  55. data/spec/controllers/dorsale/alexandrie/attachments_controller_spec.rb +0 -145
  56. data/spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb +0 -153
  57. data/spec/controllers/dorsale/billing_machine/quotations_controller_spec.rb +0 -24
  58. data/spec/controllers/dorsale/comments_controller_spec.rb +0 -50
  59. data/spec/controllers/dorsale/customer_vault/events_controller_spec.rb +0 -42
  60. data/spec/controllers/dorsale/customer_vault/people_controller_spec.rb +0 -129
  61. data/spec/controllers/dorsale/expense_gun/expenses_controller_spec.rb +0 -45
  62. data/spec/controllers/dorsale/flyboy/task_comments_controller_spec.rb +0 -40
  63. data/spec/controllers/dorsale/flyboy/tasks_controller_spec.rb +0 -349
  64. data/spec/factories/alexandrie_attachment_types.rb +0 -5
  65. data/spec/factories/alexandrie_attachments.rb +0 -16
  66. data/spec/factories/billing_machine_invoice_lines.rb +0 -9
  67. data/spec/factories/billing_machine_invoices.rb +0 -9
  68. data/spec/factories/billing_machine_payment_terms.rb +0 -5
  69. data/spec/factories/billing_machine_quotation_lines.rb +0 -9
  70. data/spec/factories/billing_machine_quotations.rb +0 -9
  71. data/spec/factories/customer_vault_activity_types.rb +0 -5
  72. data/spec/factories/customer_vault_corporations.rb +0 -13
  73. data/spec/factories/customer_vault_event.rb +0 -13
  74. data/spec/factories/customer_vault_individuals.rb +0 -17
  75. data/spec/factories/customer_vault_links.rb +0 -7
  76. data/spec/factories/customer_vault_origins.rb +0 -5
  77. data/spec/factories/dorsale_addresses.rb +0 -9
  78. data/spec/factories/dorsale_comments.rb +0 -7
  79. data/spec/factories/expense_gun_categories.rb +0 -7
  80. data/spec/factories/expense_gun_expense_lines.rb +0 -10
  81. data/spec/factories/expense_gun_expenses.rb +0 -13
  82. data/spec/factories/flyboy_task_comments.rb +0 -9
  83. data/spec/factories/flyboy_tasks.rb +0 -8
  84. data/spec/files/avatar.png +0 -0
  85. data/spec/files/pdf.pdf +0 -0
  86. data/spec/mailers/user_mailer_spec.rb +0 -21
  87. data/spec/models/dorsale/address_spec.rb +0 -46
  88. data/spec/models/dorsale/alexandrie/attachment_spec.rb +0 -36
  89. data/spec/models/dorsale/alexandrie/attachment_type_spec.rb +0 -11
  90. data/spec/models/dorsale/billing_machine/invoice_line_spec.rb +0 -52
  91. data/spec/models/dorsale/billing_machine/invoice_spec.rb +0 -258
  92. data/spec/models/dorsale/billing_machine/quotation_line_spec.rb +0 -51
  93. data/spec/models/dorsale/billing_machine/quotation_spec.rb +0 -213
  94. data/spec/models/dorsale/billing_machine_spec.rb +0 -57
  95. data/spec/models/dorsale/comment_spec.rb +0 -24
  96. data/spec/models/dorsale/customer_vault/activity_type_spec.rb +0 -10
  97. data/spec/models/dorsale/customer_vault/corporation_spec.rb +0 -33
  98. data/spec/models/dorsale/customer_vault/event_spec.rb +0 -22
  99. data/spec/models/dorsale/customer_vault/individual_spec.rb +0 -44
  100. data/spec/models/dorsale/customer_vault/link_spec.rb +0 -14
  101. data/spec/models/dorsale/customer_vault/origin_spec.rb +0 -8
  102. data/spec/models/dorsale/customer_vault/person_spec.rb +0 -112
  103. data/spec/models/dorsale/email_spec.rb +0 -39
  104. data/spec/models/dorsale/expense_gun/category_spec.rb +0 -9
  105. data/spec/models/dorsale/expense_gun/expense_line_spec.rb +0 -59
  106. data/spec/models/dorsale/expense_gun/expense_spec.rb +0 -176
  107. data/spec/models/dorsale/flyboy/task_comment_spec.rb +0 -54
  108. data/spec/models/dorsale/flyboy/task_spec.rb +0 -254
  109. data/spec/models/dorsale/i18n_spec.rb +0 -30
  110. data/spec/models/dorsale/users_spec.rb +0 -65
  111. data/spec/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf_spec.rb +0 -42
  112. data/spec/pdfs/dorsale/billing_machine/invoice_single_vat_pdf_spec.rb +0 -42
  113. data/spec/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf_spec.rb +0 -42
  114. data/spec/pdfs/dorsale/billing_machine/quotation_single_vat_pdf_spec.rb +0 -55
  115. data/spec/rails_helper.rb +0 -55
  116. data/spec/routing/dorsale/alexandrie/attachments_routing_spec.rb +0 -32
  117. data/spec/routing/dorsale/billing_machine/invoices_routing_spec.rb +0 -67
  118. data/spec/routing/dorsale/billing_machine/quotations_routing_spec.rb +0 -67
  119. data/spec/routing/dorsale/comments_routing_spec.rb +0 -23
  120. data/spec/routing/dorsale/customer_vault/activity_types_routing_spec.rb +0 -40
  121. data/spec/routing/dorsale/customer_vault/events_routing_spec.rb +0 -12
  122. data/spec/routing/dorsale/customer_vault/origins_routing_spec.rb +0 -40
  123. data/spec/routing/dorsale/customer_vault/people_routing_spec.rb +0 -109
  124. data/spec/routing/dorsale/expense_gun/expenses_routing_spec.rb +0 -62
  125. data/spec/routing/dorsale/flyboy/task_comments_routing_spec.rb +0 -11
  126. data/spec/routing/dorsale/flyboy/tasks_routing_spec.rb +0 -51
  127. data/spec/routing/dorsale/users_routing_spec.rb +0 -38
  128. data/spec/services/dorsale/billing_machine/quotation/copy_spec.rb +0 -55
  129. data/spec/services/dorsale/billing_machine/quotation/statistics.rb +0 -23
  130. data/spec/services/dorsale/billing_machine/quotation/to_invoice_spec.rb +0 -46
  131. data/spec/services/dorsale/expense_gun/expense/copy_spec.rb +0 -83
  132. data/spec/services/dorsale/flyboy/task/copy_spec.rb +0 -24
  133. data/spec/services/dorsale/flyboy/task/snoozer_spec.rb +0 -117
  134. data/spec/spec_helper.rb +0 -86
  135. data/spec/support/devise.rb +0 -3
  136. data/spec/support/message_delivery.rb +0 -5
@@ -1,17 +0,0 @@
1
- @javascript
2
- Feature: Users
3
- As a user
4
- I want to access the application
5
- In order to use it
6
-
7
- Scenario: Active user can login
8
- Given an active user
9
- When he try to access to the application
10
- Then a message signal that's the user is logged
11
-
12
- Scenario: Inactive user cant login
13
- Given an inactive user
14
- When he try to access to the application
15
- Then an error message signal that's account is inactive
16
-
17
-
@@ -1,261 +0,0 @@
1
- @javascript
2
- Feature: Invoice Management
3
- As a user
4
- I want to create invoices
5
- In order to get paid!
6
-
7
- Background:
8
- Given an authenticated user
9
- Given billing machine in single vat mode
10
-
11
- Scenario: Existing invoice displayed in invoices page
12
- And an existing customer
13
- And an existing invoice
14
- When the user goes to the invoices page
15
- And the invoice line shows the right date
16
- And the invoice line shows the right traking-id
17
- And the invoice line shows the right customer's name
18
- And the invoice line shows the right total excluding taxes value
19
- And the invoice line shows the right total including taxes value
20
-
21
- Scenario: Paginate by 50 invoices
22
- Given 75 existing invoices
23
- When the user goes to the invoices page
24
- Then he should see 50 invoices
25
- When he goes on the next page
26
- Then he should see 25 invoices
27
-
28
- Scenario: Copy invoice
29
- And an existing invoice
30
- When the user goes to the invoice details
31
- And wants to copy it
32
- Then a new invoice is displayed with the informations
33
-
34
- Scenario: Send invoice by email
35
- Given an existing customer
36
- And an existing invoice
37
- When the user goes to the invoice details
38
- And he send invoice to customer by email
39
- Then an invoice is sent to customer
40
-
41
- Scenario: Empty invoice
42
- And an existing emtpy invoice
43
- When the user goes to the invoices page
44
- Then the invoice is displayed correctly
45
-
46
- Scenario: Invoice details
47
- And an existing invoice
48
- When the user goes to the invoice details
49
- Then he can see all the informations
50
-
51
- Scenario: Invoice preview
52
- When the user goes to the invoices page
53
- And he creates a new invoice
54
- And he click on the preview invoice button
55
- Then he see the invoice preview
56
- And no invoice is created
57
-
58
- Scenario: New invoice for existing customer
59
- And an existing customer
60
- And an existing payment term
61
- When the user goes to the invoices page
62
- And he creates a new invoice
63
- And he fills the reference, the date, the vat rate and the payment terms
64
- And he chooses the customer
65
- And he fills a line with "Bidule", "4", "€", "10"
66
- Then the new line total is "40,00"
67
- And the total excluding taxes is "40,00"
68
- When he adds a new line
69
- And he fills a line with "Machin truc", "8", "€", "20"
70
- Then the new line total is "160,00"
71
- And he fill the commercial discount with "20,00"
72
- Then the total excluding taxes is "180,00"
73
- And the VAT due is "36,00"
74
- And the total including taxes is "216,00"
75
- When he saves the invoice
76
- Then a message signals the success of the creation
77
- Then it's added to the invoice list
78
-
79
- Scenario: Edit invoice
80
- And an existing invoice
81
- When the user goes to the invoice details
82
- And he goes on the edit page of the invoice
83
- And changes the label
84
- When he saves the invoice
85
- Then a message signals the success of the update
86
- Then the invoices's label has changed
87
-
88
- Scenario: New invoice with advance and commercial discount
89
- When the user goes to the invoices page
90
- And he creates a new invoice
91
- And he fills a line with "Bidule", "1", "€", "100"
92
- Then the total including taxes is "120,00"
93
- And the advance is "0,00"€
94
- And the commercial discount is "0,00"€
95
- And the balance is "120,00"
96
- When he changes the advance to "30"€
97
- When he changes the commercial discount to "10"€
98
- Then the balance is "78,00"
99
- When he saves the invoice
100
- Then a message signals the success of the creation
101
- When he goes to the newly created invoice page
102
- Then the advance is "30,00"€
103
- Then the commercial discount is "10,00"€
104
- Then the balance is "78,00"
105
-
106
- Scenario: New invoice with default date
107
- When the user goes to the invoices page
108
- And he creates a new invoice
109
- Then the invoice default date is set to today's date.
110
- Then the invoice default due date is set to today's date.
111
-
112
- Scenario: New invoice with default VAT rate
113
- When the user goes to the invoices page
114
- And he creates a new invoice
115
- Then the VAT rate is "20,00"
116
-
117
- Scenario: Existing invoice with non default VAT rate
118
- And an existing invoice with a "19.6"% VAT rate
119
- And he goes on the edit page of the invoice
120
- Then the VAT rate is "19,60"
121
-
122
- Scenario: New invoice with non default VAT rate
123
- When the user goes to the invoices page
124
- And he creates a new invoice
125
- And he fills a line with "Bidule", "1", "€", "100"
126
- And he changes the VAT rate to "19.6"
127
- Then the VAT rate is "19,60"
128
- And the VAT due is "19,60"
129
- And the total including taxes is "119,60"
130
-
131
- Scenario: Change values without saving(test live preview)
132
- When the user goes to the invoices page
133
- And he creates a new invoice
134
- And he fills a line with "Bidule", "2", "€", "50"
135
- Then the new line total is "100,00"
136
- And he fills a line with "Bidule", "10", "€", "100"
137
- Then the new line total is "1 000,00"
138
- And the total excluding taxes is "1 000,00"
139
- And he changes the commercial discount to "100"€
140
- Then the total excluding taxes is "900,00"
141
- And the VAT due is "180,00"
142
- And the total including taxes is "1 080,00"
143
- And he changes the commercial discount to "0"€
144
- Then the total excluding taxes is "1 000,00"
145
- And the VAT due is "200,00"
146
- And the total including taxes is "1 200,00"
147
- And he changes the VAT rate to "19.6"
148
- And the VAT due is "196,00"
149
- And the total including taxes is "1 196,00"
150
-
151
- Scenario: Export invoices in XLSX
152
- And an existing invoice
153
- When the user goes to the invoices page
154
- When I export to XLSX
155
- Then I download XLSX file
156
-
157
- Scenario: Existing unpaid invoice set to paid
158
- And an existing invoice
159
- When the user goes to the invoice details
160
- Then the invoice is marked unpaid
161
- And he set the invoice as paid
162
- Then the invoice is marked paid
163
- And a message signals that the invoice is set to paid
164
- And the invoice status is set to paid
165
- And can't set the invoice as paid again
166
-
167
- Scenario: Existing paid invoice set to unpaid
168
- And an existing paid invoice
169
- When the user goes to the invoices page
170
- Then the invoice is marked paid
171
- And can't set the invoice as paid again
172
- And he goes on the edit page of the invoice
173
- When he marks the invoice as unpaid
174
- And he saves the invoice
175
- Then a message signals the success of the update
176
- And the invoice status is set to unpaid
177
-
178
- Scenario: Filter by customer
179
- Given a bunch of existing invoices
180
- When the user goes to the invoices page
181
- When he filters by one customer
182
- Then only the invoices of this customer do appear
183
-
184
- Scenario: Filter by date
185
- Given a bunch of existing invoices
186
- When the user goes to the invoices page
187
- When he filters by date on today
188
- Then only the invoices of today do appear
189
-
190
- Scenario: Filter by custom dates
191
- Given a bunch of existing invoices
192
- When the user goes to the invoices page
193
- Then he do not see the "bm_date_begin" filter
194
- Then he do not see the "bm_date_end" filter
195
- When he select custom date filter
196
- Then he see the "bm_date_begin" filter
197
- Then he see the "bm_date_end" filter
198
- When he filters invoices between two date
199
- Then only the invoices of today do appear
200
- Then he see the "bm_date_begin" filter
201
- Then he see the "bm_date_end" filter
202
- When he reset filters
203
- Then he do not see the "bm_date_begin" filter
204
- Then he do not see the "bm_date_end" filter
205
-
206
- Scenario: Filter by status
207
- Given a bunch of existing invoices
208
- When the user goes to the invoices page
209
- When he filters by status on paid
210
- Then only the invoices paid do appear
211
- And the selected filter is "paid"
212
-
213
- Scenario: Existing invoice displayed in invoices page
214
- Given an existing invoice
215
- When the user goes to the invoices page
216
- Then the invoice line shows the right date
217
-
218
- Scenario: Paid invoice green in list
219
- Given an existing paid invoice
220
- When the user goes to the invoices page
221
- Then the invoice status should be "paid"
222
-
223
- Scenario: Unpaid invoice with due date not passed have no color in list
224
- Given an existing unpaid invoice
225
- And its due date is not yet passed
226
- When the user goes to the invoices page
227
- Then the invoice paid status should not have a color
228
-
229
- Scenario: Unpaid invoice with due date the same day have no color in list
230
- Given an existing unpaid invoice
231
- And its due date is the same day
232
- When the user goes to the invoices page
233
- Then the invoice paid status should not have a color
234
-
235
- Scenario: Unpaid invoice with due date just passed appears orange in list
236
- Given an existing unpaid invoice
237
- And its due date is yesterday
238
- When the user goes to the invoices page
239
- Then the invoice status should be "late"
240
-
241
- Scenario: Unpaid invoice with due date passed by 15 days appears orange in list
242
- Given an existing unpaid invoice
243
- And its due date is 14 days ago
244
- When the user goes to the invoices page
245
- Then the invoice status should be "late"
246
-
247
- Scenario: Unpaid invoice with due date passed by 16 days appears red in list
248
- Given an existing unpaid invoice
249
- And its due date is 15 days ago
250
- When the user goes to the invoices page
251
- Then the invoice status should be "on_alert"
252
-
253
- Scenario: Invoice Pdf with valid name
254
- Given an existing customer
255
- Given an existing invoice
256
- When the user download the pdf
257
-
258
- Scenario: Invoices data
259
- Given existing "100" invoices with "123" amount
260
- When the user goes to the invoices page
261
- Then data total amount is "12 300"
@@ -1,53 +0,0 @@
1
- @javascript
2
- Feature: Invoice Management
3
- As a user
4
- I want to create invoices and quotations with multiple vat
5
- In order to get paid!
6
-
7
- Background:
8
- Given an authenticated user
9
- Given billing machine in multiple vat mode
10
- And an existing customer
11
- And an existing payment term
12
-
13
- Scenario: New invoice for existing customer
14
- When the user goes to the invoices page
15
- And he creates a new invoice
16
- And he fills the reference, the date and the payment terms
17
- And he chooses the customer
18
- And he fills a multiple vat line with "Bidule", "4", "€", "20", "10"
19
- Then the new line total is "40,00"
20
- And the total excluding taxes is "40,00"
21
- When he adds a new line
22
- And he fills a multiple vat line with "Machin truc", "8", "€", "10", "20"
23
- Then the new line total is "160,00"
24
- And he fill the commercial discount with "20,00"
25
- Then the total excluding taxes is "180,00"
26
- And the VAT due is "21,60"
27
- And the total including taxes is "201,60"
28
- When he saves the invoice
29
- Then a message signals the success of the creation
30
- Then it's added to the invoice list
31
-
32
- Scenario: New quotation for existing customer
33
- And an existing customer
34
- And an existing payment term
35
- When the user goes to the quotations page
36
- And he creates a new quotation
37
- And he fills the reference and the date
38
- And he fill the quotation expiry
39
- And he chooses the customer
40
- And he fills a multiple vat line with "Bidule", "4", "€", "20", "10"
41
- Then the new line total is "40,00"
42
- And the total excluding taxes is "40,00"
43
- When he adds a new line
44
- And he fills a multiple vat line with "Machin truc", "8", "€", "10", "20"
45
- Then the new line total is "160,00"
46
- And he fill the quotation commercial discount with "20,00"
47
- And the total excluding taxes is "180,00"
48
- And the VAT due is "21,60"
49
- And the total including taxes is "201,60"
50
- When he saves the quotation
51
- Then a message signals the success of the quotation creation
52
- Then I am on the created quotation
53
- And the quotation informations are visible on the quotation details
@@ -1,19 +0,0 @@
1
- @javascript
2
- Feature: PaymentTerm
3
-
4
- Scenario: New payment_term
5
- Given an authenticated user
6
- And the user goes on the new payment_term page
7
- When he fills the payment_term's information
8
- And creates a new payment_term
9
- Then he is redirected on the payment_terms page
10
- And the payment_term is added to the payment_term list
11
-
12
- Scenario: Update payment_term
13
- Given an authenticated user
14
- And an existing payment_term
15
- When the user edits the payment_term
16
- Then the current payment_term's label should be pre-filled
17
- When he validates the new payment_term
18
- Then he is redirected on the payment_terms page
19
- And the payment_term's label is updated
@@ -1,193 +0,0 @@
1
- @javascript
2
- Feature: Quotation Management
3
- As a user
4
- I want to create quotations
5
- In order to give them to my future customers
6
-
7
- Background:
8
- Given an authenticated user
9
- Given billing machine in single vat mode
10
-
11
- Scenario: Existing quotation displayed in quotations page
12
- And an existing customer
13
- And an existing quotation
14
- When the user goes to the quotations page
15
- And the quotation line shows the right date
16
- And the quotation line shows the right traking-id
17
- And the quotation line shows the right customer's name
18
- And the quotation line shows the right total excluding taxes value
19
- And the quotation line shows the right total including taxes value
20
-
21
- Scenario: Paginate by 50 quotations
22
- Given 75 existing quotations
23
- When the user goes to the quotations page
24
- Then he should see 50 quotations
25
- When he goes on the next page
26
- Then he should see 25 quotations
27
-
28
- Scenario: Empty quotation
29
- And an existing emtpy quotation
30
- When the user goes to the quotations page
31
- Then the quotation is displayed correctly
32
-
33
- Scenario: Quotation details
34
- And an existing quotation
35
- When the user goes to the quotation details
36
- Then he can see all the quotation informations
37
-
38
- Scenario: Quotation preview
39
- When the user goes to the quotations page
40
- And he creates a new quotation
41
- And he click on the preview quotation button
42
- Then he see the quotation preview
43
- And no quotation is created
44
-
45
- Scenario: Quotation copy
46
- Given an existing quotation
47
- When the user goes to the quotation details
48
- And he copy the quotation
49
- Then he is on the created quotation edit page
50
-
51
- Scenario: Send quotation by email
52
- Given an existing customer
53
- And an existing quotation
54
- When the user goes to the quotation details
55
- And he send quotation to customer by email
56
- Then an quotation is sent to customer
57
-
58
- Scenario: Quotation to invoice
59
- Given an existing quotation
60
- When the user goes to the quotation details
61
- And he create an invoice from the quotation
62
- Then an invoice is created from quotation
63
-
64
- Scenario: New quotation for existing customer
65
- And an existing customer
66
- And an existing payment term
67
- When the user goes to the quotations page
68
- And he creates a new quotation
69
- And he fills the reference and the date
70
- And he fill the quotation expiry
71
- And he chooses the customer
72
- And he fills a line with "Bidule", "4", "€", "10"
73
- Then the new line total is "40,00"
74
- And the total excluding taxes is "40,00"
75
- When he adds a new line
76
- And he fills a line with "Machin truc", "8", "€", "20"
77
- Then the new line total is "160,00"
78
- And he fill the quotation commercial discount with "20,00"
79
- And the total excluding taxes is "180,00"
80
- And the VAT due is "36,00"
81
- And the total including taxes is "216,00"
82
- When he saves the quotation
83
- Then a message signals the success of the quotation creation
84
- Then I am on the created quotation
85
- And the quotation informations are visible on the quotation details
86
-
87
- Scenario: Edit quotation
88
- And an existing quotation
89
- When the user goes to the quotation details
90
- And he goes on the edit page of the quotation
91
- And changes the quotation label
92
- When he saves the quotation
93
- Then a message signals the success of the quotation update
94
- Then the quotation's label has changed
95
-
96
- Scenario: New quotation with default date
97
- When the user goes to the quotations page
98
- And he creates a new quotation
99
- Then the quotation default date is set to today's date.
100
-
101
- Scenario: New quotation with default VAT rate
102
- When the user goes to the quotations page
103
- And he creates a new quotation
104
- Then the VAT rate is "20,00"
105
-
106
- Scenario: Existing quotation with non default VAT rate
107
- And an existing quotation with a "19.6"% VAT rate
108
- And he goes on the edit page of the quotation
109
- Then the VAT rate is "19,60"
110
-
111
- Scenario: New quotation with non default VAT rate
112
- When the user goes to the quotations page
113
- And he creates a new quotation
114
- And he fills a line with "Bidule", "1", "€", "100"
115
- And he changes the quotation VAT rate to "19.6"
116
- Then the VAT rate is "19,60"
117
- And the VAT due is "19,60"
118
- And the total including taxes is "119,60"
119
-
120
- Scenario: Change quotation values without saving(test live preview)
121
- When the user goes to the quotations page
122
- And he creates a new quotation
123
- And he fills a line with "Bidule", "2", "€", "50"
124
- Then the new line total is "100,00"
125
- And he fills a line with "Bidule", "10", "€", "100"
126
- Then the new line total is "1 000,00"
127
- And the VAT due is "200,00"
128
- And he fill the commercial discount with "100,00"
129
- And the total excluding taxes is "900,00"
130
- And the VAT due is "180,00"
131
- And the total including taxes is "1 080,00"
132
- And he fill the commercial discount with "0,00"
133
- And the total excluding taxes is "1 000,00"
134
- And the total including taxes is "1 200,00"
135
- And he changes the quotation VAT rate to "19.6"
136
- And the VAT due is "196,00"
137
- And the total including taxes is "1 196,00"
138
-
139
- Scenario: Existing quotation has is associated documents shown on the show page
140
- And an existing quotation
141
- And 2 associated documents to this quotation
142
- When the user goes to the quotation details
143
- Then he will see links to the documents
144
-
145
- Scenario: Delete a document
146
- And an existing quotation
147
- And 2 associated documents to this quotation
148
- When the user goes to the quotation details
149
- And he delete a document
150
- And the document is not in the quotation details
151
-
152
- Scenario: Create a document
153
- And an existing quotation
154
- When the user goes to the quotation details
155
- And he add a new document
156
- And the document is in the quotation details
157
-
158
- Scenario: Update a document
159
- And an existing quotation
160
- When the user goes to the quotation details
161
- And he add a new document
162
- And the document is in the quotation details
163
- When he update the document
164
- Then the document is updated
165
-
166
- Scenario: Filter by customer
167
- Given a bunch of existing quotations
168
- When the user goes to the quotations page
169
- When he filters by one customer
170
- Then only the quotations of this customer do appear
171
-
172
- Scenario: Filter by date
173
- Given a bunch of existing quotations
174
- When the user goes to the quotations page
175
- When he filters by date on today
176
- Then only the quotations of today do appear
177
-
178
- Scenario: Filter by state
179
- Given an existing "billing_machine_quotation" having "state" set to "accepted"
180
- Given an existing "billing_machine_quotation" having "state" set to "canceled"
181
- When the user goes to the quotations page
182
- When he filters by "accepted" state
183
- Then only the "accepted" quotations appear
184
- When he filters by "canceled" state
185
- Then only the "canceled" quotations appear
186
- When he filters by "not_canceled" state
187
- Then only the "accepted" quotations appear
188
- And the selected filter is "not_canceled"
189
-
190
- Scenario: Quotations data
191
- Given existing "100" quotations with "123" amount
192
- When the user goes to the quotations page
193
- Then data total amount is "12 300"