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

Works on canvas integration in third party module

parent 451ee796
No related branches found
No related tags found
No related merge requests found
<?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/fidppi/canvas/cityhall/actions_card_cityhall.class.php
* \ingroup thirdparty
* \brief Fichier de la classe Thirdparty card controller (cityhall canvas)
* \version $Id$
*/
include_once(DOL_DOCUMENT_ROOT.'/societe/canvas/actions_card_common.class.php');
/**
* \class ActionsCardCityhall
* \brief Classe permettant la gestion des mairies
*/
class ActionsCardCityhall extends ActionsCardCommon
{
var $db;
//! Canvas
var $canvas;
/**
* Constructeur de la classe
* @param DB Handler acces base de donnees
*/
function ActionsCardCityhall($DB)
{
$this->db = $DB;
}
/**
* Return the title of card
*/
function getTitle($action)
{
global $langs;
$out='';
if ($action == 'view') $out.= $langs->trans("CityHall");
if ($action == 'edit') $out.= $langs->trans("EditCityHall");
if ($action == 'create') $out.= $langs->trans("NewCityHall");
return $out;
}
/**
* Load data control
*/
function loadControl($socid)
{
$return = parent::loadControl($socid);
return $return;
}
/**
* Assigne les valeurs POST dans l'objet
*/
function assign_post()
{
parent::assign_post();
}
/**
* Assign custom values for canvas
* @param action Type of action
*/
function assign_values($action='')
{
global $langs;
global $form, $formcompany;
parent::assign_values($action);
if ($action == 'view')
{
// Confirm delete third party
if ($_GET["action"] == 'delete')
{
$this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$this->object->id,$langs->trans("DeleteACityHall"),$langs->trans("ConfirmDeleteCityHall"),"confirm_delete",'',0,2);
}
}
if ($action == 'create' || $action == 'edit')
{
// Workforce
$this->tpl['select_workforce'] = $form->selectarray("effectif_id",$formcompany->effectif_array(0), $this->object->effectif_id);
}
}
}
?>
\ No newline at end of file
<?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/fidppi/canvas/cityhall/dao_thirdparty_cityhall.class.php
* \ingroup thirdparty
* \brief Fichier de la classe des mairies
* \version $Id$
*/
/**
* \class DaoThirdPartyCityhall
* \brief Classe permettant la gestion des mairies, cette classe surcharge la classe societe
*/
class DaoThirdPartyCityhall extends Societe
{
var $db;
//! Numero d'erreur Plage 1280-1535
var $errno = 0;
/**
* Constructeur de la classe
* @param DB Handler acces base de donnees
*/
function DaoThirdPartyCityhall($DB)
{
$this->db = $DB;
}
/**
* Lecture des donnees dans la base
* @param id Element id
* @param action Type of action
*/
function fetch($id='', $action='')
{
$result = parent::fetch($id);
return $result;
}
/**
* Create third party in database
* @param user Object of user that ask creation
* @return int >= 0 if OK, < 0 if KO
*/
function create($user='')
{
$result = parent::create($user);
return $result;
}
/**
* Update parameters of third party
* @param id id societe
* @param user Utilisateur qui demande la mise a jour
* @param call_trigger 0=non, 1=oui
* @param allowmodcodeclient Inclut modif code client et code compta
* @param allowmodcodefournisseur Inclut modif code fournisseur et code compta fournisseur
* @return int <0 si ko, >=0 si ok
*/
function update($id, $user='', $call_trigger=1, $allowmodcodeclient=0, $allowmodcodefournisseur=0)
{
$result = parent::update($id, $user, $call_trigger, $allowmodcodeclient, $allowmodcodefournisseur);
return $result;
}
/**
* Delete third party in database
* @param id id de la societe a supprimer
*/
function delete($id)
{
$result = parent::delete($id);
return $result;
}
/**
* Fetch datas list
*/
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
{
global $conf, $langs;
$this->list_datas = array();
}
}
?>
\ No newline at end of file
......@@ -18,7 +18,7 @@
/**
* \file htdocs/societe/canvas/actions_card_common.class.php
* \ingroup thirparty
* \ingroup thirdparty
* \brief Fichier de la classe Thirdparty card controller (common)
* \version $Id$
*/
......
......@@ -18,7 +18,7 @@
/**
* \file htdocs/societe/canvas/default/actions_card_default.class.php
* \ingroup thirparty
* \ingroup thirdparty
* \brief Fichier de la classe Thirdparty card controller (default canvas)
* \version $Id$
*/
......
......@@ -18,7 +18,7 @@
/**
* \file htdocs/societe/canvas/default/dao_thirdparty_default.class.php
* \ingroup thirparty
* \ingroup thirdparty
* \brief Fichier de la classe des tiers par defaut
* \version $Id$
*/
......
......@@ -18,7 +18,7 @@
/**
* \file htdocs/societe/canvas/individual/actions_card_individual.class.php
* \ingroup thirparty
* \ingroup thirdparty
* \brief Fichier de la classe Thirdparty card controller (individual canvas)
* \version $Id$
*/
......
......@@ -18,7 +18,7 @@
/**
* \file htdocs/societe/canvas/default/dao_thirdparty_individual.class.php
* \ingroup thirparty
* \ingroup thirdparty
* \brief Fichier de la classe des particuliers
* \version $Id$
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment