diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 71407532be7..509ae601487 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2006 Laurent Destailleur + * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2007 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -1349,7 +1349,7 @@ else print ''; } - print ''.$objp->tva_tx.'%'; + print ''.vatrate($objp->tva_tx).'%'; print ''.price($objp->subprice).''; print ''; if (($objp->info_bits & 2) != 2) diff --git a/htdocs/fichinter/fichinter.class.php b/htdocs/fichinter/fichinter.class.php index e86e4e6e10d..9768a98a5c2 100644 --- a/htdocs/fichinter/fichinter.class.php +++ b/htdocs/fichinter/fichinter.class.php @@ -253,22 +253,22 @@ class Fichinter extends CommonObject if ($mode == 2) { if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0').' '.$this->statuts_short[$statut]; - if ($statut==1) return img_picto($this->statuts_short[$statut],'statut1').' '.$this->statuts_short[$statut]; + if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6').' '.$this->statuts_short[$statut]; } if ($mode == 3) { if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0'); - if ($statut==1) return img_picto($this->statuts_short[$statut],'statut1'); + if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6'); } if ($mode == 4) { if ($statut==0) return img_picto($this->statuts_short[$statut],'statut0').' '.$this->statuts[$statut]; - if ($statut==1) return img_picto($this->statuts_short[$statut],'statut1').' '.$this->statuts[$statut]; + if ($statut==1) return img_picto($this->statuts_short[$statut],'statut6').' '.$this->statuts[$statut]; } if ($mode == 5) { if ($statut==0) return $this->statuts_short[$statut].' '.img_picto($this->statuts_short[$statut],'statut0'); - if ($statut==1) return $this->statuts_short[$statut].' '.img_picto($this->statuts_short[$statut],'statut1'); + if ($statut==1) return $this->statuts_short[$statut].' '.img_picto($this->statuts_short[$statut],'statut6'); } } diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index f529da2db63..ce6e82fd1d9 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -351,8 +351,8 @@ OrionNumRefModelDesc3=D OrionNumRefModelDesc4=Dans cette exemple nous aurons au 1er septembre 2006 une facture nommée FA0700354. # terre -TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0 -TerreNumRefModelError=Une facture commençant par $fayymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module. +TerreNumRefModelDesc1=Return numero with format %syymm-nnnn for standard invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +TerreNumRefModelError=A bill starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. # titan TitanNumRefModelDesc1=Renvoie le numéro sous la forme FAYYNNNNN où YY est l'année et NNNNN le numéro d'incrément qui commence à 1. diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index 573f90e2b6c..855da8ad9fb 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -15,4 +15,9 @@ InterventionContact=Intervention contact TypeContact_fichinter_internal_INTERREPFOLL=Representative following-up intervention TypeContact_fichinter_internal_INTERVENING=Intervening TypeContact_fichinter_external_BILLING=Billing customer contact -TypeContact_fichinter_external_CUSTOMER=Following-up customer contact \ No newline at end of file +TypeContact_fichinter_external_CUSTOMER=Following-up customer contact +# Modele numérotation +ArcticNumRefModelDesc1=Generic number model +ArcticNumRefModelError=Failed to activate +PacificNumRefModelDesc1=Return numero with format %syymm-nnnn where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 +PacificNumRefModelError=An intervention card starting with $syymm already exists and is not compatible with this model of sequence. Remove it or rename it to activate this module. diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 8ae635e16e2..2a1dc227d63 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -352,7 +352,7 @@ OrionNumRefModelDesc4=Dans cet exemple nous aurons au 1er septembre 2006 une fac # terre TerreNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn pour les factures et %syymm-nnnn pour les avoirs où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0 -TerreNumRefModelError=Une facture commençant par $fayymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module. +TerreNumRefModelError=Une facture commençant par $syymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module. # titan TitanNumRefModelDesc1=Renvoie le numéro sous la forme FAYYNNNNN où YY est l'année et NNNNN le numéro d'incrément qui commence à 1. diff --git a/htdocs/langs/fr_FR/interventions.lang b/htdocs/langs/fr_FR/interventions.lang index be43d1fab64..40d0e08b539 100644 --- a/htdocs/langs/fr_FR/interventions.lang +++ b/htdocs/langs/fr_FR/interventions.lang @@ -15,4 +15,9 @@ InterventionContact=Contact intervention TypeContact_fichinter_internal_INTERREPFOLL=Responsable suivi de l'intervention TypeContact_fichinter_internal_INTERVENING=Intervenant TypeContact_fichinter_external_BILLING=Contact client facturation intervention -TypeContact_fichinter_external_CUSTOMER=Contact client suivi de l'intervention \ No newline at end of file +TypeContact_fichinter_external_CUSTOMER=Contact client suivi de l'intervention +# Modele numérotation +ArcticNumRefModelDesc1=Modele de numérotation générique +ArcticNumRefModelError=Activation impossible +PacificNumRefModelDesc1=Renvoie le numéro sous la forme %syymm-nnnn où yy est l'année, mm le mois et nnnn un compteur séquentiel sans rupture et sans remise à 0 +PacificNumRefModelError=Une facture commençant par $syymm existe en base et est incompatible avec cette numérotation. Supprimer la ou renommer la pour activer ce module. diff --git a/mysql/migration/2.1.0-2.2.0.sql b/mysql/migration/2.1.0-2.2.0.sql index 02c1b527d1b..a14ed5bd3fa 100644 --- a/mysql/migration/2.1.0-2.2.0.sql +++ b/mysql/migration/2.1.0-2.2.0.sql @@ -563,6 +563,12 @@ drop table if exists llx_ventes; drop table if exists llx_pointmort; drop table if exists llx_birthday_alert; +ALTER TABLE llx_commande_fournisseurdet ADD total_ht double(16,8) after subprice; +ALTER TABLE llx_commande_fournisseurdet ADD total_tva double(16,8) after total_ht; +ALTER TABLE llx_commande_fournisseurdet ADD total_ttc double(16,8) after total_tva; +ALTER TABLE llx_commande_fournisseurdet ADD info_bits integer DEFAULT 0 after total_ttc; + + -- Pas de limite sur nb decimal des prix dans base car definie en option -- Tous les prix doivent etre au format float(16,8) -- Tous les tx tva doivent etre au format float(6,3) @@ -617,6 +623,26 @@ ALTER TABLE llx_contratdet MODIFY total_ht double(16,8); ALTER TABLE llx_contratdet MODIFY total_tva double(16,8); ALTER TABLE llx_contratdet MODIFY total_ttc double(16,8); +ALTER TABLE llx_commande MODIFY total_ht double(16,8); +ALTER TABLE llx_commande MODIFY tva double(16,8); +ALTER TABLE llx_commande MODIFY total_ttc double(16,8); + +ALTER TABLE llx_commande_fournisseur MODIFY total_ht double(16,8); +ALTER TABLE llx_commande_fournisseur MODIFY tva double(16,8); +ALTER TABLE llx_commande_fournisseur MODIFY total_ttc double(16,8); + +ALTER TABLE llx_commandedet MODIFY subprice double(16,8); +ALTER TABLE llx_commandedet MODIFY total_tva double(16,8); +ALTER TABLE llx_commandedet MODIFY total_ht double(16,8); +ALTER TABLE llx_commandedet MODIFY total_ttc double(16,8); +ALTER TABLE llx_commandedet MODIFY tva_tx double(6,3); + +ALTER TABLE llx_commande_fournisseurdet MODIFY subprice double(16,8); +ALTER TABLE llx_commande_fournisseurdet MODIFY total_tva double(16,8); +ALTER TABLE llx_commande_fournisseurdet MODIFY total_ht double(16,8); +ALTER TABLE llx_commande_fournisseurdet MODIFY total_ttc double(16,8); +ALTER TABLE llx_commande_fournisseurdet MODIFY tva_tx double(6,3); + ALTER TABLE llx_societe_remise_except MODIFY amount_ht double(16,8) DEFAULT 0; ALTER TABLE llx_societe_remise_except MODIFY amount_tva double(16,8) DEFAULT 0; ALTER TABLE llx_societe_remise_except MODIFY amount_ttc double(16,8) DEFAULT 0; diff --git a/mysql/tables/llx_commande.sql b/mysql/tables/llx_commande.sql index 8370fd8e0a8..6b9f9d4eea6 100644 --- a/mysql/tables/llx_commande.sql +++ b/mysql/tables/llx_commande.sql @@ -42,9 +42,9 @@ create table llx_commande remise_percent real default 0, remise_absolue real default 0, remise real default 0, - tva real default 0, - total_ht real default 0, - total_ttc real default 0, + tva double(16,8) default 0, + total_ht double(16,8) default 0, + total_ttc double(16,8) default 0, note text, note_public text, model_pdf varchar(50), diff --git a/mysql/tables/llx_commande_fournisseur.sql b/mysql/tables/llx_commande_fournisseur.sql index a3eeb53a81c..2f8f5bb535e 100644 --- a/mysql/tables/llx_commande_fournisseur.sql +++ b/mysql/tables/llx_commande_fournisseur.sql @@ -40,9 +40,9 @@ create table llx_commande_fournisseur amount_ht real default 0, remise_percent real default 0, remise real default 0, - tva real default 0, - total_ht real default 0, - total_ttc real default 0, + tva double(16,8) default 0, + total_ht double(16,8) default 0, + total_ttc double(16,8) default 0, note text, note_public text, model_pdf varchar(50), diff --git a/mysql/tables/llx_commande_fournisseurdet.sql b/mysql/tables/llx_commande_fournisseurdet.sql index 7a3f477a7a1..86b21e591e8 100644 --- a/mysql/tables/llx_commande_fournisseurdet.sql +++ b/mysql/tables/llx_commande_fournisseurdet.sql @@ -1,5 +1,6 @@ -- =================================================================== -- Copyright (C) 2004 Rodolphe Quiedeville +-- Copyright (C) 2007 Laurent Destailleur -- -- 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,10 +28,14 @@ create table llx_commande_fournisseurdet ref varchar(50), label varchar(255), description text, - tva_tx real DEFAULT 19.6, -- taux tva + tva_tx double(6,3), -- taux tva qty real, -- quantité remise_percent real DEFAULT 0, -- pourcentage de remise remise real DEFAULT 0, -- montant de la remise - subprice real, -- prix avant remise - price real -- prix final + price real, -- prix final + subprice double(16,8), -- prix unitaire + total_ht double(16,8), -- Total HT de la ligne toute quantité et incluant remise ligne et globale + total_tva double(16,8), -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + total_ttc double(16,8), -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + info_bits integer DEFAULT 0, -- TVA NPR ou non )type=innodb; diff --git a/mysql/tables/llx_commandedet.sql b/mysql/tables/llx_commandedet.sql index d9e85f966b3..d42031002bf 100644 --- a/mysql/tables/llx_commandedet.sql +++ b/mysql/tables/llx_commandedet.sql @@ -1,6 +1,6 @@ -- =================================================================== --- Copyright (C) 2003 Rodolphe Quiedeville --- Copyright (C) 2006 Laurent Destailleur +-- Copyright (C) 2003 Rodolphe Quiedeville +-- Copyright (C) 2006-2007 Laurent Destailleur -- -- 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 @@ -26,17 +26,17 @@ create table llx_commandedet fk_commande integer, fk_product integer, description text, - tva_tx real, -- taux tva + tva_tx double(6,3), -- taux tva qty real, -- quantité remise_percent real DEFAULT 0, -- pourcentage de remise remise real DEFAULT 0, -- montant de la remise fk_remise_except integer NULL, -- Lien vers table des remises fixes - subprice real, -- prix avant remise price real, -- prix final - total_ht real, -- Total HT de la ligne toute quantité et incluant remise ligne et globale - total_tva real, -- Total TVA de la ligne toute quantité et incluant remise ligne et globale - total_ttc real, -- Total TTC de la ligne toute quantité et incluant remise ligne et globale - info_bits integer DEFAULT 0, -- TVA NPR ou non + subprice double(16,8), -- prix unitaire + total_ht double(16,8), -- Total HT de la ligne toute quantité et incluant remise ligne et globale + total_tva double(16,8), -- Total TVA de la ligne toute quantité et incluant remise ligne et globale + total_ttc double(16,8), -- Total TTC de la ligne toute quantité et incluant remise ligne et globale + info_bits integer DEFAULT 0, -- TVA NPR ou non coef real, -- coefficient de marge special_code tinyint(1) UNSIGNED DEFAULT 0, -- code pour les lignes speciales rang integer DEFAULT 0