-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG] CountryID Rendering PROFILE_MINIMUM #66
Comments
Hi @OLLIVAULT, Please provide me the full code... |
Here is the creation of the document $document = ZugferdDocumentBuilder::createNew(ZugferdProfiles::PROFILE_MINIMUM);
$document
->setDocumentBusinessProcess("A1")
->setDocumentInformation("5", "80", new DateTime("2024-02-02"), "5")
->setDocumentBuyerReference("5")
->setDocumentBuyerOrderReferencedDocument("5")
->setDocumentSeller("5")
->setDocumentSellerLegalOrganisation("5", null, null)
->addDocumentSellerTaxRegistration(null, "5")
->setDocumentSellerAddress(null, null, null, null, null, "FR")
->setDocumentBuyerLegalOrganisation("5", null, null)
->setDocumentBuyer("5", null)
->setDocumentSummation("5", "5", null, null, null, "5", "5")
->writeFile(__DIR__ . "/factur-x-minimum.xml"); and the XML output: <?xml version="1.0" encoding="UTF-8"?>
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:a="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:10" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<rsm:ExchangedDocumentContext>
<ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:ID>A1</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>5</ram:ID>
<ram:TypeCode>80</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20240202</udt:DateTimeString>
</ram:IssueDateTime>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>5</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>5</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID>5</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:PostalTradeAddress/>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>5</ram:Name>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument>
<ram:IssuerAssignedID>5</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery/>
<ram:ApplicableHeaderTradeSettlement>
<ram:InvoiceCurrencyCode>5</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:TaxBasisTotalAmount>5.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="5">5.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>5.00</ram:GrandTotalAmount>
<ram:DuePayableAmount>5.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice> If I change PROFILE_MINIMUM to another one, then the CountryID is displayed. |
Forget my previous posts; here is the correct bugfix: ZugferdObjectHelper.php Search Replace: Explanation: The schema minimum does not contain
For all other schemes, the definition is the same: |
Hi @OLLIVAULT, brilliant... I totally overlooked that. Very good work!!! Do you want to create a PR or should I fix it on my own? |
I submitted PR #69 (but credits for the fix go to me :-) ) |
Sorry, I overlooked that PR #68 already existed! |
Fixed problem with Country ID at profile minimum (Fixes #66)
Describe the bug
There is an issue with the countryID of the profile; no matter what I do, the 2-letter code does not appear.
This renders as:
The text was updated successfully, but these errors were encountered: