From 777920b7dec8ba6f83f66d73fb3a19a77ca8dbf7 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@users.sourceforge.net>
Date: Thu, 25 May 2006 12:03:39 +0000
Subject: [PATCH] Ajout des champs total_ht et total_ttc sur ligne facture car
 c'est obligatoire en compta

---
 htdocs/facture.class.php        | 2 +-
 mysql/migration/2.0.0-2.1.0.sql | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php
index 3f0e88c6b28..9ae21d4c22b 100644
--- a/htdocs/facture.class.php
+++ b/htdocs/facture.class.php
@@ -2223,7 +2223,7 @@ class FactureLigne
 	var $produit_id;
 	var $date_start;
 	var $date_end;
-	var $info_bits;
+	var $info_bits;			// 0 si TVA normal, 1 si TVA NPR
 
 
 	/**
diff --git a/mysql/migration/2.0.0-2.1.0.sql b/mysql/migration/2.0.0-2.1.0.sql
index e214943830c..23eabdbd05c 100644
--- a/mysql/migration/2.0.0-2.1.0.sql
+++ b/mysql/migration/2.0.0-2.1.0.sql
@@ -79,8 +79,11 @@ ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_facture (fk
 ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid);
 
 
+ALTER TABLE llx_facturedet ADD COLUMN total_ht        real after price;
+ALTER TABLE llx_facturedet ADD COLUMN total_tva       real;
+ALTER TABLE llx_facturedet ADD COLUMN total_ttc       real;
 ALTER TABLE llx_facturedet ADD COLUMN info_bits		  integer DEFAULT 0 after date_end;
-  
+
   
 ALTER TABLE llx_commande ADD INDEX idx_commande_fk_soc (fk_soc);
 ALTER TABLE llx_commande ADD CONSTRAINT fk_commande_societe FOREIGN KEY (fk_soc) REFERENCES llx_societe (idp);
-- 
GitLab