Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
61b4305949
@ -70,7 +70,7 @@ print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup');
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Member"), 0, 'user');
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
@ -105,7 +105,6 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -124,8 +123,8 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
|
||||
@ -59,7 +59,7 @@ require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Members");
|
||||
$textobject=$langs->transnoentitiesnoconv("MembersTypes");
|
||||
|
||||
$help_url='EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros';
|
||||
llxHeader('',$langs->trans("MembersSetup"),$help_url);
|
||||
@ -71,7 +71,7 @@ print_fiche_titre($langs->trans("MembersSetup"),$linkback,'setup');
|
||||
|
||||
$head = member_admin_prepare_head();
|
||||
|
||||
dol_fiche_head($head, 'attributes_type', $langs->trans("Member"), 0, 'user');
|
||||
dol_fiche_head($head, 'attributes_type', $langs->trans("Members"), 0, 'user');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
@ -106,7 +106,6 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=".$key."\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -125,8 +124,8 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
|
||||
@ -35,6 +35,7 @@ if (!$user->admin)
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("agenda");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
@ -63,8 +64,9 @@ require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Agenda");
|
||||
|
||||
llxHeader();
|
||||
llxHeader('',$langs->trans("AgendaSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
@ -107,7 +109,6 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -126,8 +127,8 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
|
||||
@ -146,7 +146,7 @@ else if ($action == 'setdoc')
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'setmod')
|
||||
else if ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
// par appel methode canBeActivated
|
||||
@ -154,7 +154,7 @@ if ($action == 'setmod')
|
||||
dolibarr_set_const($db, "COMMANDE_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
else if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft = GETPOST("COMMANDE_DRAFT_WATERMARK");
|
||||
$res = dolibarr_set_const($db, "COMMANDE_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||
@ -171,7 +171,7 @@ if ($action == 'set_COMMANDE_DRAFT_WATERMARK')
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'set_COMMANDE_FREE_TEXT')
|
||||
else if ($action == 'set_COMMANDE_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST("COMMANDE_FREE_TEXT"); // No alpha here, we want exact string
|
||||
|
||||
@ -188,6 +188,14 @@ if ($action == 'set_COMMANDE_FREE_TEXT')
|
||||
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
|
||||
}
|
||||
}
|
||||
else if ($action='setModuleOptions') {
|
||||
if (dolibarr_set_const($db, "COMMANDE_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->COMMANDE_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
@ -268,7 +268,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
$var=true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="35%">'.$langs->trans("CompanyInfo").'</td><td>'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("CompanyInfo").'</th><th>'.$langs->trans("Value").'</th></tr>'."\n";
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td class="fieldrequired">'.$langs->trans("CompanyName").'</td><td>';
|
||||
@ -336,7 +336,7 @@ if ($action == 'edit' || $action == 'updateedit')
|
||||
|
||||
// Logo
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
|
||||
print '<tr'.dol_bc($var,'hideonsmartphone').'><td>'.$langs->trans("Logo").' (png,jpg)</td><td>';
|
||||
print '<table width="100%" class="nocellnopadd"><tr class="nocellnopadd"><td valign="middle" class="nocellnopadd">';
|
||||
print '<input type="file" class="flat" name="logo" size="50">';
|
||||
print '</td><td valign="middle" align="right">';
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@ -20,9 +21,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/agenda_extrafields.php
|
||||
* \ingroup agenda
|
||||
* \brief Page to setup extra fields of agenda
|
||||
* \file htdocs/admin/order_extrafields.php
|
||||
* \ingroup order
|
||||
* \brief Page to setup extra fields of order
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
@ -35,6 +36,7 @@ if (!$user->admin)
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("orders");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
@ -63,11 +65,12 @@ require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("Orders");
|
||||
|
||||
llxHeader();
|
||||
llxHeader('',$langs->trans("OrdersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("AgendaSetup"),$linkback,'setup');
|
||||
print_fiche_titre($langs->trans("OrdersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = order_admin_prepare_head(null);
|
||||
@ -107,7 +110,6 @@ foreach($extrafields->attribute_type as $key => $value)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
// $i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
@ -126,8 +128,8 @@ if ($action != 'create' && $action != 'edit')
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
|
||||
@ -152,7 +152,14 @@ else if ($action == 'setmod')
|
||||
|
||||
dolibarr_set_const($db, "PROJECT_ADDON",$value,'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
else if ($action='setModuleOptions') {
|
||||
if (dolibarr_set_const($db, "PROJECT_ADDON_PDF_ODT_PATH",GETPOST('value1'),'chaine',0,'',$conf->entity))
|
||||
{
|
||||
// La constante qui a ete lue en avant du nouveau set
|
||||
// on passe donc par une variable pour avoir un affichage coherent
|
||||
$conf->global->PROJECT_ADDON_PDF_ODT_PATH = GETPOST('value1');
|
||||
}
|
||||
}
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||
|
||||
@ -197,20 +198,9 @@ print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
$h = 0;
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_order.php";
|
||||
$head[$h][1] = $langs->trans("SupplierOrder");
|
||||
$head[$h][2] = 'Order';
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_invoice.php";
|
||||
$head[$h][1] = $langs->trans("SuppliersInvoice");
|
||||
$head[$h][2] = 'Invoice';
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
dol_fiche_head($head, 'invoice', $langs->trans("ModuleSetup"));
|
||||
|
||||
|
||||
// Supplier invoice numbering module
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
|
||||
|
||||
@ -197,21 +198,9 @@ print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
|
||||
print "<br>";
|
||||
|
||||
$h = 0;
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_order.php";
|
||||
$head[$h][1] = $langs->trans("SupplierOrder");
|
||||
$head[$h][2] = 'Order';
|
||||
$hselected=$h;
|
||||
$h++;
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_invoice.php";
|
||||
$head[$h][1] = $langs->trans("SuppliersInvoice");
|
||||
$head[$h][2] = 'Invoice';
|
||||
|
||||
$h++;
|
||||
|
||||
dol_fiche_head($head, $hselected, $langs->trans("ModuleSetup"));
|
||||
dol_fiche_head($head, 'order', $langs->trans("ModuleSetup"));
|
||||
|
||||
|
||||
// Supplier order numbering module
|
||||
|
||||
159
htdocs/admin/supplierorder_extrafields.php
Normal file
159
htdocs/admin/supplierorder_extrafields.php
Normal file
@ -0,0 +1,159 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2012 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/supplierorder_extrafields.php
|
||||
* \ingroup fourn
|
||||
* \brief Page to setup extra fields of supplierorder
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
||||
|
||||
|
||||
if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("orders");
|
||||
|
||||
$extrafields = new ExtraFields($db);
|
||||
$form = new Form($db);
|
||||
|
||||
// List of supported format
|
||||
$tmptype2label=getStaticMember(get_class($extrafields),'type2label');
|
||||
$type2label=array('');
|
||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->trans($val);
|
||||
|
||||
$action=GETPOST('action', 'alpha');
|
||||
$attrname=GETPOST('attrname', 'alpha');
|
||||
$elementtype='commande_fournisseur';
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/admin_extrafields.inc.php';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$textobject=$langs->transnoentitiesnoconv("SupplierOrder");
|
||||
|
||||
llxHeader('',$langs->trans("SuppliersSetup"));
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print_fiche_titre($langs->trans("SuppliersSetup"),$linkback,'setup');
|
||||
print "<br>\n";
|
||||
|
||||
$head = supplierorder_admin_prepare_head(null);
|
||||
|
||||
dol_fiche_head($head, 'attributes', $langs->trans("ModuleSetup"), 0, 'order');
|
||||
|
||||
|
||||
print $langs->trans("DefineHereComplementaryAttributes",$textobject).'<br>'."\n";
|
||||
print '<br>';
|
||||
|
||||
// Load attribute_label
|
||||
$extrafields->fetch_name_optionals_label($elementtype);
|
||||
|
||||
print "<table summary=\"listofattributes\" class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Label").'</td>';
|
||||
print '<td>'.$langs->trans("AttributeCode").'</td>';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Size").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Unique").'</td>';
|
||||
print '<td align="center">'.$langs->trans("Required").'</td>';
|
||||
print '<td width="80"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=True;
|
||||
foreach($extrafields->attribute_type as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
print "<td>".$extrafields->attribute_label[$key]."</td>\n";
|
||||
print "<td>".$key."</td>\n";
|
||||
print "<td>".$type2label[$extrafields->attribute_type[$key]]."</td>\n";
|
||||
print '<td align="right">'.$extrafields->attribute_size[$key]."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_unique[$key])."</td>\n";
|
||||
print '<td align="center">'.yn($extrafields->attribute_required[$key])."</td>\n";
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=edit&attrname='.$key.'">'.img_edit().'</a>';
|
||||
print " <a href=\"".$_SERVER["PHP_SELF"]."?action=delete&attrname=$key\">".img_delete()."</a></td>\n";
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
// Buttons
|
||||
if ($action != 'create' && $action != 'edit')
|
||||
{
|
||||
print '<div class="tabsAction">';
|
||||
print "<a class=\"butAction\" href=\"".$_SERVER["PHP_SELF"]."?action=create\">".$langs->trans("NewAttribute")."</a>";
|
||||
print "</div>";
|
||||
}
|
||||
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Creation d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
if ($action == 'create')
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans('NewAttribute'));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
|
||||
}
|
||||
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* Edition d'un champ optionnel */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
if ($action == 'edit' && ! empty($attrname))
|
||||
{
|
||||
print "<br>";
|
||||
print_titre($langs->trans("FieldEdition", $attrname));
|
||||
|
||||
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
|
||||
}
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
@ -150,7 +150,7 @@ class Commande extends CommonOrder
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db,"Commande::getNextNumRef ".$obj->error);
|
||||
dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@ -419,7 +419,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ' SET fk_statut=1, facture=0';
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
|
||||
dol_syslog("Commande::set_reopen sql=".$sql);
|
||||
dol_syslog(get_class($this)."::set_reopen sql=".$sql);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -530,7 +530,7 @@ class Commande extends CommonOrder
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
$sql.= " AND fk_statut = 1";
|
||||
|
||||
dol_syslog("Commande::cancel sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::cancel sql=".$sql, LOG_DEBUG);
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
// If stock is decremented on validate order, we must reincrement it
|
||||
@ -604,7 +604,7 @@ class Commande extends CommonOrder
|
||||
// Clean parameters
|
||||
$this->brouillon = 1; // On positionne en mode brouillon la commande
|
||||
|
||||
dol_syslog("Commande::create user=".$user->id);
|
||||
dol_syslog(get_class($this)."::create user=".$user->id);
|
||||
|
||||
// Check parameters
|
||||
$soc = new Societe($this->db);
|
||||
@ -612,13 +612,13 @@ class Commande extends CommonOrder
|
||||
if ($result < 0)
|
||||
{
|
||||
$this->error="Failed to fetch company";
|
||||
dol_syslog("Commande::create ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
||||
return -2;
|
||||
}
|
||||
if (! empty($conf->global->COMMANDE_REQUIRE_SOURCE) && $this->source < 0)
|
||||
{
|
||||
$this->error=$langs->trans("ErrorFieldRequired",$langs->trans("Source"));
|
||||
dol_syslog("Commande::create ".$this->error, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -655,7 +655,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ", ".$conf->entity;
|
||||
$sql.= ")";
|
||||
|
||||
dol_syslog("Commande::create sql=".$sql);
|
||||
dol_syslog(get_class($this)."::create sql=".$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1460,7 +1460,7 @@ class Commande extends CommonOrder
|
||||
if ($only_product) $sql .= ' AND p.fk_product_type = 0';
|
||||
$sql .= ' ORDER BY l.rang';
|
||||
|
||||
dol_syslog("Commande::fetch_lines sql=".$sql,LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch_lines sql=".$sql,LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -1587,7 +1587,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ' GROUP BY cd.rowid, cd.fk_product';
|
||||
//print $sql;
|
||||
|
||||
dol_syslog("Commande::loadExpeditions sql=".$sql,LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::loadExpeditions sql=".$sql,LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
@ -1605,7 +1605,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
dol_syslog("Commande::loadExpeditions ".$this->error,LOG_ERR);
|
||||
dol_syslog(get_class($this)."::loadExpeditions ".$this->error,LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1820,7 +1820,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ' SET remise_absolue = '.$remise;
|
||||
$sql.= ' WHERE rowid = '.$this->id.' AND fk_statut = 0 ;';
|
||||
|
||||
dol_syslog("Commande::set_remise_absolue sql=$sql");
|
||||
dol_syslog(get_class($this)."::set_remise_absolue sql=$sql");
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
@ -1852,7 +1852,7 @@ class Commande extends CommonOrder
|
||||
$sql.= " SET date_commande = ".($date ? $this->db->idate($date) : 'null');
|
||||
$sql.= " WHERE rowid = ".$this->id." AND fk_statut = 0";
|
||||
|
||||
dol_syslog("Commande::set_date sql=$sql",LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::set_date sql=$sql",LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1862,7 +1862,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("Commande::set_date ".$this->error,LOG_ERR);
|
||||
dol_syslog(get_class($this)."::set_date ".$this->error,LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -1887,7 +1887,7 @@ class Commande extends CommonOrder
|
||||
$sql.= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null');
|
||||
$sql.= " WHERE rowid = ".$this->id;
|
||||
|
||||
dol_syslog("Commande::set_date_livraison sql=".$sql,LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::set_date_livraison sql=".$sql,LOG_DEBUG);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1897,7 +1897,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("Commande::set_date_livraison ".$this->error,LOG_ERR);
|
||||
dol_syslog(get_class($this)."::set_date_livraison ".$this->error,LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -1930,7 +1930,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("Commande::set_availability Erreur SQL");
|
||||
dol_syslog(get_class($this)."::set_availability Erreur SQL");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -1959,7 +1959,7 @@ class Commande extends CommonOrder
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dol_syslog("Commande::set_demand_reason Erreur SQL");
|
||||
dol_syslog(get_class($this)."::set_demand_reason Erreur SQL");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -660,7 +660,7 @@ class Form
|
||||
*
|
||||
* @param string $selected Preselected type
|
||||
* @param string $htmlname Name of field in form
|
||||
* @param string $filter Optionnal filters criteras
|
||||
* @param string $filter Optionnal filters criteras (example: 's.rowid <> x')
|
||||
* @param int $showempty Add an empty field
|
||||
* @param int $showtype Show third party type in combolist (customer, prospect or supplier)
|
||||
* @param int $forcecombo Force to use combo box
|
||||
|
||||
@ -148,14 +148,6 @@ function societe_prepare_head2($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
|
||||
{
|
||||
$head[$h][0] = 'lien.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("ParentCompany");
|
||||
$head[$h][2] = 'links';
|
||||
$h++;
|
||||
}
|
||||
|
||||
$head[$h][0] = 'commerciaux.php?socid='.$object->id;
|
||||
$head[$h][1] = $langs->trans("SalesRepresentative");
|
||||
$head[$h][2] = 'salesrepresentative';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2006 Marc Barilley <marc@ocebo.com>
|
||||
* Copyright (C) 2011-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
*
|
||||
* 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
|
||||
@ -148,5 +149,42 @@ function ordersupplier_prepare_head($object)
|
||||
return $head;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array head with list of tabs to view object informations.
|
||||
*
|
||||
* @param Object $object order
|
||||
* @return array head array with tabs
|
||||
*/
|
||||
function supplierorder_admin_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_order.php";
|
||||
$head[$h][1] = $langs->trans("SupplierOrder");
|
||||
$head[$h][2] = 'order';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplierorder_admin');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/supplierorder_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsSupplierOrders");
|
||||
$head[$h][2] = 'attributes';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplierorder_admin');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT."/admin/supplier_invoice.php";
|
||||
$head[$h][1] = $langs->trans("SuppliersInvoice");
|
||||
$head[$h][2] = 'invoice';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplierorder_admin','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@ -671,6 +671,21 @@ function dol_get_fiche_end($notab=0)
|
||||
else return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return string to add class property on html element with pair/impair.
|
||||
*
|
||||
* @param string $var 0 or 1
|
||||
* @param string $moreclass More class to add
|
||||
* @return string String to add class onto HTML element
|
||||
*/
|
||||
function dol_bc($var,$moreclass='')
|
||||
{
|
||||
global $bc;
|
||||
$ret=' '.$bc[$var];
|
||||
if ($moreclass) $ret=preg_replace('/class=\"/','class="'.$moreclass.' ',$ret);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a formated address (part address/zip/town/state) according to country rules
|
||||
*
|
||||
|
||||
@ -122,7 +122,7 @@ function order_admin_prepare_head($object)
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/order.php';
|
||||
$head[$h][0] = DOL_URL_ROOT.'/admin/commande.php';
|
||||
$head[$h][1] = $langs->trans("Miscellaneous");
|
||||
$head[$h][2] = 'general';
|
||||
$h++;
|
||||
|
||||
@ -89,7 +89,7 @@ class modProjet extends DolibarrModules
|
||||
$r++;
|
||||
$this->const[$r][0] = "PROJECT_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/project";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT/doctemplates/projects";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2010-2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -914,7 +914,7 @@ class CommandeFournisseur extends CommonOrder
|
||||
*/
|
||||
function create($user, $notrigger=0)
|
||||
{
|
||||
global $langs,$conf;
|
||||
global $langs,$conf,$hookmanager;
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -1001,7 +1001,28 @@ class CommandeFournisseur extends CommonOrder
|
||||
// On logue creation pour historique
|
||||
$this->log($user, 0, time());
|
||||
|
||||
if (! $notrigger)
|
||||
if (! $error)
|
||||
{
|
||||
// Actions on extra fields (by external module or standard code)
|
||||
// FIXME le hook fait double emploi avec le trigger !!
|
||||
$hookmanager->initHooks(array('supplierorderdao'));
|
||||
$parameters=array('socid'=>$this->id);
|
||||
$reshook=$hookmanager->executeHooks('insertExtraFields',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook))
|
||||
{
|
||||
if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used
|
||||
{
|
||||
$result=$this->insertExtraFields();
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ($reshook < 0) $error++;
|
||||
}
|
||||
|
||||
if (! $notrigger)
|
||||
{
|
||||
// Appel des triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
|
||||
@ -883,7 +883,7 @@ LogEventDesc=You can enable here the logging for Dolibarr security events. Admin
|
||||
AreaForAdminOnly=Those features can be used by <b>administrator users</b> only.
|
||||
SystemInfoDesc=System information is miscellaneous technical information you get in read only mode and visible for administrators only.
|
||||
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
|
||||
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this click, on "Modify" button at bottom of page)
|
||||
CompanyFundationDesc=Edit on this page all known information of the company or foundation you need to manage (For this, click on "Modify" button at bottom of page)
|
||||
DisplayDesc=You can choose each parameter related to the Dolibarr look and feel here
|
||||
AvailableModules=Available modules
|
||||
ToActivateModule=To activate modules, go on setup Area (Home->Setup->Modules).
|
||||
|
||||
@ -953,6 +953,7 @@ ExtraFieldsContacts=Attributs supplémentaires (contacts/adresses)
|
||||
ExtraFieldsMember=Attributs supplémentaires (adhérents)
|
||||
ExtraFieldsMemberType=Attributs supplémentaires (type d'adhérents)
|
||||
ExtraFieldsCustomerInvoices=Attributs supplémentaires (factures clients)
|
||||
ExtraFieldsSupplierOrders=Attributs supplémentaires (commandes fournisseurs)
|
||||
ExtraFieldHasWrongValue=L'attribut %s a une valeur incorrecte.
|
||||
AlphaNumOnlyCharsAndNoSpace=uniquement caractères alphanumériques sans espace
|
||||
SendingMailSetup=Configuration de l'envoi par mail
|
||||
|
||||
@ -195,11 +195,7 @@ for ($i=1; $i<=4; $i++) {
|
||||
<tr>
|
||||
<td><?php echo $langs->trans('ParentCompany'); ?></td>
|
||||
<td align="right">
|
||||
<?php if ($user->rights->societe->creer) { ?>
|
||||
<a href="<?php echo DOL_URL_ROOT.'/societe/lien.php?socid='.$this->control->tpl['id']; ?>"><?php echo $this->control->tpl['image_edit']; ?></a>
|
||||
<?php } else { ?>
|
||||
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -129,6 +129,7 @@ class Societe extends CommonObject
|
||||
var $date_update;
|
||||
|
||||
var $commercial_id; // Id of sales representative to link (used for thirdparty creation). Not filled by a fetch, because we can have several sales representatives.
|
||||
var $parent;
|
||||
var $default_lang;
|
||||
|
||||
var $ref_int;
|
||||
@ -1975,53 +1976,30 @@ class Societe extends CommonObject
|
||||
}
|
||||
|
||||
/**
|
||||
* Defini la societe mere pour les filiales
|
||||
* Define parent commany of current company
|
||||
*
|
||||
* @param int $id id compagnie mere a positionner
|
||||
* @param int $id Id of thirdparty to set or '' to remove
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
function set_parent($id)
|
||||
{
|
||||
if ($this->id)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe ";
|
||||
$sql .= " SET parent = ".$id;
|
||||
$sql .= " WHERE rowid = " . $this->id .";";
|
||||
|
||||
if ( $this->db->query($sql) )
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe";
|
||||
$sql.= " SET parent = ".($id > 0 ? $id : "null");
|
||||
$sql.= " WHERE rowid = " . $this->id;
|
||||
dol_syslog(get_class($this).'::set_parent sql='.$sql);
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Supprime la societe mere
|
||||
*
|
||||
* @param int $id id compagnie mere a effacer
|
||||
* @return int <0 if KO, >0 if KO
|
||||
*/
|
||||
function remove_parent($id)
|
||||
{
|
||||
if ($this->id)
|
||||
{
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."societe ";
|
||||
$sql .= " SET parent = null";
|
||||
$sql .= " WHERE rowid = " . $this->id .";";
|
||||
|
||||
if ( $this->db->query($sql) )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
else return -1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -1,337 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/societe/lien.php
|
||||
* \ingroup societe
|
||||
* \brief Page of links to other third parties
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("customers");
|
||||
$langs->load("suppliers");
|
||||
$langs->load("banks");
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid','int');
|
||||
if ($user->societe_id) $socid=$user->societe_id;
|
||||
$result = restrictedArea($user, 'societe','','');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Positionne companie parente
|
||||
if ($socid && $_GET["select"])
|
||||
{
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->id = $_GET["socid"];
|
||||
$soc->fetch($_GET["socid"]);
|
||||
$soc->set_parent($_GET["select"]);
|
||||
|
||||
header("Location: lien.php?socid=".$soc->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: lien.php?socid=".$_GET["socid"]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
// Supprime companie parente
|
||||
if ($socid && $_GET["delsocid"])
|
||||
{
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$soc = new Societe($db);
|
||||
$soc->id = $_GET["socid"];
|
||||
$soc->fetch($_GET["socid"]);
|
||||
$soc->remove_parent($_GET["delsocid"]);
|
||||
|
||||
header("Location: lien.php?socid=".$soc->id);
|
||||
exit;
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: lien.php?socid=".$_GET["socid"]);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
|
||||
llxHeader('',$langs->trans("ThirdParty"),$help_url);
|
||||
|
||||
$form = new Form($db);
|
||||
$formcompany = new FormCompany($db);
|
||||
|
||||
if ($socid)
|
||||
{
|
||||
|
||||
$soc = new Societe($db);
|
||||
$soc->fetch($socid);
|
||||
|
||||
$head=societe_prepare_head2($soc);
|
||||
|
||||
dol_fiche_head($head, 'links', $langs->trans("ThirdParty"),0,'company');
|
||||
|
||||
/*
|
||||
* Fiche societe en mode visu
|
||||
*/
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans('ThirdPartyName').'</td>';
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($soc,'socid','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans('CustomerCode').'</td><td'.(empty($conf->global->SOCIETE_USEPREFIX)?' colspan="3"':'').'>';
|
||||
print $soc->code_client;
|
||||
if ($soc->check_codeclient() <> 0) print ' '.$langs->trans("WrongCustomerCode");
|
||||
print '</td>';
|
||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||
{
|
||||
print '<td>'.$langs->trans('Prefix').'</td><td>'.$soc->prefix_comm.'</td>';
|
||||
}
|
||||
print '</tr>';
|
||||
|
||||
print "<tr><td valign=\"top\">".$langs->trans('Address')."</td><td colspan=\"3\">".nl2br($soc->address)."</td></tr>";
|
||||
|
||||
print "<tr><td>".$langs->trans('Zip').'</td><td width="20%">'.$soc->zip."</td>";
|
||||
print "<td>".$langs->trans('Town')."</td><td>".$soc->town."</td></tr>";
|
||||
|
||||
print "<tr><td>".$langs->trans('Country')."</td><td colspan=\"3\">".$soc->country."</td></tr>";
|
||||
|
||||
print '<tr><td>'.$langs->trans('Phone').'</td><td>'.dol_print_phone($soc->tel,$soc->country_code,0,$soc->id,'AC_TEL').'</td>';
|
||||
print '<td>'.$langs->trans('Fax').'</td><td>'.dol_print_phone($soc->fax,$soc->country_code,0,$soc->id,'AC_FAX').'</td></tr>';
|
||||
|
||||
print '<tr><td>'.$langs->trans('Web').'</td><td colspan="3">';
|
||||
if ($soc->url) { print '<a href="http://'.$soc->url.'">http://'.$soc->url.'</a>'; }
|
||||
print '</td></tr>';
|
||||
|
||||
$object=$soc;
|
||||
print '<tr>';
|
||||
// IdProf1 (SIREN for France)
|
||||
$idprof=$langs->transcountry('ProfId1',$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
print $formcompany->get_input_id_prof(1,'idprof1',$object->idprof1,$object->country_code);
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td><td> </td>';
|
||||
// IdProf2 (SIRET for France)
|
||||
$idprof=$langs->transcountry('ProfId2',$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
print $formcompany->get_input_id_prof(2,'idprof2',$object->idprof2,$object->paycountry_codes_code);
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td><td> </td>';
|
||||
print '</tr>';
|
||||
print '<tr>';
|
||||
// IdProf3 (APE for France)
|
||||
$idprof=$langs->transcountry('ProfId3',$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
print $formcompany->get_input_id_prof(3,'idprof3',$object->idprof3,$object->country_code);
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td><td> </td>';
|
||||
// IdProf4 (NU for France)
|
||||
$idprof=$langs->transcountry('ProfId4',$object->country_code);
|
||||
if ($idprof!='-')
|
||||
{
|
||||
print '<td>'.$idprof.'</td><td>';
|
||||
print $formcompany->get_input_id_prof(4,'idprof4',$object->idprof4,$object->country_code);
|
||||
print '</td>';
|
||||
}
|
||||
else print '<td> </td><td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
// Capital
|
||||
print '<tr><td>'.$langs->trans("Capital").'</td><td colspan="3">'.$soc->capital.' '.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
|
||||
// Societe mere
|
||||
print '<tr><td>'.$langs->trans("ParentCompany").'</td><td colspan="3">';
|
||||
if ($soc->parent)
|
||||
{
|
||||
$socm = new Societe($db);
|
||||
$socm->fetch($soc->parent);
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$socm->id.'">'.img_object($langs->trans("ShowCompany"),'company').' '.$socm->nom.'</a>'.($socm->code_client?" (".$socm->code_client.")":"");
|
||||
print ($socm->town?' - '.$socm->town:'');
|
||||
print ' <a href="'.$_SERVER["PHP_SELF"].'?socid='.$_GET["socid"].'&delsocid='.$socm->id.'">';
|
||||
print img_delete();
|
||||
print '</a><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("NoParentCompany");
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print "</div>\n";
|
||||
|
||||
|
||||
if ($_GET["select"] > 0)
|
||||
{
|
||||
$socm = new Societe($db);
|
||||
$socm->id = $_GET["select"];
|
||||
$socm->fetch($_GET["select"]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($user->rights->societe->creer)
|
||||
{
|
||||
$page=$_GET["page"];
|
||||
|
||||
if ($page == -1) { $page = 0 ; }
|
||||
|
||||
$offset = $conf->liste_limit * $page ;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
||||
/*
|
||||
* Liste
|
||||
*
|
||||
*/
|
||||
|
||||
$title=$langs->trans("CompanyList");
|
||||
|
||||
$sql = "SELECT s.rowid as socid, s.nom, s.town, s.prefix_comm, s.client, s.fournisseur,";
|
||||
$sql.= " te.code, te.libelle";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."c_typent as te";
|
||||
if (! $user->rights->societe->client->voir) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
$sql.= " WHERE s.fk_typent = te.id";
|
||||
$sql.= " AND s.entity IN (".getEntity('societe', 1).")";
|
||||
if (! $user->rights->societe->client->voir) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
if (dol_strlen(trim($_GET["search_nom"]))) $sql.= " AND s.nom LIKE '%".$_GET["search_nom"]."%'";
|
||||
$sql.= $db->order("s.nom","ASC");
|
||||
$sql.= $db->plimit($conf->liste_limit+1, $offset);
|
||||
|
||||
$resql = $db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$params = "&socid=".$_GET["socid"];
|
||||
|
||||
print_barre_liste($title, $page, "lien.php",$params,$sortfield,$sortorder,'',$num,0,'');
|
||||
|
||||
// Lignes des titres
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Company").'</td>';
|
||||
print '<td>'.$langs->trans("Town").'</td>';
|
||||
print '<td>'.$langs->trans("ThirdPartyType").'<td>';
|
||||
print '<td colspan="2" align="center"> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<form action="lien.php" method="GET" >';
|
||||
print '<input type="hidden" name="socid" value="'.$_GET["socid"].'">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td valign="right">';
|
||||
print '<input type="text" name="search_nom" value="'.$_GET["search_nom"].'">';
|
||||
print '</td><td colspan="5" align="right">';
|
||||
print '<input type="image" name="button_search" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
print '</form>';
|
||||
|
||||
$var=True;
|
||||
|
||||
while ($i < min($num,$conf->liste_limit))
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]><td>";
|
||||
print $obj->nom."</td>\n";
|
||||
print "<td>".$obj->town." </td>\n";
|
||||
print "<td>".$langs->getLabelFromKey($db,$obj->code,'c_typent','code','libelle')."</td>\n";
|
||||
print '<td align="center">';
|
||||
if ($obj->client==1)
|
||||
{
|
||||
print $langs->trans("Customer")."\n";
|
||||
}
|
||||
elseif ($obj->client==2)
|
||||
{
|
||||
print $langs->trans("Prospect")."\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
print "</td><td align=\"center\">";
|
||||
if ($obj->fournisseur)
|
||||
{
|
||||
print $langs->trans("Supplier");
|
||||
}
|
||||
else
|
||||
{
|
||||
print " ";
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
// Lien S<>lectionner
|
||||
print '<td align="center"><a href="lien.php?socid='.$_GET["socid"].'&select='.$obj->socid.'">'.$langs->trans("Select").'</a>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>'."\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '<br>';
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
?>
|
||||
@ -442,6 +442,11 @@ if (empty($reshook))
|
||||
}
|
||||
}
|
||||
|
||||
// Set parent company
|
||||
if ($action == 'set_thirdparty' && $user->rights->societe->creer)
|
||||
{
|
||||
$result = $object->set_parent(GETPOST('editparentcompany','int'));
|
||||
}
|
||||
|
||||
/*
|
||||
* Generate document
|
||||
@ -515,7 +520,6 @@ $formcompany = new FormCompany($db);
|
||||
|
||||
$countrynotdefined=$langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
|
||||
|
||||
|
||||
if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
||||
{
|
||||
// -----------------------------------------
|
||||
@ -1724,28 +1728,24 @@ else
|
||||
// Parent company
|
||||
if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY))
|
||||
{
|
||||
print '<tr><td>';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('ParentCompany');
|
||||
print '<td><td align="right">';
|
||||
if ($user->rights->societe->creer)
|
||||
print '<a href="'.DOL_URL_ROOT.'/societe/lien.php?socid='.$object->id.'">'.img_edit() .'</a>';
|
||||
else
|
||||
print ' ';
|
||||
print '</td></tr></table>';
|
||||
print '</td>';
|
||||
print '<td colspan="3">';
|
||||
if ($object->parent)
|
||||
{
|
||||
$socm = new Societe($db);
|
||||
$socm->fetch($object->parent);
|
||||
print $socm->getNomUrl(1).' '.($socm->code_client?"(".$socm->code_client.")":"");
|
||||
print $socm->town?' - '.$socm->town:'';
|
||||
}
|
||||
else {
|
||||
print $langs->trans("NoParentCompany");
|
||||
}
|
||||
print '</td></tr>';
|
||||
// Payment term
|
||||
print '<tr><td>';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||
print $langs->trans('ParentCompany');
|
||||
print '</td>';
|
||||
if ($action != 'editparentcompany') print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editparentcompany&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
print '</td><td colspan="3">';
|
||||
if ($action == 'editparentcompany')
|
||||
{
|
||||
$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->parent,'editparentcompany','s.rowid <> '.$object->id,1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id,$object->parent,'none','s.rowid <> '.$object->id,1);
|
||||
}
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
// Sales representative
|
||||
|
||||
@ -1,214 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
<html>
|
||||
|
||||
<?php
|
||||
print '<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
||||
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||
// CSS forced by modules (relative url starting with /)
|
||||
if (isset($conf->modules_parts['css']))
|
||||
{
|
||||
$arraycss=(array) $conf->modules_parts['css'];
|
||||
foreach($arraycss as $modcss => $filescss)
|
||||
{
|
||||
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||
foreach($filescss as $cssfile)
|
||||
{
|
||||
// cssfile is a relative path
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// JQuery. Must be before other includes
|
||||
$ext='.js';
|
||||
print '<!-- Includes JS for JQuery -->'."\n";
|
||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min'.$ext.'"></script>'."\n";
|
||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/dst.js"></script>'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />
|
||||
<style type="text/css">
|
||||
<!--
|
||||
#login {
|
||||
margin-top: 70px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.login_table {
|
||||
width: 512px;
|
||||
border: 1px solid #C0C0C0;
|
||||
background: #F0F0F0 url('.$login_background.') repeat-x;
|
||||
}
|
||||
-->
|
||||
</style>'."\n";
|
||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||
</head>';
|
||||
|
||||
?>
|
||||
|
||||
<body class="body">
|
||||
|
||||
<!-- Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
// Set focus on correct field
|
||||
<?php if ($focus_element) { ?>$('#<?php echo $focus_element; ?>').focus(); <?php } ?> // Warning to use this only on visible element
|
||||
});
|
||||
</script>
|
||||
|
||||
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>" />
|
||||
<input type="hidden" name="loginfunction" value="loginfunction" />
|
||||
<!-- Add fields to send local user information -->
|
||||
<input type="hidden" name="tz" id="tz" value="" />
|
||||
<input type="hidden" name="tz_string" id="tz_string" value="" />
|
||||
<input type="hidden" name="dst_observed" id="dst_observed" value="" />
|
||||
<input type="hidden" name="dst_first" id="dst_first" value="" />
|
||||
<input type="hidden" name="dst_second" id="dst_second" value="" />
|
||||
<input type="hidden" name="screenwidth" id="screenwidth" value="" />
|
||||
<input type="hidden" name="screenheight" id="screenheight" value="" />
|
||||
<input type="hidden" name="dol_hide_topmenu" id="dol_hide_topmenu" value="" />
|
||||
<input type="hidden" name="dol_hide_leftmenu" id="dol_hide_leftmenu" value="" />
|
||||
<input type="hidden" name="dol_optimize_smallscreen" id="dol_optimize_smallscreen" value="<?php echo $dol_optimize_smallscreen; ?>" />
|
||||
<input type="hidden" name="dol_no_mouse_hover" id="dol_no_mouse_over" value="<?php echo $dol_no_mouse_hover; ?>" />
|
||||
<input type="hidden" name="dol_use_jmobile" id="dol_use_jmobile" value="<?php echo $dol_use_jmobile; ?>" />
|
||||
|
||||
<div id="infoVersion"><?php echo $title; ?></div>
|
||||
|
||||
<div id="logoBox">
|
||||
<img alt="Logo" title="" src="<?php echo $urllogo; ?>" />
|
||||
</div>
|
||||
|
||||
<div id="parameterBox">
|
||||
|
||||
<div id="logBox"><strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong><input type="text" id="username" name="username" class="flat" size="15" maxlength="40" value="<?php echo dol_escape_htmltag($login); ?>" tabindex="1" /></div>
|
||||
<div id="passBox"><strong><label for="password"><?php echo $langs->trans('Password'); ?></label></strong><input id="password" name="password" class="flat" type="password" size="15" maxlength="30" value="<?php echo dol_escape_htmltag($password); ?>" tabindex="2" /></div>
|
||||
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
{
|
||||
if ($format == 'div') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<div class="captchaBox">
|
||||
<strong><label><?php echo $langs->trans('SecurityCode'); ?></label></strong>
|
||||
<input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="4" />
|
||||
</div>
|
||||
<div class="captchaImg">
|
||||
<img src="<?php echo DOL_URL_ROOT ?>/core/antispamimage.php" border="0" width="80" height="32" id="captcha" />
|
||||
<a href="<?php echo $php_self; ?>"><?php echo $captcha_refresh; ?></a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div id="connectionLine">
|
||||
<input type="submit" class="button" value=" <?php echo $langs->trans('Connection'); ?> " tabindex="5" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if ($forgetpasslink || $helpcenterlink) {
|
||||
echo '<div class="other">';
|
||||
if ($forgetpasslink) {
|
||||
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/user/passwordforgotten.php">(';
|
||||
echo $langs->trans('PasswordForgotten');
|
||||
if (! $helpcenterlink) {
|
||||
echo ')';
|
||||
}
|
||||
echo '</a>';
|
||||
}
|
||||
|
||||
if ($helpcenterlink) {
|
||||
echo '<a style="color: #888888; font-size: 10px" href="'.DOL_URL_ROOT.'/support/index.php" target="_blank">';
|
||||
if ($forgetpasslink) {
|
||||
echo ' - ';
|
||||
} else {
|
||||
echo '(';
|
||||
}
|
||||
echo $langs->trans('NeedHelpCenter').')</a>';
|
||||
}
|
||||
echo '</div>';
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php if ($main_home) { ?>
|
||||
<div id="infoLogin">
|
||||
<?php echo $main_home; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($_SESSION['dol_loginmesg']) { ?>
|
||||
<div class="error">
|
||||
<?php echo $_SESSION['dol_loginmesg']; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
||||
{
|
||||
?>
|
||||
<div align="center">
|
||||
<script type="text/javascript"><!--
|
||||
google_ad_client = "<?php echo $conf->global->MAIN_GOOGLE_AD_CLIENT ?>";
|
||||
google_ad_slot = "<?php echo $conf->global->MAIN_GOOGLE_AD_SLOT ?>";
|
||||
google_ad_width = <?php echo $conf->global->MAIN_GOOGLE_AD_WIDTH ?>;
|
||||
google_ad_height = <?php echo $conf->global->MAIN_GOOGLE_AD_HEIGHT ?>;
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
|
||||
</script>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- authentication mode = <?php echo $main_authentication ?> -->
|
||||
<!-- cookie name used for this session = <?php echo $session_name ?> -->
|
||||
<!-- urlfrom in this session = <?php echo $_SESSION["urlfrom"] ?> -->
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@ -1,144 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
header('Cache-Control: Public, must-revalidate');
|
||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||
|
||||
?>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<!-- BEGIN PHP TEMPLATE -->
|
||||
<html>
|
||||
|
||||
<?php
|
||||
print '<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>
|
||||
<title>'.$langs->trans('Login').' '.$title.'</title>'."\n";
|
||||
print '<!-- Includes for JQuery (Ajax library) -->'."\n";
|
||||
if (constant('JS_JQUERY_UI')) print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css" />'."\n"; // JQuery
|
||||
else print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui-latest.custom.css" />'."\n"; // JQuery
|
||||
// CSS forced by modules (relative url starting with /)
|
||||
if (isset($conf->modules_parts['css']))
|
||||
{
|
||||
$arraycss=(array) $conf->modules_parts['css'];
|
||||
foreach($arraycss as $modcss => $filescss)
|
||||
{
|
||||
$filescss=(array) $filescss; // To be sure filecss is an array
|
||||
foreach($filescss as $cssfile)
|
||||
{
|
||||
// cssfile is a relative path
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.dol_buildpath($cssfile,1);
|
||||
// We add params only if page is not static, because some web server setup does not return content type text/css if url has parameters, so browser cache is not used.
|
||||
if (!preg_match('/\.css$/i',$cssfile)) print $themeparam;
|
||||
print '"><!-- Added by module '.$modcss. '-->'."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
// JQuery. Must be before other includes
|
||||
$ext='.js';
|
||||
print '<!-- Includes JS for JQuery -->'."\n";
|
||||
if (constant('JS_JQUERY')) print '<script type="text/javascript" src="'.JS_JQUERY.'jquery.min'.$ext.'"></script>'."\n";
|
||||
else print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-latest.min'.$ext.'"></script>'."\n";
|
||||
print '<link rel="stylesheet" type="text/css" href="'.dol_escape_htmltag($conf_css).'" />'."\n";
|
||||
if (! empty($conf->global->MAIN_HTML_HEADER)) print $conf->global->MAIN_HTML_HEADER;
|
||||
print '<!-- HTTP_USER_AGENT = '.$_SERVER['HTTP_USER_AGENT'].' -->
|
||||
</head>';
|
||||
|
||||
?>
|
||||
|
||||
<body class="body">
|
||||
<form id="login" name="login" method="post" action="<?php echo $php_self; ?>">
|
||||
<input type="hidden" name="token" value="<?php echo $_SESSION['newtoken']; ?>">
|
||||
<input type="hidden" name="action" value="buildnewpassword">
|
||||
|
||||
<div id="infoVersion"><?php echo $title; ?></div>
|
||||
|
||||
<div id="logoBox">
|
||||
<img alt="Logo" title="" src="<?php echo $urllogo; ?>" />
|
||||
</div>
|
||||
|
||||
<div id="parameterBox">
|
||||
<div id="logBox">
|
||||
<strong><label for="username"><?php echo $langs->trans('Login'); ?></label></strong>
|
||||
<input type="text" <?php echo $disabled; ?> id="username" name="username" class="flat" size="15" maxlength="25" value="<?php echo $login; ?>" tabindex="1" />
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
{
|
||||
if ($format == 'div') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php if ($captcha) { ?>
|
||||
<div class="captchaBox">
|
||||
<strong><label><?php echo $langs->trans('SecurityCode'); ?></label></strong>
|
||||
<input id="securitycode" class="flat" type="text" size="6" maxlength="5" name="code" tabindex="3">
|
||||
</div>
|
||||
<div class="captchaImg">
|
||||
<img src="<?php echo $dol_url_root.'/core/antispamimage.php'; ?>" border="0" width="80" height="32" id="captcha">
|
||||
<a href="<?php echo $php_self; ?>"><?php echo $captcha_refresh; ?></a>
|
||||
</div>
|
||||
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<div id="connectionLine">
|
||||
<input id="password" type="submit" <?php echo $disabled; ?> class="button" name="password" value="<?php echo $langs->trans('SendNewPassword'); ?>" tabindex="4" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
<div class="other">
|
||||
<?php if ($mode == 'dolibarr' || ! $disabled) { ?>
|
||||
<font style="font-size: 12px;">
|
||||
<?php echo $langs->trans('SendNewPasswordDesc'); ?>
|
||||
</font>
|
||||
<?php }else{ ?>
|
||||
<div class="warning" align="center">
|
||||
<?php echo $langs->trans('AuthenticationDoesNotAllowSendNewPassword', $mode); ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<?php if ($message) { ?>
|
||||
<div class="other">
|
||||
<?php echo $message; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="other">
|
||||
<a href="<?php echo $dol_url_root; ?>/">
|
||||
<?php echo $langs->trans('BackToLoginPage'); ?>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<!-- END PHP TEMPLATE -->
|
||||
@ -346,6 +346,7 @@ th .button {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* Styles to hide objects */
|
||||
/* ============================================================================== */
|
||||
@ -1633,29 +1634,25 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
white-space: nowrap;
|
||||
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
|
||||
text-align: <?php echo $left; ?>;
|
||||
}
|
||||
tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre
|
||||
{
|
||||
/*border-top: 1px solid #DDDDDD;*/
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
white-space: nowrap;
|
||||
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
|
||||
}
|
||||
tr.liste_titre_sel th, th.liste_titre_sel, tr.liste_titre_sel td, td.liste_titre_sel
|
||||
{
|
||||
/* color: #FFFFFF !important; */
|
||||
font-family: <?php print $fontlist ?>;
|
||||
font-weight: normal;
|
||||
border-bottom: 1px solid #FDFFFF;
|
||||
white-space: nowrap;
|
||||
white-space: <?php echo $dol_optimize_smallscreen?'normal':'nowrap'; ?>;
|
||||
text-decoration: underline;
|
||||
}
|
||||
input.liste_titre {
|
||||
/*background: #7699A9;*/
|
||||
/*background-repeat: repeat-x;*/
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
@ -116,19 +116,26 @@ print "----- Options:\n";
|
||||
print "commitiferror=".$forcecommit."\n";
|
||||
print "Mapped LDAP fields=".join(',',$required_fields)."\n";
|
||||
print "\n";
|
||||
|
||||
// Check parameters
|
||||
if (empty($conf->global->LDAP_MEMBER_DN))
|
||||
{
|
||||
print $langs->trans("Error").': '.$langs->trans("LDAP setup for members not defined inside Dolibarr")."\n";
|
||||
exit(1);
|
||||
}
|
||||
if ($typeid <= 0)
|
||||
{
|
||||
print $langs->trans("Error").': Parameter id_member_type is not a valid ref of an existing member type'."\n";
|
||||
exit(2);
|
||||
}
|
||||
|
||||
|
||||
print "Press a key to confirm...";
|
||||
$input = trim(fgets(STDIN));
|
||||
print "Hit Enter to continue or CTRL+C to stop...\n";
|
||||
$input = trim(fgets(STDIN));
|
||||
|
||||
|
||||
if (empty($conf->global->LDAP_MEMBER_DN))
|
||||
{
|
||||
print $langs->trans("Error").': '.$langs->trans("LDAP setup for members not defined inside Dolibarr");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
// Charge tableau de correspondance des pays
|
||||
$hashlib2rowid=array();
|
||||
$countries=array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user