# DB ERROR 1264 when VAT on product is 4 digits

**URL:** <https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477>\
**Category:** Using my Dolibarr\
**Created:** [March 27, 2019, 5:33pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477 "2019-03-27T17:33:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Texaco](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/82dd89/32.png) [@Texaco](https://www.dolibarr.org/forum/u/Texaco)\
**Post date:** [March 27, 2019, 5:33pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/1 "2019-03-27T17:33:13Z")

</div>

I am using the Indian GST system for taxation in dolibarr. I am able to add products and select different GST Rates (C+S-18, C+S-28, I-18, I-28) as required, while creating a Purchase Order. Sales Tax is displayed as 999/999% (C+S-18). But when the value of the Sales Tax in any row goes above 999 I get the error below. Any idea how to resolve?

Dolibarr has detected a technical error.  
This information can be useful for diagnostic purposes (you can set option $dolibarr\_main\_prod to ‘1’ to remove such notices):  
Date: 20190327163944  
Dolibarr: 8.0.3  
Level of features: 0  
PHP: 5.6.40  
Server: Apache  
OS:  
UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

Requested URL: /dolibarr/fourn/commande/card.php?id=17  
Referer: [https://www.a.com/dolibarr/fourn/commande/card.php?id=17&action=editline&lineid=38](https://www.a.com/dolibarr/fourn/commande/card.php?id=17&action=editline&lineid=38)  
Menu manager: eldy\_menu.php

Database type manager: mysqli  
Latest database access request error: UPDATE llxy7\_commande\_fournisseurdet SET description=’’, ref=’’, subprice=‘8960’, remise\_percent=‘0’, vat\_src\_code = ‘C+S-18’, tva\_tx=‘0’, localtax1\_tx=‘2419.2’, localtax2\_tx=‘2419.2’, localtax1\_type=‘1’, localtax2\_type=‘1’, qty=‘3’, date\_start=null, date\_end=null, info\_bits=‘0’, total\_ht=‘26880’, total\_tva=‘0’, total\_localtax1=‘2419.2’, total\_localtax2=‘2419.2’, total\_ttc=‘31718.4’, product\_type=0, special\_code=0, fk\_unit=null, multicurrency\_subprice=8960, multicurrency\_total\_ht=26880, multicurrency\_total\_tva=0, multicurrency\_total\_ttc=31718.4 WHERE rowid = 38  
Return code for latest database access request error: DB\_ERROR\_1264  
Information for latest database access request error: Out of range value for column ‘localtax1\_tx’ at row 1

Message: Out of range value for column ‘localtax1\_tx’ at row 1

---

<div class="post-metadata">

**Author:** ![eldy](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/eldy/32/12_2.png) [@eldy](https://www.dolibarr.org/forum/u/eldy)\
**Post date:** [March 27, 2019, 6:55pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/2 "2019-03-27T18:55:04Z")

</div>

The problem here is that the application try to store the amount of VAT (2419.2) instead of the vat rate (9) into field localtax1\_tx.  
Can you try to upgrade with 9.0.1 or at least 8.0.4 ?

---

<div class="post-metadata">

**Author:** ![Texaco](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/t/82dd89/32.png) [@Texaco](https://www.dolibarr.org/forum/u/Texaco)\
**Post date:** [July 5, 2019, 3:19am UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/3 "2019-07-05T03:19:47Z")

</div>

Since you requested upgrading the Dolibarr Version, I thought I should first create a backup and then go for the upgrade. Backup from the dolibarr link was not working as it was showing some php error. But then I logged in to my host services and took backup of the database. It took me some time to figure all this out. And now that I am on new Dolibarr Version, I do not see the above error, but I have another issue. I just created a new vendor and a new product and selected VAT rate as 18% by adding a Buying Price. Finally when I create a Purchase Order and select the new Product that I just created, I do not see the correct Sales Tax rate. I see options for 0, 4, 6 as the options in the dropdown list for the Sales Tax rates.

---

<div class="post-metadata">

**Author:** ![kushal](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/35a633/32.png) [@kushal](https://www.dolibarr.org/forum/u/kushal)\
**Post date:** [January 7, 2022, 3:02pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/4 "2022-01-07T15:02:55Z")

</div>

I have upgraded my Dolibarr to 14.0.4 and find the same DB Error 1264 again when i try to change one tax rate(1-18) to (c+S-18) tax rate 2 and tax rate3. I see the issue as mentioned above only when the tax digits are more that 4. Can you please help me and advice what settings/configurations can resolve this issue?

Dolibarr has detected a technical error.  
You use an experimental or develop level of features, so please do NOT report any bugs or vulnerability, except if problem is confirmed after moving option MAIN\_FEATURES\_LEVEL back to 0.  
This information can be useful for diagnostic purposes (you can set option $dolibarr\_main\_prod to ‘1’ to remove such notices):  
**Date:** 20220107145259  
**Dolibarr:** 14.0.4 - [https://www.dolibarr.org](https://www.dolibarr.org)  
**Level of features:** 2  
**UserAgent:** Mozilla/5.0 (X11; Linux x86\_64; rv:95.0) Gecko/20100101 Firefox/95.0

**Requested URL:** /dolibarr/fourn/commande/card.php?id=360  
\ ***Menu manager:** eldy\_menu.php

**Modules/Applications:** user, syslog, categorie, multicurrency, contrat, workflow, modulebuilder, debugbar, bookmark, projet, propal, incoterm, tax, bom, product, cron, commande, ecm, facture, fournisseur, mrp, service, societe, stock, variants, productbatch, blockedlog, import, export  
**Database type manager:** mysqli  
**Latest database access request error:** UPDATE llx\_commande\_fournisseurdet SET description=‘RUNNING LENGTH OF 150X1000MM PP SHEET in Kg’, ref=’’, subprice=‘315’, remise\_percent=‘0’, vat\_src\_code = ‘C+S-18’, tva\_tx=‘0’, localtax1\_tx=‘3430.35’, localtax2\_tx=‘3430.35’, localtax1\_type=‘2’, localtax2\_type=‘2’, qty=‘121’, date\_start=null, date\_end=null, info\_bits=‘0’, total\_ht=‘38115’, total\_tva=‘0’, total\_localtax1=‘3430.35’, total\_localtax2=‘3430.35’, total\_ttc=‘44975.7’, product\_type=0, special\_code=0, fk\_unit=null, multicurrency\_subprice=315, multicurrency\_total\_ht=38115, multicurrency\_total\_tva=0, multicurrency\_total\_ttc=44975.7 WHERE rowid = 3534  
**Return code for latest database access request error:** DB\_ERROR\_1264  
**Information for latest database access request error:** Out of range value for column ‘localtax1\_tx’ at row 1

**Message:** Out of range value for column ‘localtax1\_tx’ at row 1

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [January 7, 2022, 3:43pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/5 "2022-01-07T15:43:32Z")

</div>

Hello,

You have put

> [@kushal](#):
>
> 3430.35

As VAT Rate =\> Not possible

---

<div class="post-metadata">

**Author:** ![kushal](https://www.dolibarr.org/forum/letter_avatar_proxy/v4/letter/k/35a633/32.png) [@kushal](https://www.dolibarr.org/forum/u/kushal)\
**Post date:** [January 9, 2022, 6:06pm UTC](https://www.dolibarr.org/forum/t/db-error-1264-when-vat-on-product-is-4-digits/17477/6 "2022-01-09T18:06:01Z")

</div>

I have put Vat rate as 9%(which for this case is = 3430.35) and this value is being updated by Dolbarr internally after computing the 9% of the Item value and that value when exceeding 4 digits we are facing this issue.
