Nouveau fichier
This commit is contained in:
parent
7c5458287d
commit
eb97686eae
98
htdocs/product/canvas/product.livrecouverture.class.php
Normal file
98
htdocs/product/canvas/product.livrecouverture.class.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/product/canvas/product.livre.class.php
|
||||
\ingroup produit
|
||||
\brief Fichier de la classe des produits specifiques de type livre
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
/**
|
||||
\class ProductLivreCouverture
|
||||
\brief Classe permettant la gestion des livres, cette classe surcharge la classe produit
|
||||
*/
|
||||
|
||||
class ProductLivreCouverture extends Product
|
||||
{
|
||||
/**
|
||||
* \brief Constructeur de la classe
|
||||
* \param DB Handler accès base de données
|
||||
* \param id Id produit (0 par defaut)
|
||||
*/
|
||||
function ProductLivreCouverture($DB=0, $id=0)
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->id = $id ;
|
||||
$this->canvas = "livrecouverture";
|
||||
$this->name = "livrecouverture";
|
||||
$this->description = "Gestion des couvertures des livres";
|
||||
$this->active = PRODUIT_SPECIAL_LIVRECOUVERTURE;
|
||||
$this->menu_new = '';
|
||||
$this->menu_add = 0;
|
||||
$this->menu_clear = 1;
|
||||
}
|
||||
/**
|
||||
* \brief Creation
|
||||
* \param id Id livre
|
||||
*/
|
||||
function CreateCanvas($user,$datas)
|
||||
{
|
||||
$this->db->begin();
|
||||
|
||||
$id = $this->create($user);
|
||||
|
||||
return $this->id;
|
||||
|
||||
}
|
||||
/**
|
||||
* \brief Supression
|
||||
* \param id Id livre
|
||||
*/
|
||||
function DeleteCanvas($id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
* \brief Lecture des donnees dans la base
|
||||
* \param id Id livre ('' par defaut)
|
||||
* \param ref Reference du livre ('' par defaut)
|
||||
*/
|
||||
function FetchCanvas($id='', $ref='')
|
||||
{
|
||||
$result = $this->fetch($id,$ref);
|
||||
|
||||
return $result;
|
||||
}
|
||||
/**
|
||||
* \brief Mise a jour des donnees dans la base
|
||||
* \param datas Tableau de donnees
|
||||
*/
|
||||
function UpdateCanvas($datas)
|
||||
{
|
||||
$error = 0;
|
||||
return $error;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
37
mysql/tables/llx_product_cnv_livre_contrat.sql
Normal file
37
mysql/tables/llx_product_cnv_livre_contrat.sql
Normal file
@ -0,0 +1,37 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
--
|
||||
-- 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.
|
||||
--
|
||||
-- $Id$
|
||||
-- $Source$
|
||||
--
|
||||
-- ============================================================================
|
||||
|
||||
create table llx_product_cnv_livre_contrat
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
fk_cnv_livre integer,
|
||||
|
||||
quantite integer, -- quantite achete
|
||||
taux float(3,2), -- taux contractuel
|
||||
|
||||
date_app datetime, -- date d'application
|
||||
duree varchar(5) -- duree du contrat
|
||||
|
||||
)type=innodb;
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user