Skip to content
Snippets Groups Projects
Commit 3010c331 authored by Regis Houssin's avatar Regis Houssin
Browse files

Works on best mutualized code

Works on MVC
parent 381d1543
No related branches found
No related tags found
No related merge requests found
...@@ -1389,7 +1389,7 @@ if ($_GET['action'] == 'create') ...@@ -1389,7 +1389,7 @@ if ($_GET['action'] == 'create')
// For compatibility // For compatibility
if ($element == 'order') { $element = 'commande'; $subelement = 'customerorder'; } if ($element == 'order') { $element = 'commande'; $subelement = 'customerorder'; }
if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'proposal'; } if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'proposal'; }
if ($element == 'contract') { $element = $subelement = 'contrat'; } if ($element == 'contract') { $element = 'contrat'; $subelement = 'contract'; }
require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/actions_'.$subelement.'.class.php'); require_once(DOL_DOCUMENT_ROOT.'/'.$element.'/class/actions_'.$subelement.'.class.php');
$classname = 'Actions'.ucfirst($subelement); $classname = 'Actions'.ucfirst($subelement);
......
<?php
/* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/contrat/class/actions_contract.class.php
* \ingroup contract
* \brief Fichier de la classe des actions des contrats
* \version $Id$
*/
require_once(DOL_DOCUMENT_ROOT ."/core/class/actions_commonobject.class.php");
require_once(DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php');
/**
* \class ActionsContract
* \brief Classe permettant la gestion des actions des contrats
*/
class ActionsContract extends ActionsCommonObject
{
var $db;
var $object;
/**
* Constructeur de la classe
* @param DB Handler acces base de donnees
*/
function ActionsContract($DB)
{
$this->db = $DB;
}
/**
* Load a contract from database
* @param id Id of contract to load
* @return int <0 if KO, id of contract if OK
*/
function fetch($rowid,$ref='')
{
$this->object = new Contrat($this->db);
return $this->object->fetch($rowid,$ref);
}
}
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment