commit
898a3891e8
@ -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')
|
||||
|
||||
@ -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')
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@ -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++;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user