Works on enhancement of local taxes. New: Prepare database, costumer bills tables
This commit is contained in:
parent
1104275318
commit
ee867ed6c2
@ -27,3 +27,19 @@ update llx_facture_fourn set fk_statut=2 where fk_statut=1 AND paye=1;
|
||||
|
||||
alter table llx_facture_fourn add column close_code varchar(16) after remise;
|
||||
alter table llx_facture_fourn add column close_note varchar(128) after close_code;
|
||||
|
||||
--add local taxes to invoices
|
||||
alter table llx_facture add column localtax1 double(24,8) DEFAULT 0 after tva;
|
||||
alter table llx_facture add column localtax2 double(24,8) DEFAULT 0 after localtax1;
|
||||
alter table llx_facturedet add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx;
|
||||
alter table llx_facturedet add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx;
|
||||
alter table llx_facturedet add column total_localtax1 double(24,8) DEFAULT 0 after total_tva;
|
||||
alter table llx_facturedet add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1;
|
||||
|
||||
|
||||
alter table llx_facture_rec add column localtax1 double(24,8) DEFAULT 0 after tva;
|
||||
alter table llx_facture_rec add column localtax2 double(24,8) DEFAULT 0 after localtax1;
|
||||
alter table llx_facturedet_rec add column localtax1_tx double(6,3) DEFAULT 0 after tva_tx;
|
||||
alter table llx_facturedet_rec add column localtax2_tx double(6,3) DEFAULT 0 after localtax1_tx;
|
||||
alter table llx_facturedet_rec add column total_localtax1 double(24,8) DEFAULT 0 after total_tva;
|
||||
alter table llx_facturedet_rec add column total_localtax2 double(24,8) DEFAULT 0 after total_localtax1;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -44,6 +45,8 @@ create table llx_facture
|
||||
close_note varchar(128), -- Commentaire cloture sans paiement complet
|
||||
|
||||
tva real DEFAULT 0, -- montant tva apres remise totale
|
||||
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
||||
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
||||
total real DEFAULT 0, -- montant total ht apres remise totale
|
||||
total_ttc real DEFAULT 0, -- montant total ttc apres remise totale
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2009 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -33,6 +34,8 @@ create table llx_facture_rec
|
||||
remise_percent real DEFAULT 0,
|
||||
remise_absolue real DEFAULT 0,
|
||||
tva real DEFAULT 0,
|
||||
localtax1 double(24,8) DEFAULT 0, -- amount localtax1
|
||||
localtax2 double(24,8) DEFAULT 0, -- amount localtax2
|
||||
total real DEFAULT 0,
|
||||
total_ttc real DEFAULT 0,
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
-- Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -28,6 +29,8 @@ create table llx_facturedet
|
||||
fk_product integer NULL, -- Doit pouvoir etre nul pour ligne detail sans produits
|
||||
description text,
|
||||
tva_tx real, -- Taux tva produit/service (exemple 19.6)
|
||||
localtax1_tx double(6,3) DEFAULT 0, -- tax local tax 1
|
||||
localtax2_tx double(6,3) DEFAULT 0, -- tax local tax 2
|
||||
qty real, -- Quantity (exemple 2)
|
||||
remise_percent real DEFAULT 0, -- % de la remise ligne (exemple 20%)
|
||||
remise real DEFAULT 0, -- Montant calcule de la remise % sur PU HT (exemple 20)
|
||||
@ -36,6 +39,8 @@ create table llx_facturedet
|
||||
price real, -- P.U. HT apres remise % de ligne
|
||||
total_ht real, -- Total HT de la ligne toute quantite et incluant remise ligne et globale
|
||||
total_tva real, -- Total TVA de la ligne toute quantite et incluant remise ligne et globale
|
||||
total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line
|
||||
total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line
|
||||
total_ttc real, -- Total TTC de la ligne toute quantite et incluant remise ligne et globale
|
||||
product_type integer DEFAULT 0,
|
||||
date_start datetime DEFAULT NULL, -- date debut si service
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
-- ===================================================================
|
||||
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
-- Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
--
|
||||
-- This program is free software; you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
@ -27,6 +28,8 @@ create table llx_facturedet_rec
|
||||
product_type integer DEFAULT 0,
|
||||
description text,
|
||||
tva_tx real DEFAULT 19.6, -- taux tva
|
||||
localtax1_tx double(6,3) DEFAULT 0, -- tax local tax 1
|
||||
localtax2_tx double(6,3) DEFAULT 0, -- tax local tax 2
|
||||
qty real, -- quantity
|
||||
remise_percent real DEFAULT 0, -- pourcentage de remise
|
||||
remise real DEFAULT 0, -- montant de la remise
|
||||
@ -34,5 +37,7 @@ create table llx_facturedet_rec
|
||||
price real, -- prix final
|
||||
total_ht real, -- Total HT de la ligne toute quantity et incluant remise ligne et globale
|
||||
total_tva real, -- Total TVA de la ligne toute quantity et incluant remise ligne et globale
|
||||
total_localtax1 double(24,8) DEFAULT 0, -- Total LocalTax1 for total quantity of line
|
||||
total_localtax2 double(24,8) DEFAULT 0, -- total LocalTax2 for total quantity of line
|
||||
total_ttc real -- Total TTC de la ligne toute quantity et incluant remise ligne et globale
|
||||
)type=innodb;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user