Bienvenido a los foros %s

Foro comunidad hispana Dolibarr

Identificarse Registrarse

Actualización IVA

Anuncios tales como las releases de nuevas versiones, etc.
Avatar de Usuario
Simnandez
Almirante
Mensajes: 328
Registrado: Jue, 07/01/2010, 19:07

Actualización IVA

Mensaje por Simnandez »

Os dejamos los SQL necesarios para actualizar el IVA de vuestros que entra en vigor el 1 de septiembre de 2012:

-- Insertar nuevos IVAS en Dolibarr
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,recuperableonly,note,active) values ( 45, 4, '21','5.2','0','VAT standard rate from September 2012',1);
insert into llx_c_tva(rowid,fk_pays,taux,localtax1,recuperableonly,note,active) values ( 46, 4, '10','1.4','0','VAT reduced rate from September 2012',1);

-- Subir PVP si precio producto se ha indicado "IVA no incluido"
update llx_product set price_ttc = price * (1 + (21 / 100)), tva_tx='21.000' where tva_tx='18.000' and price_base_type='HT';
update llx_product set price_ttc = price * (1 + (10 / 100)), tva_tx='10.000' where tva_tx='8.000' and price_base_type='HT';

-- Si precio producto se ha indicado "IVA incluido", Ejecutar uno de los dos (Aumentar PVP o dejar igual):

-- Subir precio PVP (Aumenta PVP)
update llx_product set price_ttc = ROUND(price * (1 + (21 / 100)),2), tva_tx='21.000' where tva_tx='18.000' and price_base_type='TTC';
update llx_product set price_ttc = ROUND(price * (1 + (10 / 100)),2), tva_tx='10.000' where tva_tx='8.000' and price_base_type='TTC';

-- Bajar precio base (PVP se queda igual)
update llx_product set price = price_ttc / (1 + (21 / 100)), tva_tx='21.000' where tva_tx='18.000' and price_base_type='TTC';
update llx_product set price = price_ttc / (1 + (10 / 100)), tva_tx='10.000' where tva_tx='8.000' and price_base_type='TTC';

-- Para Dolibarr 3.2
update llx_product_fournisseur_price set tva_tx='21.000' where tva_tx='18.000';
update llx_product_fournisseur_price set tva_tx='10.000' where tva_tx='8.000';
2byte.es Preferred Partner de Dolibarr.
¿Quieres soporte profesional? Contacta con nosotros