# Issue in SDK Validation for an invoice with Document Level allowance

**URL:** <https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552>\
**Category:** General\
**Created:** [August 22, 2024, 2:19pm UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552 "2024-08-22T14:19:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mostafa1](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mostafa1](https://zatca1.discourse.group/u/mostafa1)\
**Post date:** [August 22, 2024, 2:19pm UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/1 "2024-08-22T14:19:18Z")

</div>

I Created an Invoice with the following scenario:

- 3 items
- 

```
 Standard rate, 15%, 

```

- 

```
        vat breakdown taxable amount : 720.0

```

- 

```
 Zero Rate, 0%

```

- 

```
        vat breakdown taxable amount : 135.0

```

- 

```
 Standard Rate, 5%

```

- 

```
         vat breakdown taxable amount : 270.0

```

- 

```
 Line extension amount = 1250

```

- 

```
 Invoice Discount amount = 125 

```

- 

```
       When adding a document level allowance of 10% 

```

\*\*

> _why does the validation goes on taxable amount not sum of taxable amounts?_

\*\*

invoice is accepted with the following warnings:

- **category :** BR\_WARNING

- \*\*code :\*\*BR-Z-08

- **message :** In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ‘Zero rated’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Zero Rated’.

- **category :** BR\_WARNING

- \*\*code :\*\*BR-S-08

- **message :** For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is “Standard Rated”, the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are “Standard Rate“. and the VAT rates (BT-152,BT-96,BT-103) equal the VAT category rate (BT-119)

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [August 25, 2024, 8:16am UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/2 "2024-08-25T08:16:57Z")

</div>

Hi,  
Please share your XML file here as text document uploaded. thanks

> [@mostafa1](#):
>
> category code (BT-118) is ‘Zero rated’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts

---

<div class="post-metadata">

**Author:** ![mostafa1](https://avatars.discourse-cdn.com/v4/letter/m/e19b73/32.png) [@mostafa1](https://zatca1.discourse.group/u/mostafa1)\
**Post date:** [September 3, 2024, 11:41am UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/3 "2024-09-03T11:41:22Z")

</div>

You can download it from this link:

> **[ACC-SINV-2024-00315-AdditionalFields-68.xml](https://drive.google.com/file/d/1RQTUUGk-WXcsPTm3DpgpwrUzC-3YLsgO/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![omar.ashraf](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/omar.ashraf/32/1356_2.png) [@omar.ashraf](https://zatca1.discourse.group/u/omar.ashraf)\
**Post date:** [September 8, 2024, 9:56am UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/4 "2024-09-08T09:56:29Z")

</div>

Hello, @Malik

I am facing the same issue can you please advice

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [September 11, 2024, 1:38pm UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/5 "2024-09-11T13:38:48Z")

</div>

Dear Omar,  
Better if you can share your requirement and also xml the way you are trying with error if any you are getting. thanks

---

<div class="post-metadata">

**Author:** ![Malik](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/malik/32/708_2.png) [@Malik](https://zatca1.discourse.group/u/Malik)\
**Post date:** [September 11, 2024, 1:38pm UTC](https://zatca1.discourse.group/t/issue-in-sdk-validation-for-an-invoice-with-document-level-allowance/2552/6 "2024-09-11T13:38:58Z")

</div>

Dear Mostafa,  
If you open the xml file it is not properly formatted many blank lines so please format it properly and also share what exactly you are trying to achieve as you are using multiple tax categories like 5, 15, 0 etc and allowances. So if you will share requirement then will be easy for anyone to guide you possible issue or solution. thanks
