Maikel
b122c93055
Merge pull request #11586 from macanudo527/fix_stylehash_11
...
Fix Style/HashSyntax 12/13
2023-10-02 16:25:21 +11:00
Konrad
06ebeeac0f
Merge pull request #11543 from rioug/11364-Voucher-fix-tax-report
...
[Vouchers] Fix Sales Tax Totals By Order report
2023-10-01 02:09:33 +02:00
Neal Chambers
57d2f04330
Fix Style/HashSyntax
2023-09-29 08:51:48 +09:00
Gaetan Craig-Riou
b129b9f1d0
DRY up specs
2023-09-26 10:50:58 +02:00
Neal Chambers
70e218d2e9
Fix Style/HashSyntax
2023-09-25 13:15:38 +09:00
Gaetan Craig-Riou
03ce39d5c5
Add metadata to tax related voucher adjustment
...
In the scenario where you have tax excluded from price, when adding
a voucher to an order, we create 2 voucher adjusments. One of them
represent the tax part of the voucher, and has a label starting with
"Tax". To better differentiate them and allow a reliable way to
query it, we add a metadata entry.
2023-09-22 11:16:21 +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
Maikel Linke
ee1611904b
Fix typos in spec description
2023-09-21 16:37:07 +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
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
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
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
David Cook
32c0b5a3e2
Remove unnecessary details
...
As far as I can tell we didn't need to specify these for the tests.
2023-09-01 12:04:27 +10:00
David Cook
381ce1c2b9
Simplify order definition
...
There only needs to be one order at a time, and it can be created on-demand. We can simply override it in the specs that need to.
2023-09-01 12:00:29 +10:00
Neal Chambers
afdddc9237
Safely autocorrect Style/FileRead
...
Inspecting 1488 files
.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C.........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................C............................................................................................................................................................................
Offenses:
lib/tasks/karma.rake:33:15: C: [Corrected] Style/FileRead: Use File.read.
unit_js = File.open('config/ng-test.conf.js', 'r').read
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
spec/services/upload_sanitizer_spec.rb:13:41: C: [Corrected] Style/FileRead: Use File.read.
let(:service) { UploadSanitizer.new(File.open(upload).read) }
^^^^^^^^^^^^^^^^^^^^^^
1488 files inspected, 2 offenses detected, 2 offenses corrected
2023-09-01 08:55:56 +09:00
filipefurtad0
e0031225d1
Covers order special instruction
2023-08-31 14:25:18 +01:00
filipefurtad0
3374c38d5c
Covers order state - cancelled, resumed - changes
2023-08-31 14:25:18 +01:00
filipefurtad0
301c070fc3
Covers order currency change
2023-08-31 14:25:18 +01:00
filipefurtad0
2e72fe1bce
Covers order number change
2023-08-31 14:25:18 +01:00
filipefurtad0
38eb84b1d8
Covers order total change
2023-08-31 14:25:18 +01:00
filipefurtad0
b0c362f75e
Corrects description, if the order didn't change
2023-08-31 14:25:18 +01:00
filipefurtad0
79a38345e9
Passes order as argument
...
to invoice comparator
2023-08-31 14:25:18 +01:00
filipefurtad0
a223675e74
Covers shipping method change
2023-08-31 14:25:18 +01:00
filipefurtad0
0540548893
Adds coverage for included/added taxes
...
at the order-object level
2023-08-31 14:25:18 +01:00
filipefurtad0
8d382f3de4
Corrects description
...
for order-level, non-relevant attribute change
2023-08-31 14:25:18 +01:00
Maikel Linke
50f7177a38
Use existing service to label weight&volume units
...
We still have the scale stored in two places but in our current system
that's part of a unit's "id".
If the DFC adds that value to its standard then we can use it for lookup
and don't need to repeat it.
* https://github.com/datafoodconsortium/taxonomies/issues/7
2023-08-31 09:48:24 +10:00
Filipe
cc3b7c68ae
Merge pull request #11208 from dacook/buu-editing-11059
...
[BUU] Change name of my products 🚧
2023-08-24 21:19:52 +01:00
Filipe
10bc2a3ee6
Merge pull request #11430 from abdellani/fix-updating-invoices-data
...
fix order invoice generator must update the latest invoice
2023-08-24 20:58:37 +01:00
Mohamed ABDELLANI
d47b47627c
tos_accepted? returns true if the ToS file is not set
2023-08-22 10:22:26 +01:00
David Cook
ef63c520c0
Aggregate errors
2023-08-22 11:40:58 +10:00
David Cook
a0dba001bc
Attempt to save all records in bulk update
...
Before, it would abort after the first invalid record, and it doesn't tell you about the others. This way you find out about all at once.
This affects the existing Bulk Edit Products screen, and can result in longer error messages than before. But I would argue that's a good thing.
I think this is technically optional for BUU at this point, but a helpful improvement.
2023-08-22 11:40:58 +10:00
David Cook
6ffe1ec1ad
Retain the order of products in the collection
2023-08-22 11:40:58 +10:00
Mohamed ABDELLANI
aaf1d22ccc
fix order invoice generator must update the latest invoice
2023-08-21 16:10:05 +01:00
Maikel Linke
e0acc25808
Fix subscription spec and add more coverage
...
One spec was only passing due to a bug. The setup wasn't complete and
despite the variant being unavailable in the order cycle it was reported
as being available. The order cycle has now been set up correctly.
Another spec was added to cover an edge case lead to a bug before this
pull request. When all subscription items where unavailable, all were
marked as available.
2023-08-20 12:33:43 +09:00
Konrad
df7d42a420
Merge pull request #11352 from abdellani/remove-dead-code-bulk-invoice
...
Remove dead code related to bulk invoice printing
2023-08-18 18:14:01 +02:00
Matt-Yorkley
70ba027603
Merge pull request #11221 from Matt-Yorkley/product-shipping-category
...
[Product Refactor] Shipping Category
2023-08-15 11:12:56 +01:00
Gaetan Craig-Riou
5a2155aeb7
Use the same sorting when choosing a line item to update
...
The presenter uses order.sorted_line_items, so use the same method
when picking up the line item to update.
2023-08-15 11:33:02 +10:00
Matt-Yorkley
42d04b6581
Update OrderAvailableShippingMethods service
2023-08-14 21:02:47 +01:00
Konrad
99daab07b7
Merge pull request #11297 from mkllnk/require-belongs-to--part2
...
Require belongs_to associations by default
2023-08-12 17:09:03 +02:00
Gaetan Craig-Riou
cdb33aa0d0
Add calculation for percentage voucher
...
It include calculation for order with taxes included in the price
2023-08-11 14:30:48 +10:00
Gaetan Craig-Riou
1be8daaf86
Add specs to cover re calculation
...
It is important that the calculated voucher adjustments don't change
if they are recalculated and it is equally important that they are
updated if the order has changed
2023-08-11 14:19:25 +10:00
Maikel Linke
4dd2955400
Require EnterpriseRelationshipPermission.belongs_to by default
...
I had to change some specs to keep them simple but I don't think
anything is broken. In one case, it would have needed a lot more setup
to make the spec work. But in production, the permissions are never used
with ModelSet, for example.
2023-08-11 10:13:48 +10:00
Maikel
b50fa216eb
Merge pull request #11117 from rioug/10857-voucher-error-moving-between-summary-and-cart-take2
...
[vouchers] error moving between summary and cart pages
2023-08-09 11:14:52 +10:00
Mohamed ABDELLANI
70b61eb481
remove bulk invoice service
2023-08-08 08:41:33 +01:00
Rachel Arnould
1b1279aa56
Merge pull request #11192 from abdellani/bulk-invoice-printing
...
fix Bulk invoice printing/sending
2023-08-04 12:02:43 +02:00
David Cook
42230c07b2
Merge pull request #11312 from macanudo527/fix_rubocop_5
...
Fix autocorrect Rails Cops
2023-08-04 11:13:52 +10:00
Maikel
2b18effe6d
Merge pull request #11322 from macanudo527/fix_remaining_line_length
...
Fix remaining Layout/LineLength Rubocop Errors
2023-08-04 09:34:00 +10:00
Mohamed ABDELLANI
4f6ab69add
implement OrderInvoiceGenerator service
2023-08-03 14:52:45 +01:00
Neal Chambers
a4f270bdec
Fix Layout/LineLength
2023-08-03 09:49:47 +09:00