Konrad
cc8898e074
Merge pull request #11219 from abdellani/fix-tax-rates-rendering-when-invoice-enabled
...
fix Viewing an invoice with the instance's invoice setting set to alternative model leads to an error 500
2023-10-12 17:47:27 +02:00
Mohamed ABDELLANI
1c2aa1c370
fix linter issue
2023-10-11 11:00:37 +01:00
Mohamed ABDELLANI
c750602b52
remove duplicated code
2023-10-11 10:38:45 +01:00
Mohamed ABDELLANI
7cb200e21e
fix linting errors
2023-10-11 09:27:16 +01:00
Mohamed ABDELLANI
9950dd90f7
fix display_checkout_taxes_hash
2023-10-11 09:27:16 +01:00
Mohamed ABDELLANI
7eabb9a170
move include ::ActionView::Helpers::NumberHelper to Invoice::DataPresenter::Base
2023-10-11 09:27:16 +01:00
Mohamed ABDELLANI
aa4798d35c
add adjustables to the list of objects to serialize when creating an invoice
2023-10-11 09:27:16 +01:00
Mohamed ABDELLANI
d40338bed5
add adjustment originators to the order serialization
...
for some helpers like display_checkout_taxes_hash, it's needed to access the tax rates through the adjument's originator.
The adjustment's originator will store the minimal details: id, type and amount
2023-10-11 09:26:50 +01:00
Mohamed ABDELLANI
a2b06fa200
fix cloning all_eligible_adjustments array on DataPresenter#checkout_adjustments
2023-10-11 09:26:50 +01:00
Mohamed ABDELLANI
68a6fb132a
implement display_adjustment_tax_rates helper on the adjustment presenter
...
For every adjustment a list of tax rates will be created using TaxRateFinder.tax_rates_of.
This will prevent running the queries to find the tax rates during the invoice generation.
2023-10-11 09:26:50 +01:00
Mohamed ABDELLANI
33826631a3
reimplement the display_line_item_tax_rates helper on the line item presenter
...
1. reimplment the helper on the LintItem presenter
2. add the tax rate associated to the line items to the list of objects to serialize during the order serialization.
3. implement a presenter for the introducer tax rates.
2023-10-11 09:26:49 +01:00
David Cook
b42cf9735f
Only validate an image if it has been changed
...
Best viewed with whitespace ignored.
2023-10-11 10:12:52 +11:00
Maikel
90c25d604b
Merge pull request #11441 from macanudo527/fix_rails_HasManyOrHasOneDependent
...
Fix Rails/HasManyOrHasOneDependent
2023-10-09 11:44:23 +11:00
Konrad
944925eb06
Merge pull request #11603 from murjax/prevent-customer-edit-shipped-9235
...
Prevent customers from editing shipped orders
2023-10-08 21:42:18 +02:00
David Cook
117085aeba
Transform weight before validation
...
I guess validates_length_from_database also validates numbers. That's not a bad thing.
So now it's being validated, we should validate the transformed value that will be saved to the database.
2023-10-06 14:15:07 +02:00
David Cook
9a9be8dacd
Validate length of variant fields
2023-10-06 14:15:07 +02:00
David Cook
875d083a1d
There's a gem for that [add gem]
2023-10-06 14:15:07 +02:00
David Cook
3ec6386e1c
Validate length of some product fields
...
We know if the values are too long, so let's provide a useful message rather than generating an unhandled database error.
This code seems rather repetetive, it would be good to use a shared module. I wonder if there's a gem for that.
Note that the existing /products/*/edit screen doesn't even handle validation errors yet, but that's something for another day..
2023-10-06 14:15:07 +02:00
David Cook
cd34e160bf
Fix deleting of return_authorizations
...
return_authorizations have a stock_location_id, not the other way round. So there's no dependent field to nullify.
2023-10-06 10:58:49 +09:00
Neal Chambers
fec59e5ae2
Apply Changes Suggested by Code Review
2023-10-06 10:58:49 +09:00
Neal Chambers
cf07a055d0
Fix Rails/HasManyOrHasOneDependent with nil
2023-10-06 10:58:49 +09:00
Neal Chambers
e49489cd1c
Fix invoices dependent relationship
2023-10-06 10:58:49 +09:00
Neal Chambers
2520d222bb
Fix Rails/HasManyOrHasDependent with restrict_with_exception
2023-10-06 10:58:49 +09:00
Neal Chambers
180cd4abe6
Revert Complicated Rails/HasManyOrHasOneDependent Errors
2023-10-06 10:58:49 +09:00
Neal Chambers
e22e08e666
Change destroy to nullify
2023-10-06 10:58:49 +09:00
Neal Chambers
7c9bc58a4b
Add nullify to orders relationship, instead of manually nullifying
2023-10-06 10:58:49 +09:00
Neal Chambers
7f8ac94933
Fix Rails/HasManyOrHasOneDependent with nil
2023-10-06 10:58:49 +09:00
Neal Chambers
019b54ea95
Fix Rails/HasManyOrHasOneDependent with delete_all
2023-10-06 10:58:49 +09:00
Neal Chambers
070d2cb855
Fix stock_movements relation in variant
2023-10-06 10:58:49 +09:00
Neal Chambers
825342914d
Fix Rails/HasManyOrHasOneDependent with nullify
2023-10-06 10:58:49 +09:00
Neal Chambers
b76fb10d46
Fix Rails/HasManyOrHasOneDependent with Destroy
2023-10-06 10:58:49 +09:00
Ryan Murphy
4db6570039
9235: Prevent customers from editing shipped orders
2023-10-03 08:36:57 -04:00
Konrad
8150a8b04a
Merge pull request #11579 from macanudo527/remove_delegate_belongs_to
...
Remove Deprecated delegate_belongs_to
2023-10-01 13:19:22 +02: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
David Cook
91b251acd4
Refactor
2023-09-26 10:56:44 +10:00
Neal Chambers
50eb8f31f2
Remove Deprecated delegate_belongs_to
2023-09-26 09:50:08 +09:00
Gaetan Craig-Riou
02aaf6f692
Remove voucher validation on code format
...
The code doesn't rely on label match any more so this restriction
is not necessary anymore
2023-09-25 09:49:55 +02: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
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
b620e413f4
Merge pull request #11378 from mkllnk/dfc-ofn-product-group-id
...
[DFC API] Add custom OFN product id to DFC SuppliedProduct
2023-09-22 17:57:11 +10:00
Konrad
a55797d727
Merge pull request #11510 from rioug/11421-deactivate-voucher
...
[Vouchers] add activate/deactivate feature
2023-09-21 15:03:47 +02:00
Maikel Linke
02f251c900
Import DFC SuppliedProduct as new variant of existing product
2023-09-21 09:04:57 +10:00
Maikel Linke
4ebfe73f60
Remove duplicate association
...
Probably a relict from a Spree upgrade.
2023-09-18 12:38:01 +10:00
Maikel
758c6e033f
Merge pull request #11533 from macanudo527/fix_stylehash_2
...
Fix Style/HashSyntax 3/13
2023-09-14 09:04:03 +10:00
Konrad
c36c5be2c9
Merge pull request #11497 from Matt-Yorkley/import-tax-category
...
Fix error when importing entries with a tax category
2023-09-13 23:28:16 +02:00
Neal Chambers
ed06edda3f
Fix Style/HashSyntax
2023-09-13 16:45:00 +09:00
Neal Chambers
4ffd3759cc
Fix Style/HashSyntax
2023-09-12 23:19:05 +09: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
Matt-Yorkley
839e580878
Fix error when importing entries with a tax category
2023-09-08 19:24:50 +01:00