DB ERROR 1264 when VAT on product is 4 digits

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
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

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 ?

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.

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
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

Hello,

You have put

As VAT Rate => Not possible

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.