Commit Graph

28821 Commits

Author SHA1 Message Date
Gaetan Craig-Riou
9e49da8fae Add unit test for Reporting::Reports::SalesTax::SalesTaxTotalsByOrder
And a small refactoring.
Currently it only covers tax excluded from price
2023-09-22 10:17:50 +02:00
Gaetan Craig-Riou
3197480121 Prevent voucher from starting with "Tax"
Plus spec
2023-09-22 10:17:50 +02:00
Gaetan Craig-Riou
bec5ad55dd Use VoucherAdjustmentsService to retrieve tax part of the voucher 2023-09-22 10:17:50 +02:00
Gaetan Craig-Riou
7c34145ed7 Add voucher_included_tax and voucher_excluded_tax
It retrieves the tax part of the voucher adjustment for tax included
in price and tax excluded from price respectively.
2023-09-22 10:17:40 +02:00
Gaetan Craig-Riou
776f478038 Make update the only public method
I think this got lost when refactoring, but only `update` is meant
to be a public method, other than `new`.
2023-09-15 11:42:04 +02:00
Gaetan Craig-Riou
0c005ad734 Sales Tax Totals by order included tax, fix tax amount when voucher applied
Plus specs
2023-09-14 10:21:50 +02:00
Gaetan Craig-Riou
9925399292 Sales Tax Totals by order, fix tax amount when voucher applied
Apply the tax discount to the tax collumn when a voucher is added
to the order, and update total excluding tax accordingly.
2023-09-12 14:36:28 +02:00
Gaetan Craig-Riou
a7bceb0b28 Add spec scenario where a voucher is added to the order
Voucher tax portion needs to be removed from the tax amount so we
can display the correct tax in the report.
2023-09-12 14:14:01 +02:00
Gaetan Craig-Riou
29a4bf88d7 DRY up specs 2023-09-12 14:13:04 +02:00
Gaetan Craig-Riou
8face3d182 Merge pull request #11488 from macanudo527/fix_helperinstancevariable_2
Fix Rails/HelperInstanceVariable 2
2023-09-08 19:51:39 +10:00
Maikel
1991970185 Merge pull request #11377 from mkllnk/dfc-update-request
[DFC API] Import known units when creating new products
2023-09-08 09:05:26 +10:00
Filipe
b64c1c2675 Merge pull request #11349 from dacook/foundation-sites-5.5.3
chore(deps): bump foundation-sites from 5.5.2 to 5.5.3
2023-09-07 18:33:43 +01:00
Filipe
ccabf5936d Merge pull request #11505 from drummer83/master
[Super admin] Highlight 'Configuration' tab on 'Terms of Service' page
2023-09-07 18:00:18 +01:00
Konrad
ea622cd2d7 Merge pull request #11487 from pedrocarmona/feature/invitation-email-locale
Send translated email when creating users via super admin interface
2023-09-07 16:41:59 +02:00
David Cook
ab5e16effb chore(deps): bump foundation-sites from 5.5.2 to 5.5.3
Better 7 years late than never...

This resolves CWE-79: https://security.snyk.io/vuln/npm:foundation-sites:20150619
2023-09-07 11:45:37 +10:00
drummer83
a7ddf99ee4 Fix typo 2023-09-06 23:20:12 +02:00
drummer83
13d5b954e6 Add 'Terms of Service' to the tabs 2023-09-06 23:18:00 +02:00
Konrad
3b9ebf4e07 Merge pull request #11396 from abdellani/fix-if-tos-is-not-set
fix If ToS file is not set, customer needs to accept Terms on each checkout
2023-09-06 16:56:21 +02:00
Neal Chambers
dbb758b73a Update .rubocop_todo.yml 2023-09-06 22:36:51 +09:00
Neal Chambers
2da9ffd3cb Delete Unused Helper Functions 2023-09-06 22:36:51 +09:00
Neal Chambers
b1e40ed605 Fix Rails/HelperInstanceVariable 2023-09-06 22:36:46 +09:00
jibees
d8f4f58c77 Merge pull request #11499 from openfoodfoundation/dependabot/bundler/web-console-4.2.1
chore(deps-dev): bump web-console from 4.2.0 to 4.2.1
2023-09-06 08:52:58 +02:00
dependabot[bot]
954e080cbf chore(deps-dev): bump web-console from 4.2.0 to 4.2.1
Bumps [web-console](https://github.com/rails/web-console) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/rails/web-console/releases)
- [Changelog](https://github.com/rails/web-console/blob/main/CHANGELOG.markdown)
- [Commits](https://github.com/rails/web-console/compare/v4.2.0...v4.2.1)

---
updated-dependencies:
- dependency-name: web-console
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-06 01:44:08 +00:00
David Cook
aaa3bebb93 Merge pull request #11495 from openfoodfoundation/dependabot/bundler/valid_email2-5.0.0
chore(deps): bump valid_email2 from 4.0.6 to 5.0.0
2023-09-06 11:39:26 +10:00
dependabot[bot]
3405865c0f chore(deps): bump valid_email2 from 4.0.6 to 5.0.0
Bumps [valid_email2](https://github.com/micke/valid_email2) from 4.0.6 to 5.0.0.
- [Changelog](https://github.com/micke/valid_email2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micke/valid_email2/compare/v4.0.6...v5.0.0)

---
updated-dependencies:
- dependency-name: valid_email2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-05 09:48:34 +00:00
David Cook
a096c56658 Merge pull request #11484 from openfoodfoundation/mkllnk-patch-1
Add release note category "API changes"
2023-09-05 13:29:55 +10:00
Maikel Linke
997c8a49ca Combine system specs for efficiency 2023-09-05 10:51:38 +10:00
Pedro Carmona
51050036d4 Use instance default locale as the default locale for a new user 2023-09-05 01:00:35 +01:00
Pedro Carmona
c4830e3baa Send localized email when creating users via admin interface
Based on the current user locale
2023-09-05 01:00:35 +01:00
David Cook
0874c7ddb8 Merge pull request #11309 from filipefurtad0/legal_invoices_spec_comparator
[Invoices] Adds unit level test coverage order model attributes
2023-09-05 09:45:00 +10:00
Maikel
b1a88ab7a9 Merge pull request #11490 from mkllnk/sample-data-validation
Skip online validation of sample emails
2023-09-05 09:28:16 +10:00
Konrad
c50a3b4f86 Merge pull request #11489 from mkllnk/order_cycle_schedule
Require associations on join model
2023-09-04 21:37:30 +02:00
Konrad
fd6f2338e5 Merge pull request #11450 from mkllnk/feature-toggle-enterprise
Activate vouchers feature per user or enterprise
2023-09-04 21:30:41 +02:00
filipefurtad0
82ca115931 Removes unnecessary && operator
reloads instead of saving order again
2023-09-04 19:35:28 +01:00
filipefurtad0
4e54279b05 Rearranges relevant and non-relevant test cases 2023-09-04 19:32:06 +01:00
Konrad
406577ed2a Merge pull request #11140 from jibees/11129-add-trix-editor-to-product-description-editor
Admin, add trix editor to product description editor (both new and edit)
2023-09-04 20:22:14 +02:00
Gaetan Craig-Riou
08c131680d Merge pull request #11471 from mkllnk/variant-supplier
[DFC API] Replace service class with simple AR association
2023-09-04 23:59:37 +10:00
Jean-Baptiste Bellet
b6b64e9439 Add trix editor to new product form 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
1d5d1c5405 Include trix-styles mixin in where content from trix is displayed 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
34dab4003d Create a mixin that include list of styles for trix editor + content
Will be used elsewhere (in shopfront in particular)
2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
c402093081 Special case for unordered list in trix editor: should be overwritten 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
ca6d12e8ed Actually, used in the shopfront context, links are orange 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
3225c52898 Actually, this should not be sanitize before going through trix editor 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
a8a35318f5 Add horizontal rule to trix editor 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
4c27e79519 Sanitize content when display it on shop
Use the TrixSanitizer | TrixScrubber
2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
f9bc00e5cd We used to use <p> to seperate block between them. now use <div>
trix doesn't allow the use of `<p>` as block separator since it can not contain `<figure>`: use `<div>` and _emulate_ as `<p>` with margin bottom
2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
b6e047086a Update trixEditor rendering <a /> element: should be green 2023-09-04 15:46:54 +02:00
Jean-Baptiste Bellet
e200eccc42 Replace angular editor by trix editor 2023-09-04 15:46:54 +02:00
Gaetan Craig-Riou
50693dd5d2 Merge pull request #11468 from dacook/buu-editing-part2-11059
[BUU] Editing - part 2 (product and variant text fields) 🚧
2023-09-04 23:41:44 +10:00
Gaetan Craig-Riou
db52b29b8f Merge pull request #11476 from macanudo527/fix_rails_helperinstancevariable
Fix Rails/HelperInstanceVariable in injection_helper.rb
2023-09-04 22:30:14 +10:00