Suite gestion des arrondis. On s'attaque aux commandes.

This commit is contained in:
Laurent Destailleur 2007-07-07 17:16:12 +00:00
parent 6ba0d4aa06
commit 45d502f9e5
11 changed files with 69 additions and 28 deletions

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
* Copyright (C) 2005-2007 Regis Houssin <regis.houssin@cap-networks.com>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
@ -1349,7 +1349,7 @@ else
print '</td>';
}
print '<td align="right">'.$objp->tva_tx.'%</td>';
print '<td align="right">'.vatrate($objp->tva_tx).'%</td>';
print '<td align="right">'.price($objp->subprice).'</td>';
print '<td align="right">';
if (($objp->info_bits & 2) != 2)

View File

@ -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');
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -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),

View File

@ -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),

View File

@ -1,5 +1,6 @@
-- ===================================================================
-- Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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;

View File

@ -1,6 +1,6 @@
-- ===================================================================
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
-- Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
-- Copyright (C) 2006-2007 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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