diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 409c0892d96..6bd3baf8967 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -899,7 +899,7 @@ if ($_GET['action'] == 'down' && $user->rights->propale->creer) * View */ -llxHeader('',$langs->trans('Proposal'),'Proposition'); +llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos'); $html = new Form($db); $formfile = new FormFile($db); @@ -925,7 +925,7 @@ if ($id > 0 || ! empty($ref)) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dol_fiche_head($head, 'comm', $langs->trans('Proposal')); + dol_fiche_head($head, 'comm', $langs->trans('Proposal'), 0, 'propal'); // Clone confirmation if ($_GET["action"] == 'clone') diff --git a/htdocs/comm/propal/aideremise.php b/htdocs/comm/propal/aideremise.php deleted file mode 100644 index a94e5f7ce5e..00000000000 --- a/htdocs/comm/propal/aideremise.php +++ /dev/null @@ -1,106 +0,0 @@ - - * Copyright (C) 2004 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * 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. - */ - -/** - \file htdocs/comm/propal/aideremise.php - \ingroup propale - \brief Page de simulation des remises - \version $Id$ -*/ - -require("./pre.inc.php"); -include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); - -$propalid = isset($_GET["propalid"])?$_GET["propalid"]:''; - -// Security cehck -if ($user->societe_id) $socid=$user->societe_id; -$result = restrictedArea($user, 'propale', $propalid, 'propal'); - - -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ - - - - -/******************************************************************************/ -/* View */ -/******************************************************************************/ - -llxHeader(); - -/* - * - * Mode fiche - * - * - */ -if ($_GET["propalid"]) -{ - $html = new Form($db); - - $propal = new Propal($db); - $propal->fetch($_GET["propalid"]); - - $societe = new Societe($db); - $societe->fetch($propal->socid); - - $head[0][0] = DOL_URL_ROOT.'/comm/propal.php?propalid='.$propal->id; - $head[0][1] = "Proposition commerciale : $propal->ref"; - $h = 1; - $a = 0; - $head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?propalid='.$propal->id; - $head[$h][1] = "Note"; - $h++; - $head[$h][0] = DOL_URL_ROOT.'/comm/propal/info.php?propalid='.$propal->id; - $head[$h][1] = "Info"; - - dol_fiche_head($head, $a, $societe->nom); - - $price = $propal->price + $propal->remise; - - print_titre("Simulation des remises sur le prix HT : ".price($price)); - print ''; - $j=1; - for ($i = 1 ; $i < 100 ; $i= $i+3) - { - - $ht1 = $price - ($price * $j / 100 ); - - $ht2 = $price - ($price * ($j+33) / 100 ); - - $ht3 = $price - ($price * ($j+66) / 100 ); - - - print ""; - print ""; - print ""; - - $j++; - - - } - print "
$j %".price($ht1)."".($j+33)." %".price($ht2)."".($j+66)." %".price($ht3)."
"; - -} -$db->close(); -llxFooter("Dernière modification $Date$ révision $Revision$"); -?> diff --git a/htdocs/comm/propal/apercu.php b/htdocs/comm/propal/apercu.php index 3927f7a807b..9583c6852ab 100644 --- a/htdocs/comm/propal/apercu.php +++ b/htdocs/comm/propal/apercu.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Éric Seigne + * Copyright (C) 2004 �ric Seigne * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * @@ -22,7 +22,7 @@ /** \file htdocs/comm/propal/apercu.php \ingroup propal - \brief Page de l'onglet aperçu d'une propal + \brief Page de l'onglet aper�u d'une propal \version $Id$ */ @@ -66,7 +66,7 @@ if ($_GET["propalid"] > 0) $soc->fetch($propal->socid); $head = propal_prepare_head($propal); - dol_fiche_head($head, 'preview', $langs->trans('Proposal')); + dol_fiche_head($head, 'preview', $langs->trans('Proposal'), 0, 'propal'); /* @@ -141,7 +141,7 @@ if ($_GET["propalid"] > 0) $relativepath = "${propalref}/${propalref}.pdf"; $relativepathdetail = "${propalref}/${propalref}-detail.pdf"; - // Chemin vers png aperçus + // Chemin vers png aper�us $relativepathimage = "${propalref}/${propalref}.pdf.png"; $fileimage = $file.".png"; // Si PDF d'1 page $fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page @@ -163,8 +163,8 @@ if ($_GET["propalid"] > 0) print ''; // Si fichier detail PDF existe - if (file_exists($filedetail)) { // propal détaillée supplémentaire - print "Propal détaillée"; + if (file_exists($filedetail)) { // propal d�taill�e suppl�mentaire + print "Propal d�taill�e"; print ''.$propal->ref.'-detail.pdf'; print ''.filesize($filedetail). ' bytes'; @@ -213,17 +213,17 @@ if ($_GET["propalid"] > 0) dol_print_error($db); } } else { - // Propal non trouvée + // Propal non trouv�e print $langs->trans("ErrorPropalNotFound",$_GET["propalid"]); } } -// Si fichier png PDF d'1 page trouvé +// Si fichier png PDF d'1 page trouv� if (file_exists($fileimage)) { print ''; } -// Si fichier png PDF de plus d'1 page trouvé +// Si fichier png PDF de plus d'1 page trouv� elseif (file_exists($fileimagebis)) { $multiple = $relativepathimage . "."; diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 9beb20b4592..125c5a6f28d 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -173,7 +173,7 @@ if ($id > 0) $head = propal_prepare_head($propal); - dol_fiche_head($head, 'contact', $langs->trans("Proposal")); + dol_fiche_head($head, 'contact', $langs->trans("Proposal"), 0, 'propal'); /* diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 0d5cdecea3b..1744b1fc524 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -125,7 +125,7 @@ if ($propalid > 0) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dol_fiche_head($head, 'document', $langs->trans('Proposal')); + dol_fiche_head($head, 'document', $langs->trans('Proposal'), 0, 'propal'); // Construit liste des fichiers diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 2aae696fd2d..356a11d27af 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -41,8 +41,7 @@ $result = restrictedArea($user, 'propale', $propalid, 'propal'); /* - * - * + * View */ llxHeader(); @@ -54,7 +53,7 @@ $societe = new Societe($db); $societe->fetch($propal->socid); $head = propal_prepare_head($propal); -dol_fiche_head($head, 'info', $langs->trans('Proposal')); +dol_fiche_head($head, 'info', $langs->trans('Proposal'), 0, 'propal'); $propal->info($propal->id); diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 77f1b59085e..425bc6658c6 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -52,7 +52,7 @@ if ($_POST["action"] == 'update_public' && $user->rights->propale->creer) $propal->fetch($_GET['propalid']); $db->begin(); - + $res=$propal->update_note_public($_POST["note_public"],$user); if ($res < 0) { @@ -97,9 +97,9 @@ $html = new Form($db); if ($_GET['propalid']) { if ($mesg) print $mesg; - + $now=gmmktime(); - + $propal = new Propal($db); if ( $propal->fetch($_GET['propalid']) ) { @@ -107,15 +107,15 @@ if ($_GET['propalid']) if ( $societe->fetch($propal->socid) ) { $head = propal_prepare_head($propal); - dol_fiche_head($head, 'note', $langs->trans('Proposal')); - + dol_fiche_head($head, 'note', $langs->trans('Proposal'), 0, 'propal'); + print ''; print ''; - + // Societe print ''; - + // Ligne info remises tiers print ''; - + // Date print ''; print ''; - + // Date fin propal print ''; print '"; - + // Note privee if (! $user->societe_id) { @@ -186,7 +186,7 @@ if ($_GET['propalid']) } print ""; } - + print "
'.$langs->trans('Ref').''.$propal->ref.'
'.$langs->trans('Company').''.$societe->getNomUrl(1).'
'.$langs->trans('Discounts').''; if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); @@ -126,13 +126,13 @@ if ($_GET['propalid']) else print $langs->trans("CompanyHasNoAbsoluteDiscount"); print '.'; print '
'.$langs->trans('Date').''; print dol_print_date($propal->date,'daytext'); print '
'.$langs->trans('DateEndPropal').''; @@ -165,7 +165,7 @@ if ($_GET['propalid']) print ($propal->note_public?nl2br($propal->note_public):" "); } print "
"; print ''; diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index e4d29e05ca4..88685deb62d 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref)) $societe->fetch($propal->socid); $head = propal_prepare_head($propal); - dol_fiche_head($head, 'compta', $langs->trans('Proposal')); + dol_fiche_head($head, 'compta', $langs->trans('Proposal'), 0, 'propal'); /* diff --git a/htdocs/contact/exportimport.php b/htdocs/contact/exportimport.php index 9277434a9f3..957628adc58 100644 --- a/htdocs/contact/exportimport.php +++ b/htdocs/contact/exportimport.php @@ -48,12 +48,9 @@ $contact = new Contact($db); $contact->fetch($_GET["id"], $user); -/* - * Affichage onglets - */ $head = contact_prepare_head($contact); -dol_fiche_head($head, 'exportimport', $langs->trans("Contact")); +dol_fiche_head($head, 'exportimport', $langs->trans("Contact"), 0, 'contact'); /* diff --git a/htdocs/contact/fiche.php b/htdocs/contact/fiche.php index 7ff810d91c8..8fcd3afcc6f 100644 --- a/htdocs/contact/fiche.php +++ b/htdocs/contact/fiche.php @@ -218,7 +218,7 @@ if ($_GET["id"] > 0) */ $head = contact_prepare_head($contact); - dol_fiche_head($head, 'general', $langs->trans("Contact")); + dol_fiche_head($head, 'general', $langs->trans("Contact"), 0, 'contact'); } diff --git a/htdocs/contact/info.php b/htdocs/contact/info.php index 18f23474aa9..e7549134c4d 100644 --- a/htdocs/contact/info.php +++ b/htdocs/contact/info.php @@ -51,7 +51,7 @@ $contact->fetch($_GET["id"], $user); $head = contact_prepare_head($contact); -dol_fiche_head($head, 'info', $langs->trans("Contact")); +dol_fiche_head($head, 'info', $langs->trans("Contact"), 0, 'contact'); print ''; // LDAP DN print '\n"; -// LDAP Clé +// LDAP Cl� print '\n"; // LDAP Server @@ -139,7 +136,7 @@ if ($result > 0) { if (! is_array($records)) { - print ''; + print ''; } else { diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index bb439c6e6b3..aeabfbd7949 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -46,13 +46,13 @@ if ($user->rights->societe->contact->creer) { $contact = new Contact($db); $contact->fetch($_POST["contactid"]); - + // Note: Correct date should be completed with location to have exact GM time of birth. $contact->birthday = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]); $contact->birthday_alert = $_POST["birthday_alert"]; - + $result = $contact->update_perso($_POST["contactid"], $user); - + if ($result > 0) { $contact->old_name=''; @@ -82,7 +82,7 @@ $contact->fetch($_GET["id"], $user); */ $head = contact_prepare_head($contact); -dol_fiche_head($head, 'perso', $langs->trans("Contact")); +dol_fiche_head($head, 'perso', $langs->trans("Contact"), 0, 'contact'); @@ -103,7 +103,7 @@ if ($_GET["action"] == 'edit') print ''; - + // Name print ''; print ''; @@ -122,12 +122,12 @@ if ($_GET["action"] == 'edit') print $langs->trans("ContactNotLinkedToCompany"); print ''; } - + // Civility print ''; - + // Date To Birth print ''; } - + // Civility print ''; - + // Date To Birth if ($contact->birthday != '') { @@ -218,7 +218,7 @@ else if ($user->societe_id == 0) { print '
'; - + if ($user->rights->societe->contact->creer) { print ''.$langs->trans('Modify').''; diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 23663265c15..3026cdc42aa 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -2054,7 +2054,7 @@ class Propal extends CommonObject } $lienfin=''; - $picto='order'; + $picto='propal'; $label=$langs->trans("ShowPropal").': '.$this->ref; if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin); @@ -2180,9 +2180,9 @@ class PropaleLigne * \return int <0 si ko, >0 si ok */ function insert() - { + { global $conf; - + dol_syslog("PropaleLigne::insert rang=".$this->rang); $this->db->begin(); @@ -2247,7 +2247,7 @@ class PropaleLigne if ($resql) { $this->rang=$rangmax; - + $this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'propaldet'); if (! $notrigger) { @@ -2257,8 +2257,8 @@ class PropaleLigne $result = $interface->run_triggers('LINEPROPAL_INSERT',$this,$user,$langs,$conf); if ($result < 0) { $error++; $this->errors=$interface->errors; } // Fin appel triggers - } - + } + $this->db->commit(); return 1; } diff --git a/htdocs/theme/auguria/img/object_contact.png b/htdocs/theme/auguria/img/object_contact.png index 732313a7639..09f772e7a83 100755 Binary files a/htdocs/theme/auguria/img/object_contact.png and b/htdocs/theme/auguria/img/object_contact.png differ diff --git a/htdocs/theme/bluelagoon/img/object_contact.png b/htdocs/theme/bluelagoon/img/object_contact.png index 262303d67f4..09f772e7a83 100644 Binary files a/htdocs/theme/bluelagoon/img/object_contact.png and b/htdocs/theme/bluelagoon/img/object_contact.png differ diff --git a/htdocs/theme/eldy/img/object_contact.png b/htdocs/theme/eldy/img/object_contact.png index 732313a7639..09f772e7a83 100755 Binary files a/htdocs/theme/eldy/img/object_contact.png and b/htdocs/theme/eldy/img/object_contact.png differ diff --git a/htdocs/theme/freelug/img/object_contact.png b/htdocs/theme/freelug/img/object_contact.png index 262303d67f4..09f772e7a83 100755 Binary files a/htdocs/theme/freelug/img/object_contact.png and b/htdocs/theme/freelug/img/object_contact.png differ diff --git a/htdocs/theme/rodolphe/img/object_contact.png b/htdocs/theme/rodolphe/img/object_contact.png index 262303d67f4..09f772e7a83 100644 Binary files a/htdocs/theme/rodolphe/img/object_contact.png and b/htdocs/theme/rodolphe/img/object_contact.png differ diff --git a/htdocs/theme/yellow/img/object_contact.png b/htdocs/theme/yellow/img/object_contact.png index 262303d67f4..09f772e7a83 100644 Binary files a/htdocs/theme/yellow/img/object_contact.png and b/htdocs/theme/yellow/img/object_contact.png differ
'; diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 74cd0cf5adf..4956be54e0e 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -52,12 +52,9 @@ $contact = new Contact($db); $contact->fetch($_GET["id"], $user); -/* - * Affichage onglets - */ $head = contact_prepare_head($contact); -dol_fiche_head($head, 'ldap', $langs->trans("Contact")); +dol_fiche_head($head, 'ldap', $langs->trans("Contact"), 0, 'contact'); /* @@ -97,7 +94,7 @@ print '
LDAP '.$langs->trans("LDAPContactDn").''.$conf->global->LDAP_CONTACT_DN."
LDAP '.$langs->trans("LDAPNamingAttribute").''.$conf->global->LDAP_KEY_CONTACTS."
'.$langs->trans("ErrorFailedToReadLDAP").'
'.$langs->trans("ErrorFailedToReadLDAP").'
'.$langs->trans("Ref").''; print $contact->id; print '
'.$langs->trans("Lastname").''.$contact->nom.''.$langs->trans("Firstname").''.$contact->prenom.'
'.$langs->trans("UserTitle").''; print $contact->getCivilityLabel(); print '
'.$langs->trans("DateToBirth").''; $html=new Form($db); @@ -188,12 +188,12 @@ else print $langs->trans("ContactNotLinkedToCompany"); print '
'.$langs->trans("UserTitle").''; print $contact->getCivilityLabel(); print '