-
Notifications
You must be signed in to change notification settings - Fork 0
Agrega soporte facturas cfdi nomina #4
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
Open
mendozagit
wants to merge
28
commits into
main
Choose a base branch
from
agrega-soporte-facturas-cfdi-nomina
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Remove TypeVar bound constraint to allow ApiResponse[bool], ApiResponse[list[str]] - Remove invalid http_status_code parameter from ApiResponse instantiations - Convert deprecated class Config to model_config = ConfigDict() - Standardize List/Dict type hints to Python 3.9+ built-in list/dict - Fix mutable default arguments using default_factory=list - Add missing model_config to PagedList and ValidationFailure - Add return type annotation to InvoiceService.send() method
- Add Any type annotation to **kwargs in base_service.py methods - Add default=None to ApiResponse Optional fields (message, details) - Fix dict type annotation to dict[str, Any] in ValidationFailure - Fix TaxFile.file_type to Optional[Literal[0, 1]] - Replace List[...] with list[...] in download_request_service.py
Type annotations already prevent None from being passed, making these runtime checks redundant and causing Pylance warnings about conditions that always evaluate to False.
- Remove Optional from issuer/recipient fields (they use Field(...) which is required) - Add Optional to base64_cancellation_acknowledgement (has default=None) - Add model_config to TaxCredential, InvoiceIssuer, InvoiceRecipient, GlobalInformation, and RelatedInvoice for consistency
Replace Field(..., alias) with Field(default=..., alias) pattern to help Pylance/Pyright properly infer field types.
- Add explicit default= to FiscalApiSettings optional fields
- Change int defaults to Decimal("1") for Decimal fields to satisfy Pylance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update Python version requirement to >= 3.9 (CI/CD uses 3.9.13) - Add development setup instructions - Add Pydantic v2 compatibility guidelines - Add type annotation standards Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add http_status_code field to ApiResponse in common_models.py - Restore http_status_code parameter in all ApiResponse instantiations in base_service.py Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add EmployeeData and EmployerData models for CFDI nomina support - Add EmployeeService and EmployerService as sub-resources of PeopleService - Fix typo: rename tax_file_servive.py to tax_file_service.py - Add py.typed marker for PEP 561 type checking support - Add MANIFEST.in for proper sdist packaging - Reorganize exports in __init__.py files for models and services - Export BaseService for custom service implementations - Fix ValidationFailure model to use snake_case with aliases - Remove debug print statements from base_service.py - Remove commented-out code from base_service.py - Fix indentation in TaxFileService Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Simplify InvoiceService to use single /invoices endpoint - Add complement models for localTaxes, payment, payroll, and lading - Add new invoice sub-models (ItemTax, ItemOnBehalfOf, ItemCustomsInfo, etc.) - Add InvoiceIssuerEmployerData and InvoiceRecipientEmployeeData models - Update InvoiceIssuer, InvoiceRecipient, InvoiceItem, and Invoice models - Invoice type now determined by type_code field (I, E, P, N, T)
- Add "Facturas de Nomina" section in examples.py with complete payroll invoice example - Fix seniority field type from int to str (ISO 8601 duration format) - Fix labor_relation_start_date field type from datetime to str
- Add ejemplos-nomina.py with complete payroll invoice example - Add pyproject.toml with Pyright/Ruff configuration - Configure linters to ignore Pydantic field name warnings
Add 13 SDK examples covering different payroll scenarios: - Regular payroll (ordinaria) - Assimilated salaries (asimilados) - Bonuses, savings fund and deductions - Overtime (horas extra) - Disabilities (incapacidades) - SNCF for public organizations - Extraordinary payroll (aguinaldo) - Severance and indemnification - Retirement and pension - Payroll without deductions - Employment subsidy - Travel expenses (viaticos) - Basic payroll Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add facturas-de-complemento-pago.py with examples for payment complement invoices - Por valores: inline issuer/recipient data with tax credentials - Por referencias: using pre-created issuer/recipient IDs - Uses correct structure: complement.payment (PaymentComplement) instead of deprecated payments field - Rename ejemplos-nomina.py to facturas-de-nomina.py for consistency Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mina types Adds 13 setup methods (_references_setup_data) that configure employee/employer data, and 12 new invoice methods (_references) that create payroll invoices using only person IDs instead of inline data. Also adds curp field to Person model. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive documentation for implementing CFDI Nomina support in any FiscalAPI SDK, covering all 13 payroll types, models, services, and both operation modes (by values and by references). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add UserLookupDto, StampTransaction, StampTransactionParams models - Create StampService with get_list, get_by_id, transfer_stamps, withdraw_stamps methods - Add stamps property to FiscalApiClient facade - Add ejemplos-timbres.py with usage examples Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add payroll invoice support (13 CFDI types) to features section - Add new "Gestión de Timbres" section documenting StampService - Add direct links to example files (nomina, timbres, complemento pago) - Remove local development credentials from example files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add StampService to services/__init__.py exports - Update CLAUDE.md with complete service list, example files, and new sections - Add StampService documentation to payroll-requirements.md - Update implementation checklist with completed items - Bump version to 4.0.360 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
--- Pull Request: Soporte para Facturas de Nómina (CFDI de Nómina) y Servicio de Timbres
Summary
Agrega soporte completo para facturas de nómina (CFDI de Nómina) con los 13 tipos de nómina del SAT, además de un nuevo servicio para gestión de timbres fiscales.
Cambios principales:
Ejemplos de Nómina (13 casos de uso por valores y referencias)
Servicio de Timbres (StampService)
Servicios de Empleado/Empleador