Fix: Removed useless duplicate properties.
This commit is contained in:
parent
3e7d6ae893
commit
747c6ddc3d
@ -58,7 +58,7 @@ class ActionComm extends CommonObject
|
|||||||
var $durationp = -1;
|
var $durationp = -1;
|
||||||
//var $date; // Date action realise debut (datea) // deprecated
|
//var $date; // Date action realise debut (datea) // deprecated
|
||||||
//var $dateend; // Date action realise fin (datea2) // deprecated
|
//var $dateend; // Date action realise fin (datea2) // deprecated
|
||||||
//var $durationa = -1; // deprecated
|
//var $durationa = -1; // Duration // deprecated
|
||||||
var $priority;
|
var $priority;
|
||||||
var $fulldayevent = 0; // 1=Event on full day
|
var $fulldayevent = 0; // 1=Event on full day
|
||||||
var $punctual = 1;
|
var $punctual = 1;
|
||||||
@ -74,9 +74,9 @@ class ActionComm extends CommonObject
|
|||||||
var $note;
|
var $note;
|
||||||
var $percentage;
|
var $percentage;
|
||||||
|
|
||||||
// Properties for links to other tables
|
// Properties for links to other objects
|
||||||
var $fk_element;
|
var $fk_element; // Id of record
|
||||||
var $elementtype;
|
var $elementtype; // Type of record. This if property ->element of object linked to.
|
||||||
|
|
||||||
// Ical
|
// Ical
|
||||||
var $icalname;
|
var $icalname;
|
||||||
@ -84,30 +84,19 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur
|
* Constructor
|
||||||
* \param db Handler d'acces base de donnee
|
* @param db Database handler
|
||||||
*/
|
*/
|
||||||
function ActionComm($db)
|
function ActionComm($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
/*
|
|
||||||
$this->societe = new Societe($db);
|
|
||||||
$this->author = new User($db);
|
|
||||||
$this->usermod = new User($db);
|
|
||||||
$this->usertodo = new User($db);
|
|
||||||
$this->userdone = new User($db);
|
|
||||||
if (class_exists("Contact"))
|
|
||||||
{
|
|
||||||
$this->contact = new Contact($db);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add an action into database
|
* Add an action/event into database
|
||||||
* @param user auteur de la creation de l'action
|
* @param user Object user making action
|
||||||
* @param notrigger 1 ne declenche pas les triggers, 0 sinon
|
* @param notrigger 1 = disable triggers, 0 = enable triggers
|
||||||
* @return int id de l'action creee, < 0 if KO
|
* @return int Id of created event, < 0 if KO
|
||||||
*/
|
*/
|
||||||
function add($user,$notrigger=0)
|
function add($user,$notrigger=0)
|
||||||
{
|
{
|
||||||
@ -130,6 +119,9 @@ class ActionComm extends CommonObject
|
|||||||
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
|
if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef=$this->datep;
|
||||||
if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date;
|
||||||
if ($this->fk_project < 0) $this->fk_project = 0;
|
if ($this->fk_project < 0) $this->fk_project = 0;
|
||||||
|
if ($this->elementtype=='facture') $this->elementtype='invoice';
|
||||||
|
if ($this->elementtype=='commande') $this->elementtype='order';
|
||||||
|
if ($this->elementtype=='contrat') $this->elementtype='contract';
|
||||||
|
|
||||||
if (! $this->type_id && $this->type_code)
|
if (! $this->type_id && $this->type_code)
|
||||||
{
|
{
|
||||||
@ -300,36 +292,13 @@ class ActionComm extends CommonObject
|
|||||||
|
|
||||||
$this->fk_element = $obj->fk_element;
|
$this->fk_element = $obj->fk_element;
|
||||||
$this->elementtype = $obj->elementtype;
|
$this->elementtype = $obj->elementtype;
|
||||||
|
|
||||||
/*
|
|
||||||
$this->fk_facture = $obj->fk_facture;
|
|
||||||
if ($this->fk_facture)
|
|
||||||
{
|
|
||||||
$this->objet_url = img_object($langs->trans("ShowBill"),'bill').' '.'<a href="'. DOL_URL_ROOT . '/compta/facture.php?facid='.$this->fk_facture.'">'.$langs->trans("Bill").'</a>';
|
|
||||||
$this->objet_url_type = 'facture';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->fk_propal = $obj->propalrowid;
|
|
||||||
if ($this->fk_propal)
|
|
||||||
{
|
|
||||||
$this->objet_url = img_object($langs->trans("ShowPropal"),'propal').' '.'<a href="'. DOL_URL_ROOT . '/comm/propal.php?id='.$this->fk_propal.'">'.$langs->trans("Propal").'</a>';
|
|
||||||
$this->objet_url_type = 'propal';
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->fk_commande = $obj->fk_commande;
|
|
||||||
if ($this->fk_commande)
|
|
||||||
{
|
|
||||||
$this->objet_url = img_object($langs->trans("ShowOrder"),'order').' '.'<a href="'. DOL_URL_ROOT . '/commande/fiche.php?id='.$this->fk_commande.'">'.$langs->trans("Order").'</a>';
|
|
||||||
$this->objet_url_type = 'order';
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error();
|
$this->error=$this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -350,7 +319,7 @@ class ActionComm extends CommonObject
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->error()." sql=".$sql;
|
$this->error=$this->db->lasterror()." sql=".$sql;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||||
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/tva/class/tva.class.php");
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/compta/deplacement/class/deplacement.class.php");
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
@ -38,8 +39,14 @@ if ($user->societe_id) $socid=$user->societe_id;
|
|||||||
$result = restrictedArea($user, 'deplacement','','');
|
$result = restrictedArea($user, 'deplacement','','');
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
|
$tripandexpense_static=new Deplacement($db);
|
||||||
|
|
||||||
$sortfield = GETPOST("sortfield",'alpha');
|
$sortfield = GETPOST("sortfield",'alpha');
|
||||||
$sortorder = GETPOST("sortorder",'alpha');
|
$sortorder = GETPOST("sortorder",'alpha');
|
||||||
$page = GETPOST("page",'int');
|
$page = GETPOST("page",'int');
|
||||||
@ -76,12 +83,13 @@ if ($resql)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print_liste_field_titre($langs->trans("Ref"),"index.php","d.rowid","","&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"d.rowid","","&socid=$socid",'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Type"),"index.php","d.type","","&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"d.type","","&socid=$socid",'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Date"),"index.php","d.dated","","&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"d.dated","","&socid=$socid",'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Company"),"index.php","s.nom","","&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","","&socid=$socid",'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("Person"),"index.php","u.name","","&socid=$socid",'',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Person"),$_SERVER["PHP_SELF"],"u.name","","&socid=$socid",'',$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("FeesKilometersOrAmout"),"index.php","d.km","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("FeesKilometersOrAmout"),$_SERVER["PHP_SELF"],"d.km","","&socid=$socid",'align="right"',$sortfield,$sortorder);
|
||||||
|
print_liste_field_titre('',$_SERVER["PHP_SELF"]);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -101,6 +109,8 @@ if ($resql)
|
|||||||
else print '<td> </td>';
|
else print '<td> </td>';
|
||||||
print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.'</a></td>';
|
print '<td align="left"><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$objp->firstname.' '.$objp->name.'</a></td>';
|
||||||
print '<td align="right">'.$objp->km.'</td>';
|
print '<td align="right">'.$objp->km.'</td>';
|
||||||
|
|
||||||
|
print '<td align="right">'.$tripandexpense_static->getLibStatut(5).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
@ -1487,12 +1487,16 @@ class CommonObject
|
|||||||
$classpath = $element.'/class';
|
$classpath = $element.'/class';
|
||||||
|
|
||||||
// To work with non standard path
|
// To work with non standard path
|
||||||
if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; }
|
if ($objecttype == 'facture' || $objecttype == 'invoice') { $classpath = 'compta/facture/class'; $module='facture'; $subelement='facture'; }
|
||||||
|
if ($objecttype == 'commande' || $objecttype == 'order') { $classpath = 'commande/class'; $module='commande'; $subelement='commande'; }
|
||||||
if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; }
|
if ($objecttype == 'propal') { $classpath = 'comm/propal/class'; }
|
||||||
if ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; }
|
if ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; }
|
||||||
if ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; }
|
if ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; }
|
||||||
if ($objecttype == 'invoice_supplier') { $classpath = 'fourn/class'; }
|
if ($objecttype == 'invoice_supplier') { $classpath = 'fourn/class'; }
|
||||||
if ($objecttype == 'order_supplier') { $classpath = 'fourn/class'; }
|
if ($objecttype == 'order_supplier') { $classpath = 'fourn/class'; }
|
||||||
|
if ($objecttype == 'contract') { $classpath = 'contrat/class'; $module='contrat'; $subelement='contrat'; }
|
||||||
|
|
||||||
|
print "objecttype=".$objecttype." module=".$module." subelement=".$subelement;
|
||||||
|
|
||||||
$classfile = strtolower($subelement); $classname = ucfirst($subelement);
|
$classfile = strtolower($subelement); $classname = ucfirst($subelement);
|
||||||
if ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; }
|
if ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname='FactureFournisseur'; }
|
||||||
|
|||||||
@ -523,7 +523,7 @@ if ($_POST['action'] == 'send' && ! $_POST['cancel'] && (empty($conf->global->MA
|
|||||||
// Appel des triggers
|
// Appel des triggers
|
||||||
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
include_once(DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php");
|
||||||
$interface=new Interfaces($db);
|
$interface=new Interfaces($db);
|
||||||
$result=$interface->run_triggers('FICHINTER_SENTBYMAIL',$fichinter,$user,$langs,$conf);
|
$result=$interface->run_triggers('FICHEINTER_SENTBYMAIL',$fichinter,$user,$langs,$conf);
|
||||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// Fin appel triggers
|
// Fin appel triggers
|
||||||
|
|
||||||
|
|||||||
@ -133,8 +133,6 @@ class InterfaceActionsAuto
|
|||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
$object->socid=$object->id;
|
$object->socid=$object->id;
|
||||||
$object->fk_element=0;
|
|
||||||
$object->elementtype='';
|
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'CONTRACT_VALIDATE')
|
elseif ($action == 'CONTRACT_VALIDATE')
|
||||||
@ -180,7 +178,8 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->sendtoid=0;
|
// Parameters $object->sendtoid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'PROPAL_CLOSE_SIGNED')
|
elseif ($action == 'PROPAL_CLOSE_SIGNED')
|
||||||
@ -239,10 +238,9 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->sendtoid=0;
|
// Parameters $object->sendtoid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
|
|
||||||
// Parameters $object->xxx defined by caller
|
|
||||||
}
|
}
|
||||||
elseif ($action == 'BILL_VALIDATE')
|
elseif ($action == 'BILL_VALIDATE')
|
||||||
{
|
{
|
||||||
@ -274,9 +272,9 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parameters $object->sendtoid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
|
|
||||||
// Parameters $object->xxx defined by caller
|
|
||||||
}
|
}
|
||||||
elseif ($action == 'BILL_PAYED')
|
elseif ($action == 'BILL_PAYED')
|
||||||
{
|
{
|
||||||
@ -321,6 +319,24 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
|
$object->fk_element=0;
|
||||||
|
$object->elementtype='';
|
||||||
|
$ok=1;
|
||||||
|
}
|
||||||
|
elseif ($action == 'FICHEINTER_SENTBYMAIL')
|
||||||
|
{
|
||||||
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
$langs->load("other");
|
||||||
|
$langs->load("interventions");
|
||||||
|
$langs->load("agenda");
|
||||||
|
|
||||||
|
$object->actiontypecode='AC_OTH';
|
||||||
|
if (empty($object->actionmsg2)) $object->actionmsg2=$langs->transnoentities("InterventionValidatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg=$langs->transnoentities("InterventionValidatedInDolibarr",$object->ref);
|
||||||
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
|
// Parameters $object->sendotid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'SHIPPING_SENTBYMAIL')
|
elseif ($action == 'SHIPPING_SENTBYMAIL')
|
||||||
@ -338,9 +354,9 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Parameters $object->sendtoid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
|
|
||||||
// Parameters $object->xxx defined by caller
|
|
||||||
}
|
}
|
||||||
elseif ($action == 'ORDER_SUPPLIER_VALIDATE')
|
elseif ($action == 'ORDER_SUPPLIER_VALIDATE')
|
||||||
{
|
{
|
||||||
@ -372,7 +388,8 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->sendtoid=0;
|
// Parameters $object->sendotid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'BILL_SUPPLIER_VALIDATE')
|
elseif ($action == 'BILL_SUPPLIER_VALIDATE')
|
||||||
@ -406,7 +423,8 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
}
|
}
|
||||||
|
|
||||||
$object->sendtoid=0;
|
// Parameters $object->sendtoid defined by caller
|
||||||
|
//$object->sendtoid=0;
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'BILL_SUPPLIER_PAYED')
|
elseif ($action == 'BILL_SUPPLIER_PAYED')
|
||||||
@ -456,8 +474,6 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
$object->fk_element=0;
|
|
||||||
$object->elementtype='';
|
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'MEMBER_SUBSCRIPTION')
|
elseif ($action == 'MEMBER_SUBSCRIPTION')
|
||||||
@ -477,8 +493,6 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
$object->fk_element=0;
|
|
||||||
$object->elementtype='';
|
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'MEMBER_MODIFY')
|
elseif ($action == 'MEMBER_MODIFY')
|
||||||
@ -500,8 +514,6 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
$object->fk_element=0;
|
|
||||||
$object->elementtype='';
|
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
elseif ($action == 'MEMBER_DELETE')
|
elseif ($action == 'MEMBER_DELETE')
|
||||||
@ -519,8 +531,6 @@ class InterfaceActionsAuto
|
|||||||
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
$object->actionmsg.="\n".$langs->transnoentities("Author").': '.$user->login;
|
||||||
|
|
||||||
$object->sendtoid=0;
|
$object->sendtoid=0;
|
||||||
$object->fk_element=0;
|
|
||||||
$object->elementtype='';
|
|
||||||
$ok=1;
|
$ok=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,8 +566,8 @@ class InterfaceActionsAuto
|
|||||||
//$actioncomm->usertodo = $user; // User affected to action
|
//$actioncomm->usertodo = $user; // User affected to action
|
||||||
$actioncomm->userdone = $user; // User doing action
|
$actioncomm->userdone = $user; // User doing action
|
||||||
|
|
||||||
$actioncomm->fk_element = $object->fk_element;
|
$actioncomm->fk_element = $object->id;
|
||||||
$actioncomm->elementtype = $object->elementtype;
|
$actioncomm->elementtype = $object->element;
|
||||||
|
|
||||||
$ret=$actioncomm->add($user); // User qui saisit l'action
|
$ret=$actioncomm->add($user); // User qui saisit l'action
|
||||||
if ($ret > 0)
|
if ($ret > 0)
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
|
-- To change type of field: ALTER TABLE llx_table MODIFY name varchar(60);
|
||||||
--
|
--
|
||||||
|
|
||||||
-- Fix correupted data
|
-- Fix corrupted data
|
||||||
update llx_deplacement set dated='2010-01-01' where dated < '2000-01-01';
|
update llx_deplacement set dated='2010-01-01' where dated < '2000-01-01';
|
||||||
|
|
||||||
RENAME TABLE llx_c_methode_commande_fournisseur TO llx_c_input_method;
|
RENAME TABLE llx_c_methode_commande_fournisseur TO llx_c_input_method;
|
||||||
@ -361,3 +361,9 @@ INSERT INTO llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'LH', 'H
|
|||||||
-- ISV (VAT) Honduras
|
-- ISV (VAT) Honduras
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1141,114, '0','0','No ISV',1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1141,114, '0','0','No ISV',1);
|
||||||
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1142,114, '12','0','ISV 12%',1);
|
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (1142,114, '12','0','ISV 12%',1);
|
||||||
|
|
||||||
|
|
||||||
|
update llx_actioncomm set elementtype='invoice' where elementtype='facture';
|
||||||
|
update llx_actioncomm set elementtype='order' where elementtype='commande';
|
||||||
|
update llx_actioncomm set elementtype='contract' where elementtype='contrat';
|
||||||
|
|
||||||
|
|||||||
@ -3092,9 +3092,9 @@ function migrate_actioncomm_element($db,$langs,$conf)
|
|||||||
print '<b>'.$langs->trans('MigrationActioncommElement')."</b><br>\n";
|
print '<b>'.$langs->trans('MigrationActioncommElement')."</b><br>\n";
|
||||||
|
|
||||||
$elements = array( 'propal' => 'propalrowid',
|
$elements = array( 'propal' => 'propalrowid',
|
||||||
'commande' => 'fk_commande',
|
'order' => 'fk_commande',
|
||||||
'facture' => 'fk_facture',
|
'invoice' => 'fk_facture',
|
||||||
'contrat' => 'fk_contract',
|
'contract' => 'fk_contract',
|
||||||
'order_supplier' => 'fk_supplier_order',
|
'order_supplier' => 'fk_supplier_order',
|
||||||
'invoice_supplier' => 'fk_supplier_invoice'
|
'invoice_supplier' => 'fk_supplier_invoice'
|
||||||
);
|
);
|
||||||
@ -3121,9 +3121,10 @@ function migrate_actioncomm_element($db,$langs,$conf)
|
|||||||
$db->commit();
|
$db->commit();
|
||||||
|
|
||||||
// DDL commands must not be inside a transaction
|
// DDL commands must not be inside a transaction
|
||||||
$sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."actioncomm DROP COLUMN ".$field;
|
// We will drop at next version because a migrate should be runnable several times if it fails.
|
||||||
$db->query($sqlDrop);
|
//$sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."actioncomm DROP COLUMN ".$field;
|
||||||
print ". ";
|
//$db->query($sqlDrop);
|
||||||
|
//print ". ";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user