From 12754cab91df851173ded83e611e17fbfe5270e6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 7 Sep 2010 12:53:22 +0000 Subject: [PATCH] Fix: commit error --- .../CopyOfactions_card_cityhall.class.php | 110 ++++++++++++++++++ .../CopyOfdao_thirdparty_cityhall.class.php | 109 +++++++++++++++++ 2 files changed, 219 insertions(+) create mode 100644 htdocs/fidppi/canvas/cityhall/CopyOfactions_card_cityhall.class.php create mode 100644 htdocs/fidppi/canvas/cityhall/CopyOfdao_thirdparty_cityhall.class.php diff --git a/htdocs/fidppi/canvas/cityhall/CopyOfactions_card_cityhall.class.php b/htdocs/fidppi/canvas/cityhall/CopyOfactions_card_cityhall.class.php new file mode 100644 index 00000000000..c6264572ae5 --- /dev/null +++ b/htdocs/fidppi/canvas/cityhall/CopyOfactions_card_cityhall.class.php @@ -0,0 +1,110 @@ + + * + * 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 diff --git a/htdocs/fidppi/canvas/cityhall/CopyOfdao_thirdparty_cityhall.class.php b/htdocs/fidppi/canvas/cityhall/CopyOfdao_thirdparty_cityhall.class.php new file mode 100644 index 00000000000..8bb0c3ef0d2 --- /dev/null +++ b/htdocs/fidppi/canvas/cityhall/CopyOfdao_thirdparty_cityhall.class.php @@ -0,0 +1,109 @@ + + * + * 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