-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add new validator ComprobanteTipoCambio #10
Conversation
driftking301
commented
Oct 27, 2017
- Fix attribute TipoCambio must be "1" if Moneda "MXN", put Sello again
- Add exportArray method to retrieve a copy of the attributes
- Add a method to get a new CfdiCreator33 based on a node
- Better fail message on testValidateWithCorrectData
- Add developer helper method procedureCreateSelloAgainOnValidCdfi33
This make easy to read and change the values of an existing Cfdi
Use this procedure to change the cfdi on the file 'asserts/cfdi33-valid.xml' and show io screen the value of the Sello again
bonus: it found a bug in the cfd33-valid.xml file!
Very good job. Thanks. Could you please check the revisions I made? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please check this comments?
|
||
/** | ||
* Developer: Use this procedure to change the cfdi on the file 'asserts/cfdi33-valid.xml' | ||
* and show io screen the value of the Sello again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix typo
* ComprobanteTipoCambio | ||
* | ||
* Valida que: | ||
* - TIPOCAMBIO01: La moneda exista y no tenga un valor vacío. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very strict could you put the error codes from SAT in description?
'TIPOCAMBIO02' => 'Si la moneda es MXN entonces el tipo de cambio debe ser "1" o no debe existir', | ||
'TIPOCAMBIO03' => 'Si la moneda es XXX entonces el tipo de cambio no debe existir', | ||
'TIPOCAMBIO04' => 'Si la moneda no es MXN ni XXX entonces el tipo de cambio' | ||
. 'debe seguir el patrón [0-9]{1,18}(.[0-9]{1,6})', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add space before 'debe'