New: Add picto on tab titles
@ -899,7 +899,7 @@ if ($_GET['action'] == 'down' && $user->rights->propale->creer)
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Proposal'),'Proposition');
|
llxHeader('',$langs->trans('Proposal'),'EN:Commercial_Proposals|FR:Proposition_commerciale|ES:Presupuestos');
|
||||||
|
|
||||||
$html = new Form($db);
|
$html = new Form($db);
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
@ -925,7 +925,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$societe->fetch($propal->socid);
|
$societe->fetch($propal->socid);
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$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
|
// Clone confirmation
|
||||||
if ($_GET["action"] == 'clone')
|
if ($_GET["action"] == 'clone')
|
||||||
|
|||||||
@ -1,106 +0,0 @@
|
|||||||
<?php
|
|
||||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
* Copyright (C) 2004 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
|
|
||||||
* 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 '<table class="border" cellspacing="0" cellpadding="2" width="100%">';
|
|
||||||
$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 "<tr><td>$j %</td><td>".price($ht1)."</td>";
|
|
||||||
print "<td>".($j+33)." %</td><td>".price($ht2)."</td>";
|
|
||||||
print "<td>".($j+66)." %</td><td>".price($ht3)."</td></tr>";
|
|
||||||
|
|
||||||
$j++;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
}
|
|
||||||
$db->close();
|
|
||||||
llxFooter("<em>Dernière modification $Date$ révision $Revision$</em>");
|
|
||||||
?>
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004 Éric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 <EFBFBD>ric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@ -22,7 +22,7 @@
|
|||||||
/**
|
/**
|
||||||
\file htdocs/comm/propal/apercu.php
|
\file htdocs/comm/propal/apercu.php
|
||||||
\ingroup propal
|
\ingroup propal
|
||||||
\brief Page de l'onglet aperçu d'une propal
|
\brief Page de l'onglet aper<EFBFBD>u d'une propal
|
||||||
\version $Id$
|
\version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ if ($_GET["propalid"] > 0)
|
|||||||
$soc->fetch($propal->socid);
|
$soc->fetch($propal->socid);
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$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";
|
$relativepath = "${propalref}/${propalref}.pdf";
|
||||||
$relativepathdetail = "${propalref}/${propalref}-detail.pdf";
|
$relativepathdetail = "${propalref}/${propalref}-detail.pdf";
|
||||||
|
|
||||||
// Chemin vers png aperçus
|
// Chemin vers png aper<EFBFBD>us
|
||||||
$relativepathimage = "${propalref}/${propalref}.pdf.png";
|
$relativepathimage = "${propalref}/${propalref}.pdf.png";
|
||||||
$fileimage = $file.".png"; // Si PDF d'1 page
|
$fileimage = $file.".png"; // Si PDF d'1 page
|
||||||
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
$fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page
|
||||||
@ -163,8 +163,8 @@ if ($_GET["propalid"] > 0)
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Si fichier detail PDF existe
|
// Si fichier detail PDF existe
|
||||||
if (file_exists($filedetail)) { // propal détaillée supplémentaire
|
if (file_exists($filedetail)) { // propal d<EFBFBD>taill<EFBFBD>e suppl<70>mentaire
|
||||||
print "<tr $bc[$var]><td>Propal détaillée</td>";
|
print "<tr $bc[$var]><td>Propal d<EFBFBD>taill<EFBFBD>e</td>";
|
||||||
|
|
||||||
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepathdetail).'">'.$propal->ref.'-detail.pdf</a></td>';
|
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=propal&file='.urlencode($relativepathdetail).'">'.$propal->ref.'-detail.pdf</a></td>';
|
||||||
print '<td align="right">'.filesize($filedetail). ' bytes</td>';
|
print '<td align="right">'.filesize($filedetail). ' bytes</td>';
|
||||||
@ -213,17 +213,17 @@ if ($_GET["propalid"] > 0)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Propal non trouvée
|
// Propal non trouv<EFBFBD>e
|
||||||
print $langs->trans("ErrorPropalNotFound",$_GET["propalid"]);
|
print $langs->trans("ErrorPropalNotFound",$_GET["propalid"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si fichier png PDF d'1 page trouvé
|
// Si fichier png PDF d'1 page trouv<EFBFBD>
|
||||||
if (file_exists($fileimage))
|
if (file_exists($fileimage))
|
||||||
{
|
{
|
||||||
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimage).'">';
|
print '<img src="'.DOL_URL_ROOT . '/viewimage.php?modulepart=apercupropal&file='.urlencode($relativepathimage).'">';
|
||||||
}
|
}
|
||||||
// Si fichier png PDF de plus d'1 page trouvé
|
// Si fichier png PDF de plus d'1 page trouv<EFBFBD>
|
||||||
elseif (file_exists($fileimagebis))
|
elseif (file_exists($fileimagebis))
|
||||||
{
|
{
|
||||||
$multiple = $relativepathimage . ".";
|
$multiple = $relativepathimage . ".";
|
||||||
|
|||||||
@ -173,7 +173,7 @@ if ($id > 0)
|
|||||||
|
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$head = propal_prepare_head($propal);
|
||||||
dol_fiche_head($head, 'contact', $langs->trans("Proposal"));
|
dol_fiche_head($head, 'contact', $langs->trans("Proposal"), 0, 'propal');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -125,7 +125,7 @@ if ($propalid > 0)
|
|||||||
$societe->fetch($propal->socid);
|
$societe->fetch($propal->socid);
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$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
|
// Construit liste des fichiers
|
||||||
|
|||||||
@ -41,8 +41,7 @@ $result = restrictedArea($user, 'propale', $propalid, 'propal');
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* View
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
@ -54,7 +53,7 @@ $societe = new Societe($db);
|
|||||||
$societe->fetch($propal->socid);
|
$societe->fetch($propal->socid);
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$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);
|
$propal->info($propal->id);
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if ($_POST["action"] == 'update_public' && $user->rights->propale->creer)
|
|||||||
$propal->fetch($_GET['propalid']);
|
$propal->fetch($_GET['propalid']);
|
||||||
|
|
||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$res=$propal->update_note_public($_POST["note_public"],$user);
|
$res=$propal->update_note_public($_POST["note_public"],$user);
|
||||||
if ($res < 0)
|
if ($res < 0)
|
||||||
{
|
{
|
||||||
@ -97,9 +97,9 @@ $html = new Form($db);
|
|||||||
if ($_GET['propalid'])
|
if ($_GET['propalid'])
|
||||||
{
|
{
|
||||||
if ($mesg) print $mesg;
|
if ($mesg) print $mesg;
|
||||||
|
|
||||||
$now=gmmktime();
|
$now=gmmktime();
|
||||||
|
|
||||||
$propal = new Propal($db);
|
$propal = new Propal($db);
|
||||||
if ( $propal->fetch($_GET['propalid']) )
|
if ( $propal->fetch($_GET['propalid']) )
|
||||||
{
|
{
|
||||||
@ -107,15 +107,15 @@ if ($_GET['propalid'])
|
|||||||
if ( $societe->fetch($propal->socid) )
|
if ( $societe->fetch($propal->socid) )
|
||||||
{
|
{
|
||||||
$head = propal_prepare_head($propal);
|
$head = propal_prepare_head($propal);
|
||||||
dol_fiche_head($head, 'note', $langs->trans('Proposal'));
|
dol_fiche_head($head, 'note', $langs->trans('Proposal'), 0, 'propal');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$propal->ref.'</td></tr>';
|
print '<tr><td width="25%">'.$langs->trans('Ref').'</td><td colspan="3">'.$propal->ref.'</td></tr>';
|
||||||
|
|
||||||
// Societe
|
// Societe
|
||||||
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="3">'.$societe->getNomUrl(1).'</td></tr>';
|
||||||
|
|
||||||
// Ligne info remises tiers
|
// Ligne info remises tiers
|
||||||
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Discounts').'</td><td colspan="3">';
|
||||||
if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client);
|
if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client);
|
||||||
@ -126,13 +126,13 @@ if ($_GET['propalid'])
|
|||||||
else print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
else print $langs->trans("CompanyHasNoAbsoluteDiscount");
|
||||||
print '.';
|
print '.';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans('Date').'</td><td colspan="3">';
|
||||||
print dol_print_date($propal->date,'daytext');
|
print dol_print_date($propal->date,'daytext');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Date fin propal
|
// Date fin propal
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">';
|
print '<td>'.$langs->trans('DateEndPropal').'</td><td colspan="3">';
|
||||||
@ -165,7 +165,7 @@ if ($_GET['propalid'])
|
|||||||
print ($propal->note_public?nl2br($propal->note_public):" ");
|
print ($propal->note_public?nl2br($propal->note_public):" ");
|
||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
|
|
||||||
// Note privee
|
// Note privee
|
||||||
if (! $user->societe_id)
|
if (! $user->societe_id)
|
||||||
{
|
{
|
||||||
@ -186,7 +186,7 @@ if ($_GET['propalid'])
|
|||||||
}
|
}
|
||||||
print "</td></tr>";
|
print "</td></tr>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -147,7 +147,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$societe->fetch($propal->socid);
|
$societe->fetch($propal->socid);
|
||||||
|
|
||||||
$head = propal_prepare_head($propal);
|
$head = propal_prepare_head($propal);
|
||||||
dol_fiche_head($head, 'compta', $langs->trans('Proposal'));
|
dol_fiche_head($head, 'compta', $langs->trans('Proposal'), 0, 'propal');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -48,12 +48,9 @@ $contact = new Contact($db);
|
|||||||
$contact->fetch($_GET["id"], $user);
|
$contact->fetch($_GET["id"], $user);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Affichage onglets
|
|
||||||
*/
|
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|
||||||
dol_fiche_head($head, 'exportimport', $langs->trans("Contact"));
|
dol_fiche_head($head, 'exportimport', $langs->trans("Contact"), 0, 'contact');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -218,7 +218,7 @@ if ($_GET["id"] > 0)
|
|||||||
*/
|
*/
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Contact"));
|
dol_fiche_head($head, 'general', $langs->trans("Contact"), 0, 'contact');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ $contact->fetch($_GET["id"], $user);
|
|||||||
|
|
||||||
$head = contact_prepare_head($contact);
|
$head = contact_prepare_head($contact);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("Contact"));
|
dol_fiche_head($head, 'info', $langs->trans("Contact"), 0, 'contact');
|
||||||
|
|
||||||
|
|
||||||
print '<table width="100%"><tr><td>';
|
print '<table width="100%"><tr><td>';
|
||||||
|
|||||||
@ -52,12 +52,9 @@ $contact = new Contact($db);
|
|||||||
$contact->fetch($_GET["id"], $user);
|
$contact->fetch($_GET["id"], $user);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Affichage onglets
|
|
||||||
*/
|
|
||||||
$head = contact_prepare_head($contact);
|
$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 '</td></tr>';
|
|||||||
// LDAP DN
|
// LDAP DN
|
||||||
print '<tr><td>LDAP '.$langs->trans("LDAPContactDn").'</td><td class="valeur" colspan="3">'.$conf->global->LDAP_CONTACT_DN."</td></tr>\n";
|
print '<tr><td>LDAP '.$langs->trans("LDAPContactDn").'</td><td class="valeur" colspan="3">'.$conf->global->LDAP_CONTACT_DN."</td></tr>\n";
|
||||||
|
|
||||||
// LDAP Clé
|
// LDAP Cl<EFBFBD>
|
||||||
print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur" colspan="3">'.$conf->global->LDAP_KEY_CONTACTS."</td></tr>\n";
|
print '<tr><td>LDAP '.$langs->trans("LDAPNamingAttribute").'</td><td class="valeur" colspan="3">'.$conf->global->LDAP_KEY_CONTACTS."</td></tr>\n";
|
||||||
|
|
||||||
// LDAP Server
|
// LDAP Server
|
||||||
@ -139,7 +136,7 @@ if ($result > 0)
|
|||||||
{
|
{
|
||||||
if (! is_array($records))
|
if (! is_array($records))
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
print '<tr '.$bc[false].'><td colspan="2"><font class="error">'.$langs->trans("ErrorFailedToReadLDAP").'</font></td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,13 +46,13 @@ if ($user->rights->societe->contact->creer)
|
|||||||
{
|
{
|
||||||
$contact = new Contact($db);
|
$contact = new Contact($db);
|
||||||
$contact->fetch($_POST["contactid"]);
|
$contact->fetch($_POST["contactid"]);
|
||||||
|
|
||||||
// Note: Correct date should be completed with location to have exact GM time of birth.
|
// 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 = dol_mktime(0,0,0,$_POST["birthdaymonth"],$_POST["birthdayday"],$_POST["birthdayyear"]);
|
||||||
$contact->birthday_alert = $_POST["birthday_alert"];
|
$contact->birthday_alert = $_POST["birthday_alert"];
|
||||||
|
|
||||||
$result = $contact->update_perso($_POST["contactid"], $user);
|
$result = $contact->update_perso($_POST["contactid"], $user);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
$contact->old_name='';
|
$contact->old_name='';
|
||||||
@ -82,7 +82,7 @@ $contact->fetch($_GET["id"], $user);
|
|||||||
*/
|
*/
|
||||||
$head = contact_prepare_head($contact);
|
$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 '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td colspan="3">';
|
||||||
print $contact->id;
|
print $contact->id;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
print '<tr><td>'.$langs->trans("Lastname").'</td><td>'.$contact->nom.'</td>';
|
print '<tr><td>'.$langs->trans("Lastname").'</td><td>'.$contact->nom.'</td>';
|
||||||
print '<td>'.$langs->trans("Firstname").'</td><td width="25%">'.$contact->prenom.'</td>';
|
print '<td>'.$langs->trans("Firstname").'</td><td width="25%">'.$contact->prenom.'</td>';
|
||||||
@ -122,12 +122,12 @@ if ($_GET["action"] == 'edit')
|
|||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print $contact->getCivilityLabel();
|
print $contact->getCivilityLabel();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date To Birth
|
// Date To Birth
|
||||||
print '<tr><td>'.$langs->trans("DateToBirth").'</td><td>';
|
print '<tr><td>'.$langs->trans("DateToBirth").'</td><td>';
|
||||||
$html=new Form($db);
|
$html=new Form($db);
|
||||||
@ -188,12 +188,12 @@ else
|
|||||||
print $langs->trans("ContactNotLinkedToCompany");
|
print $langs->trans("ContactNotLinkedToCompany");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Civility
|
// Civility
|
||||||
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
print '<tr><td>'.$langs->trans("UserTitle").'</td><td colspan="3">';
|
||||||
print $contact->getCivilityLabel();
|
print $contact->getCivilityLabel();
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Date To Birth
|
// Date To Birth
|
||||||
if ($contact->birthday != '')
|
if ($contact->birthday != '')
|
||||||
{
|
{
|
||||||
@ -218,7 +218,7 @@ else
|
|||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
print '<div class="tabsAction">';
|
print '<div class="tabsAction">';
|
||||||
|
|
||||||
if ($user->rights->societe->contact->creer)
|
if ($user->rights->societe->contact->creer)
|
||||||
{
|
{
|
||||||
print '<a class="butAction" href="perso.php?id='.$_GET["id"].'&action=edit">'.$langs->trans('Modify').'</a>';
|
print '<a class="butAction" href="perso.php?id='.$_GET["id"].'&action=edit">'.$langs->trans('Modify').'</a>';
|
||||||
|
|||||||
@ -2054,7 +2054,7 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='order';
|
$picto='propal';
|
||||||
$label=$langs->trans("ShowPropal").': '.$this->ref;
|
$label=$langs->trans("ShowPropal").': '.$this->ref;
|
||||||
|
|
||||||
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
|
||||||
@ -2180,9 +2180,9 @@ class PropaleLigne
|
|||||||
* \return int <0 si ko, >0 si ok
|
* \return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function insert()
|
function insert()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
dol_syslog("PropaleLigne::insert rang=".$this->rang);
|
dol_syslog("PropaleLigne::insert rang=".$this->rang);
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
@ -2247,7 +2247,7 @@ class PropaleLigne
|
|||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$this->rang=$rangmax;
|
$this->rang=$rangmax;
|
||||||
|
|
||||||
$this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'propaldet');
|
$this->rowid=$this->db->last_insert_id(MAIN_DB_PREFIX.'propaldet');
|
||||||
if (! $notrigger)
|
if (! $notrigger)
|
||||||
{
|
{
|
||||||
@ -2257,8 +2257,8 @@ class PropaleLigne
|
|||||||
$result = $interface->run_triggers('LINEPROPAL_INSERT',$this,$user,$langs,$conf);
|
$result = $interface->run_triggers('LINEPROPAL_INSERT',$this,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |