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

[FIX] Tax is mandatory on invoice lines #204

Closed
wants to merge 1 commit into from

Conversation

BT-aestebanez
Copy link

Fix for #196

The standard does require at least one tax per invoice line as defined in the xsd:

  <xs:complexType name="LineTradeSettlementType">
    <xs:sequence>
      <xs:element name="ApplicableTradeTax" type="ram:TradeTaxType"/>
      <xs:element name="BillingSpecifiedPeriod" type="ram:SpecifiedPeriodType" minOccurs="0"/>
      <xs:element name="SpecifiedTradeAllowanceCharge" type="ram:TradeAllowanceChargeType" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="SpecifiedTradeSettlementLineMonetarySummation" type="ram:TradeSettlementLineMonetarySummationType"/>
      <xs:element name="AdditionalReferencedDocument" type="ram:ReferencedDocumentType" minOccurs="0"/>
      <xs:element name="ReceivableSpecifiedTradeAccountingAccount" type="ram:TradeAccountingAccountType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>

The element <xs:element name="ApplicableTradeTax" type="ram:TradeTaxType"/> does not have "minOccurs" set and therefore, the element is required (source https://www.w3schools.com/xml/schema_complex_indicators.asp)

@BT-aestebanez
Copy link
Author

Hello @alexis-via
First of all thanks for contributing with this work.

Could you review this PR?

Thanks,
Alvaro

trade_tax_percent.text = '%0.*f' % (2, tax.amount)
if not iline.invoice_line_tax_ids:
raise UserError(_(
"The Factur-X standard specify that each line needs, "
Copy link
Contributor

Choose a reason for hiding this comment

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

'specifies'.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, applied

@alexis-via
Copy link
Contributor

in my v14 PR to migrate account_invoice_facturx #288
I solved the problem when there is no tax on the invoice line, but I made big changes to the code that generate the tax block. Maybe we could backport it to v12. Could you have a look at it and tell me what you think ?

@alexis-via
Copy link
Contributor

I forgot to mention that backporting is not easy due to the revolution on invoices in v13... tell me what you think first and then we'll decide.

@thomaspaulb
Copy link
Contributor

Specifically this part, which adds an empty tax block if tax is not filled, right?

image

I'd say backporting that is an honourable but cumbersome job, and could be done later, on top of this small fix.

@BT-aestebanez
Copy link
Author

Specifically this part, which adds an empty tax block if tax is not filled, right?

image

I'd say backporting that is an honourable but cumbersome job, and could be done later, on top of this small fix.

I agree :)
Sorry for the late reply

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 20, 2022
@github-actions github-actions bot closed this Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants