Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuel account balance complement to MX regime #210

Merged
merged 6 commits into from
Oct 4, 2023
Merged

Conversation

cavalle
Copy link
Contributor

@cavalle cavalle commented Sep 29, 2023

  • Adds fuel account balance complement to MX regime used to generate the CFDI "EstadoDeCuentaCombustible" complement.
  • Supersedes and applies the feedback discussed in Add basic structs for MX fuel complement #192.
  • The GOBL complements maps one by one to every node and field of the CFDI complement.
  • Implements validations according to the constrains of the the EstadoDeCuentaCombustible spec.
  • Normalises all the amounts to the precisions (2, 3 or 6 decimals) specified in the EstadoDeCuentaCombustible spec.
  • Calculates the grand subtotal and grand subtotal
  • There are no line-level calculations as those must be calculated earlier when each fuel purchase was made by the purchase supplier.

Copy link
Collaborator

@samlown samlown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry Luismi, I'd forgotten to click send on these comments 🤦

FuelAccountTaxCodeIEPS = cbc.Code("IEPS")
)

var validTaxCodes = []interface{}{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might need a prefix to avoid collisions:

Suggested change
var validTaxCodes = []interface{}{
var fuelValidTaxCodes = []interface{}{

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll rename to FuelAccountTaxCodeVAT for consistency with the other constants and structs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ab524c9

regimes/mx/fuel_account_balance.go Outdated Show resolved Hide resolved
@cavalle cavalle merged commit 23590f0 into main Oct 4, 2023
2 checks passed
@cavalle
Copy link
Contributor Author

cavalle commented Oct 4, 2023

Merging after addressing the latest feedback (additional comments always welcome!)

@samlown samlown deleted the fuel-complement branch July 24, 2024 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants