-
Notifications
You must be signed in to change notification settings - Fork 71
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
Scheme and List attributes present causes Warnings #64
Comments
Hey @DemigodCode Are you talking about this in TaxCategory? ubl-invoice/src/TaxCategory.php Lines 47 to 54 in 3ee8087
If so, at least I, do not see any references in the documentation that these attributes should be set. $taxCategory = (new TaxCategory)
->setId(UNCL5305::STANDARD_RATE, []) |
Hello, @DemigodCode , are you talking about the warning UBL-CR-678 ("A UBL invoice should not include the TaxCategory/ID schemeID")? If yes, to solve this warning, I update the class @@ -92,9 +92,11 @@ class TaxScheme implements XmlSerializable
*/
public function xmlSerialize(Writer $writer): void
{
- $writer->write([
- Schema::CBC . 'ID' => $this->id
- ]);
+ if ($this->id !== null) {
+ $writer->write([
+ Schema::CBC . 'ID' => $this->id
+ ]);
+ }
if ($this->name !== null) {
$writer->write([
Schema::CBC . 'Name' => $this->name |
@DemigodCode Do you have an example generated XML and against what schematron are you validating? |
Is there any reason why those attributes are at e.g. TaxCategory ID?
All Validators are warning that that should not be present.
I can't upload the file to two Peppol Access Points.
The text was updated successfully, but these errors were encountered: