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

XML invalid VAT amount in case of the adding the same item on more than one line #125

Open
omarashrafsarhan opened this issue Sep 17, 2024 · 0 comments

Comments

@omarashrafsarhan
Copy link
Collaborator

The created XML file become rejected in case of creating invoice with the same item and same price on different lines

The rejection came from the VAT amount on the total invoice and line amounts
cac:TaxTotal
<cbc:TaxAmount currencyID="SAR">240.0</cbc:TaxAmount> (This is the right value)
cac:TaxSubtotal
<cbc:TaxableAmount currencyID="SAR">1600.0</cbc:TaxableAmount>
<cbc:TaxAmount currencyID="SAR">480.0</cbc:TaxAmount> (This is the wrong value)

Preconditions
The same item should be added in different lines on the invoice

Repro Steps

  1. Create new sales invoice
  2. Select item in the first line
  3. Select the same item in the second line without changing any this in the item
  4. Click save
  5. Submit
  6. Save
  7. Cancel

Actual results
Because of selecting the same item the VAT amount is increased for the double if I added the item three times it will be increased to triple

The invoice become rejected with the below errors

en validation errors :
CODE : BR-CO-15, MESSAGE : [BR-CO-15]-Invoice total amount with VAT (BT-112) = Invoice total amount without VAT (BT-109) + Invoice total VAT amount (BT-110).
CODE : BR-CO-14, MESSAGE : [BR-CO-14]-Invoice total VAT amount (BT-110) = Σ VAT category tax amount (BT-117).
en validation warnings :
CODE : BR-CO-17, MESSAGE : [BR-CO-17]-VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) x (VAT category rate (BT-119) / 100), rounded to two decimals.
CODE : BR-S-09, MESSAGE : [BR-S-09]-The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "Standard rated" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119) / 100), rounded to two decimals.

Expected Results

  1. The VAT amount should be added properly in the XML file (The actual item VAT amount without considering the other line)
  2. The invoice should be accepted
  3. In case of selecting the same item with changing the rate the item should be mapped as different item in each line
  4. Fix rejection should consider the new fix so if I clicked on "Fix rejection" it should send the new file with the correct values
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant