From fa94aef0e5f233e61a35be2c94bd6858a22ae5ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Feb 2006 00:38:31 +0000 Subject: [PATCH] =?UTF-8?q?New:=20Les=20actions=20sont=20d=E9crites=20par?= =?UTF-8?q?=20une=20date=20de=20creation,=20debut,=20fin=20et=20modif=20au?= =?UTF-8?q?=20lie=20d'une=20seule=20date=20Fix:=20bug=20#15605?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/actioncomm.class.php | 38 ++++--- htdocs/comm/action/fiche.php | 2 +- htdocs/comm/action/rapport/index.php | 18 +-- htdocs/comm/action/rapport/rapport.pdf.php | 6 +- htdocs/comm/fiche.php | 59 +++++----- htdocs/compta/fiche.php | 109 ++++++++++++++++++- htdocs/includes/modules/modMailing.class.php | 22 ++-- htdocs/langs/en_US/companies.lang | 3 +- htdocs/langs/fr_FR/companies.lang | 3 +- htdocs/soc.php | 80 +++++++------- htdocs/societe.class.php | 2 +- 11 files changed, 233 insertions(+), 109 deletions(-) diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index 62a7564e7fb..5af1602c408 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * * $Id$ * $Source$ @@ -18,7 +18,6 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * */ /** @@ -42,7 +41,10 @@ class ActionComm var $type_code; var $type; var $label; - var $date; + var $datec; // Date creation enregistrement + var $datep; // Date action 0% + var $date; // Date action 100% (datea) + var $datem; // Date modif (tms) var $priority; var $user; var $author; @@ -82,10 +84,14 @@ class ActionComm if (! $this->priority) $this->priority = 0; $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm"; - $sql.= "(datea,fk_action,fk_soc,note,fk_contact,fk_user_author,fk_user_action,label,percent,priority,"; + $sql.= "(datec,"; + $sql.= "datep,"; + if ($this->percent == 100) $sql.= "datea,"; + $sql.= "fk_action,fk_soc,note,fk_contact,fk_user_author,fk_user_action,label,percent,priority,"; $sql.= "fk_facture,propalrowid)"; - $sql.= " VALUES ("; + $sql.= " VALUES (now,"; $sql.= "'".$this->db->idate($this->date)."',"; + if ($this->percent == 100) $sql.= "'".$this->db->idate($this->date)."',"; $sql.= "'".$this->type_id."', '".$this->societe->id."' ,'".addslashes($this->note)."',"; $sql.= ($this->contact->id?$this->contact->id:"null").","; $sql.= "'$author->id', '".$this->user->id ."', '".addslashes($this->label)."','".$this->percent."','".$this->priority."',"; @@ -182,25 +188,31 @@ class ActionComm } } - /** - * \brief Met a jour l'action en base - * \return int <0 si ko, >0 si ok - */ + /** + * \brief Met a jour l'action en base. + * Si percent = 100, on met a jour date 100% + * \return int <0 si ko, >0 si ok + */ function update() { if ($this->percent > 100) $this->percent = 100; $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; $sql.= " SET percent='".$this->percent."'"; - if ($this->percent == 100) $sql .= ", datea = now()"; - if ($this->note) $sql .= ", note = '".addslashes($this->note)."'"; - $sql.= ", fk_contact =". $this->contact->id; + if ($this->percent == 100) $sql.= ", datea = now()"; + if ($this->note) $sql.= ", note = '".addslashes($this->note)."'"; + if ($this->contact->id) $sql.= ", fk_contact =". $this->contact->id; $sql.= " WHERE id=$this->id;"; - if ($this->db->query($sql) ) + if ($this->db->query($sql)) { return 1; } + else + { + $this->error=$this->db->error(); + return -1; + } } diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 88477e2293d..8fe73958acc 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Simon TOSSER * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index e985a8fdf8e..b478d552172 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -33,6 +33,12 @@ require_once("./pre.inc.php"); require_once(DOL_DOCUMENT_ROOT."/contact.class.php"); require_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); +if ($page == -1) { $page = 0 ; } +$limit = $conf->liste_limit; +$offset = $limit * $page ; +if (! $sortorder) $sortorder="DESC"; +if (! $sortfield) $sortfield="a.datea"; + // Sécurité accés client if ($user->societe_id > 0) { @@ -64,18 +70,6 @@ llxHeader(); * Liste */ -if ($page == -1) { $page = 0 ; } -$limit = $conf->liste_limit; -$offset = $limit * $page ; -if ($sortorder == "") -{ - $sortorder="DESC"; -} -if ($sortfield == "") -{ - $sortfield="a.datea"; -} - $sql = "SELECT count(*) as cc, date_format(a.datea, '%m/%Y') as df"; $sql .= ", date_format(a.datea, '%m') as month"; $sql .= ", date_format(a.datea, '%Y') as year"; diff --git a/htdocs/comm/action/rapport/rapport.pdf.php b/htdocs/comm/action/rapport/rapport.pdf.php index ea47524aaf2..1eb4c4bf932 100644 --- a/htdocs/comm/action/rapport/rapport.pdf.php +++ b/htdocs/comm/action/rapport/rapport.pdf.php @@ -96,7 +96,7 @@ class CommActionRapport */ function _cover(&$pdf) { - global $user; + global $user,$conf; $pdf->AddPage(); $pdf->SetAutoPageBreak(false); @@ -112,11 +112,11 @@ class CommActionRapport $pdf->SetFont('Arial','B',18); $pdf->MultiCell(190, 15, $user->fullname, 0, 'C'); $pdf->SetFont('Arial','B',16); - $pdf->MultiCell(190, 15, "Tél : +33 (0) 6 13 79 63 41", 0, 'C'); + $pdf->MultiCell(190, 15, $conf->global->SOCIETE_TEL, 0, 'C'); $pdf->SetFont('Arial','',10); $pdf->SetXY (10, 277); - $pdf->MultiCell(190, 10, "http://www.lafrere.com/", 1, 'C', 1); + $pdf->MultiCell(190, 10, $conf->global->SOCIETE_WEB, 1, 'C', 1); $pdf->Rect(10, 10, 190, 277); return 1; diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 9e5b4b7636b..562c48875ed 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2006 Andre Cianfarani * * 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 @@ -41,6 +41,7 @@ require_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); $langs->load("companies"); $langs->load("orders"); +$langs->load("bills"); $langs->load("contracts"); if ($conf->fichinter->enabled) $langs->load("interventions"); @@ -300,6 +301,29 @@ if ($_socid > 0) print ''.$langs->trans("Type").''.$objsoc->typent.''.$langs->trans("Staff").''.$objsoc->effectif.''; } + // soumis à TVA ou pas + print ''; +/* print ''; + print '
'; + print $langs->trans('VATIsUsed'); + print ''; + if ($_GET['action'] != 'editassujtva') print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; + print ''; + if ($_GET['action'] == 'editassujtva') + { + $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->tva_assuj,'assujtva_value'); + } + else + { + $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->tva_assuj,'none'); + } + print ""; +*/ + print ''.$langs->trans('VATIsUsed').''; + print yn($objsoc->tva_assuj); + print ''; + print ''; + // Remise permanente print ''; print '"; print ''; - // soumis à TVA ou pas - print '"; - print ''; } print "
'; @@ -388,24 +412,6 @@ if ($_socid > 0) } print "
'; - print ''; - print '
'; - print $langs->trans('VATIsUsed'); - print ''; - if ($_GET['action'] != 'editassujtva') print 'id.'">'.img_edit($langs->trans('SetMode'),1).'
'; - print '
'; - if ($_GET['action'] == 'editassujtva') - { - $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->tva_assuj,'assujtva_value'); - } - else - { - $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$objsoc->id,$objsoc->tva_assuj,'none'); - } - print "
"; @@ -790,7 +796,7 @@ if ($_socid > 0) $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $objsoc->id "; + $sql .= " WHERE a.fk_soc = ".$objsoc->id; $sql .= " AND u.rowid = a.fk_user_author"; $sql .= " AND c.id=a.fk_action AND a.percent < 100"; $sql .= " ORDER BY a.datea DESC, a.id DESC"; @@ -835,6 +841,10 @@ if ($_socid > 0) { print "".img_warning("Late").""; } + else + { + print ' '; + } // Status/Percent print ' '; @@ -887,7 +897,7 @@ if ($_socid > 0) $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $objsoc->id "; + $sql .= " WHERE a.fk_soc = ".$objsoc->id; $sql .= " AND u.rowid = a.fk_user_author"; $sql .= " AND c.id=a.fk_action AND a.percent = 100"; $sql .= " ORDER BY a.datea DESC, a.id DESC"; @@ -930,10 +940,7 @@ if ($_socid > 0) } print ''.strftime("%d",$obj->da)."\n"; print ''.strftime("%H:%M",$obj->da)."\n"; - if (date("U",$obj->da) < time()) - { - print " "; - } + print " "; // Statut/Percent print ' '; diff --git a/htdocs/compta/fiche.php b/htdocs/compta/fiche.php index 7a115b4baec..aed5a1b81c4 100644 --- a/htdocs/compta/fiche.php +++ b/htdocs/compta/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 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 @@ -522,6 +522,109 @@ if ($socid > 0) $i++; $tag = !$tag; } + print ""; + + print "
"; + + /* + * Listes des actions a faire + * + */ + print ''; + print ''; + + $sql = "SELECT a.id, a.label, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, u.code, a.propalrowid, a.fk_user_author, fk_contact, u.rowid "; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; + $sql .= " WHERE a.fk_soc = ".$societe->id; + $sql .= " AND u.rowid = a.fk_user_author"; + $sql .= " AND c.id=a.fk_action AND a.percent < 100"; + $sql .= " ORDER BY a.datea DESC, a.id DESC"; + + $result=$db->query($sql); + if ($result) + { + $i = 0 ; + $num = $db->num_rows($result); + $var=true; + + while ($i < $num) + { + $var = !$var; + + $obj = $db->fetch_object($result); + print ""; + + if ($oldyear == strftime("%Y",$obj->da) ) + { + print ''; + } + else + { + print '\n"; + $oldyear = strftime("%Y",$obj->da); + } + + if ($oldmonth == strftime("%Y%b",$obj->da) ) + { + print ''; + } + else + { + print '\n"; + $oldmonth = strftime("%Y%b",$obj->da); + } + + print '\n"; + print '\n"; + if (date("U",$obj->da) < time()) + { + print ""; + } + else + { + print ''; + } + + // Status/Percent + print ''; + + if ($obj->propalrowid) + { + print ''; + } + else + { + print ''; + } + print ""; + + // Contact pour cette action + if ($obj->fk_contact) { + $contact = new Contact($db); + $contact->fetch($obj->fk_contact); + print ''; + } else { + print ''; + } + + print ''; + print "\n"; + $i++; + } + print "
'.$langs->trans("ActionsToDo").' 
|'.strftime("%Y",$obj->da)."|' .strftime("%b",$obj->da)."'.strftime("%d",$obj->da)."'.strftime("%H:%M",$obj->da)."".img_warning("Late")."  '.img_object($langs->trans("ShowAction"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print ''.img_object($langs->trans("ShowAction"),"task"); + $transcode=$langs->trans("Action".$obj->acode); + $libelle=($transcode!="Action".$obj->acode?$transcode:$obj->libelle); + print $libelle; + print '$obj->label'.img_object($langs->trans("ShowContact"),"contact").' '.$contact->fullname.' '.img_object($langs->trans("ShowUser"),"user").' '.$obj->code.'
"; + + $db->free($result); + } else { + dolibarr_print_error($db); + } print "
"; /* @@ -532,9 +635,9 @@ if ($socid > 0) $sql = "SELECT a.id, ".$db->pdate("a.datea")." as da, c.code as acode, c.libelle, a.propalrowid, a.fk_user_author, fk_contact, u.code, u.rowid "; $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a, ".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."user as u "; - $sql .= " WHERE a.fk_soc = $societe->id "; + $sql .= " WHERE a.fk_soc = ".$societe->id; $sql .= " AND u.rowid = a.fk_user_author"; - $sql .= " AND c.id=a.fk_action "; + $sql .= " AND c.id=a.fk_action AND a.percent = 100"; $sql .= " ORDER BY a.datea DESC, a.id DESC"; $result=$db->query($sql); diff --git a/htdocs/includes/modules/modMailing.class.php b/htdocs/includes/modules/modMailing.class.php index 84b4625f49b..ff1b40c4836 100644 --- a/htdocs/includes/modules/modMailing.class.php +++ b/htdocs/includes/modules/modMailing.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2005 Laurent Destailleur +/* Copyright (C) 2005 Rodolphe Quiedeville + * Copyright (C) 2005-2006 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 @@ -21,21 +21,21 @@ */ /** - \defgroup mailing Module mailing - \brief Module pour gérer les mailings + \defgroup mailing Module mailing + \brief Module pour gérer les mailings */ /** - \file htdocs/includes/modules/modMailing.class.php - \ingroup mailing - \brief Fichier de description et activation du module Mailing + \file htdocs/includes/modules/modMailing.class.php + \ingroup mailing + \brief Fichier de description et activation du module Mailing */ include_once "DolibarrModules.class.php"; /** - \class modMailing - \brief Classe de description et activation du module Mailing + \class modMailing + \brief Classe de description et activation du module Mailing */ class modMailing extends DolibarrModules @@ -65,6 +65,10 @@ class modMailing extends DolibarrModules // Dépendances $this->depends = array(); $this->requiredby = array(); + $this->langfiles = array("mails"); + + // Config pages + $this->config_page_url = "mailing.php"; // Constantes $this->const = array(); diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 248e7f26803..0b7959e5151 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -102,7 +102,8 @@ Capital=Capital CapitalOf=Capital of %s EditCompany=Edit company ThisUserIsNot=This user is not a prospect, customer nor supplier -VATIntraCheckableOnEUSite=Intracomunnautary VAT can be checked on European commision site +VATIntraCheckURL=http://europa.eu.int/comm/taxation_customs/vies/fr/vieshome.htm +VATIntraCheckableOnEUSite=Check Intracomunnautary VAT on European commision site NorProspectNorCustomer=Nor prospect, nor customer JuridicalStatus=Juridical status Staff=Staff diff --git a/htdocs/langs/fr_FR/companies.lang b/htdocs/langs/fr_FR/companies.lang index e298cfdaf92..9e51b6c01a1 100644 --- a/htdocs/langs/fr_FR/companies.lang +++ b/htdocs/langs/fr_FR/companies.lang @@ -102,7 +102,8 @@ Capital=Capital CapitalOf=Capital de %s EditCompany=Modification société ThisUserIsNot=Cet utilisateur n'est ni un prospect, ni un client, ni un fournisseur -VATIntraCheckableOnEUSite=(Vérifiable sur le site de la Commission Européenne) +VATIntraCheckURL=http://europa.eu.int/comm/taxation_customs/vies/fr/vieshome.htm +VATIntraCheckableOnEUSite=Vérifier sur le site de la Commission Européenne NorProspectNorCustomer=Ni client, ni prospect JuridicalStatus=Forme juridique Staff=Effectif diff --git a/htdocs/soc.php b/htdocs/soc.php index 58774b2c27f..21d6a3cb77e 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Brian Fraval - * Copyright (C) 2004-2005 Laurent Destailleur + * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005 Regis Houssin * @@ -34,6 +34,7 @@ require("pre.inc.php"); $user->getrights('societe'); $langs->load("companies"); $langs->load("commercial"); +$langs->load("bills"); if (! $user->rights->societe->creer) { @@ -58,12 +59,14 @@ $soc = new Societe($db); /* * Actions */ + // assujétissement à la TVA if ($_POST["action"] == 'setassujtva') { $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET tva_assuj='".$_POST['assujtva_value']."' WHERE idp='".$socid."'"; $result = $db->query($sql); } + if ($_POST["action"] == 'add' || $_POST["action"] == 'update') { $soc->nom = $_POST["nom"]; @@ -92,7 +95,7 @@ if ($_POST["action"] == 'add' || $_POST["action"] == 'update') $soc->typent_id = $_POST["typent_id"]; $soc->client = $_POST["client"]; $soc->fournisseur = $_POST["fournisseur"]; - $soc->tva_assuj = $_POST["assujtva_value"]; + $soc->tva_assuj = $_POST["assujtva_value"]; if ($_POST["action"] == 'update') { @@ -444,7 +447,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''.$langs->trans('Name').''; - print ''.$langs->trans("Prefix").''; + print ''.$langs->trans("Prefix").''; print ''; print ''; @@ -548,10 +551,15 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') else print '  '; print ''; - print ''.$langs->trans('VATIntraShort').''; + // Assujeti TVA + print ''.$langs->trans('VATIsUsed').''; + $form->select_assujetti_tva($soc->tva_assuj,'assujtva_value'); + print ''; + + print ''.$langs->trans('VATIntraShort').''; print ''; print ''; - print ' '.$langs->trans("VATIntraCheckableOnEUSite"); + print ' id_pays).'" target="_blank" alt="'.$langs->trans("VATIntraCheckableOnEUSite").'">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"),'help').''; print ''; print ''.$langs->trans("Capital").' '.$langs->trans("Currency".$conf->monnaie).''; @@ -566,13 +574,7 @@ elseif ($_GET["action"] == 'edit' || $_POST["action"] == 'edit') print ''.$langs->trans("Staff").''; $form->select_array("effectif_id",$soc->effectif_array(), $soc->effectif_id); print ''; - // assuj TVA - if($conf->facture->enabled) - { - print ''.$langs->trans('VATIsUsed').''; - $form->select_assujetti_tva($soc->tva_assuj,'assujtva_value'); - print ''."\n"; - } + print ''; print ''; @@ -762,8 +764,33 @@ else } else print '  '; - // TVA - print ''.$langs->trans('VATIntraShort').''; + // Assujeti TVA + $html = new Form($db); + print ''; +/* Pas besoin de gérer l'icone "Modifier" car le champ est déja editable quand société en mode "Edit" + print '
'; + print $langs->trans('VATIsUsed'); + print ''; + if ($user->rights->societe->creer && $_GET['action'] != 'editassujtva') + print 'id.'">'.img_edit($langs->trans('SetMode')).''; + else + print ' '; + print '
'; + print ''; + print ''; + if($_GET['action'] == 'editassujtva') + print $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->tva_assuj,'assujtva_value'); + else if($soc->tva_assuj == 1) + print 'oui'; + else + print 'non'; + print ''; +*/ + print $langs->trans('VATIsUsed'); + print ''; + print yn($soc->tva_assuj); + print ''; + print ''.$langs->trans('VATIntraShort').''; print $soc->tva_intra; print ''; @@ -843,31 +870,6 @@ else dolibarr_print_error($db); } print ''; - // assuj TVA - if($conf->facture->enabled) - { - $html = new Form($db); - print ''; - print '
'; - print $langs->trans('VATIsUsed'); - print ''; - if ($user->rights->societe->creer && $_GET['action'] != 'editassujtva') - print 'id.'">'.img_edit($langs->trans('SetMode')).''; - else - print ' '; - print '
'; - print ''; - print ''; - if($_GET['action'] == 'editassujtva') - print $html->form_assujetti_tva($_SERVER['PHP_SELF'].'?socid='.$soc->id,$soc->tva_assuj,'assujtva_value'); - else if($soc->tva_assuj == 1) - print 'oui'; - else - print 'non'; - print ''; - print ''; - - } print ''; print "\n"; diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 5e31d03bcd4..3043d3fe8dd 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -326,7 +326,7 @@ class Societe { $sql .= ",client = " . $this->client; $sql .= ",fournisseur = " . $this->fournisseur; - $sql .= ",tva_assuj = " . $this->tva_assuj; + $sql .= ",tva_assuj = ".($this->tva_assuj>=0?"'".$this->tva_assuj."'":"null"); if ($this->creation_bit || $this->codeclient_modifiable) {