Skip to content

[Compliance] Add fields required for reverse charge to addresses (Admin / API)#12

Merged
JustShah merged 4 commits intomainfrom
add-compliance-fields-to-address
Apr 29, 2025
Merged

[Compliance] Add fields required for reverse charge to addresses (Admin / API)#12
JustShah merged 4 commits intomainfrom
add-compliance-fields-to-address

Conversation

@JustShah
Copy link
Collaborator

Description:

This pull request introduces enhancements to the address handling logic in both the admin and API components by incorporating additional fields: email, VAT ID, and reverse charge status. These changes aim to improve the completeness of address data and enhance tax handling capabilities.

Key Changes:

  1. Admin Interface Updates:

    • Added email, VAT ID, and reverse charge status fields to the address forms.
    • Updated form partials and views to handle these new fields.
    • Modified the JavaScript to process the new fields, ensuring proper functionality.
  2. API Enhancements:

    • Updated Spree::ApiConfiguration to include email, VAT ID, and reverse charge status in the address attributes.
    • Modified Spree::PermittedAttributes to handle the new fields.
    • Enhanced request specs (address_books_spec.rb and checkouts_spec.rb) to verify the handling of the new attributes.
  3. Address Model Improvements:

    • Introduced the new attributes (email, VAT ID, and reverse charge status) to the Address model.
    • Added an enum for reverse charge status to allow users to specify whether the status is enabled, disabled, or not validated.
  • Enhanced Data Completeness: Storing email and VAT ID in the address model ensures that all relevant information is captured within the address record.
  • Improved Tax Handling: The reverse charge status enum provides better handling and flexibility for tax-related settings, aligning with various tax requirements and user needs.

These changes enhance the functionality and completeness of the address handling logic by capturing additional relevant information and improving tax handling capabilities. The modifications ensure a more robust and flexible approach to managing address data within both the admin interface and the API.

@JustShah JustShah force-pushed the add-compliance-fields-to-address branch from 5c78a4b to 20f730e Compare February 26, 2025 08:26
@fthobe fthobe changed the title Add compliance fields to address [Compliance] Add fields required for reverse charge to addresses (Admin / API) Feb 28, 2025
@JustShah JustShah force-pushed the add-compliance-fields-to-address branch 3 times, most recently from 30b9a6d to c81aace Compare March 24, 2025 07:59
@fthobe fthobe force-pushed the add-compliance-fields-to-address branch from fdd1a75 to 1bccaea Compare April 10, 2025 16:04
@fthobe fthobe force-pushed the add-compliance-fields-to-address branch from 1bccaea to 1be1631 Compare April 12, 2025 10:20
Enhances the Address model by introducing new attributes: email, vat_id, and reverse_charge_status.

- **Enhanced Data Completeness**: Storing email and vat_id in the address model ensures that all relevant information is captured within the address record.
- **Improved Tax Handling**: The reverse_charge_status enum provides better handling and flexibility for tax-related settings, aligning with various tax requirements and user needs.
Update the API components to include email, vat_id, and reverse_charge_status in the address attributes.
Modified `Spree::ApiConfiguration` and `Spree::PermittedAttributes` to handle the new fields.
These changes improve data completeness and tax handling by storing additional information in the address.
Update the admin address handling logic to include email, vat_id, and reverse_charge_status fields.
Changes include updating form partials and views to handle these new fields, and modifying the JavaScript to process them.
@JustShah JustShah merged commit 0f0fca2 into main Apr 29, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant