Ajoute la variable canvas
This commit is contained in:
parent
9eb28a0d85
commit
3490f15084
@ -1,8 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
|
||||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||||
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
@ -28,7 +29,6 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
\class Product
|
\class Product
|
||||||
\brief Classe permettant la gestion des produits prédéfinis
|
\brief Classe permettant la gestion des produits prédéfinis
|
||||||
@ -59,7 +59,7 @@ class Product
|
|||||||
|
|
||||||
var $typeprodserv;
|
var $typeprodserv;
|
||||||
var $error;
|
var $error;
|
||||||
|
var $canvas; // Canevas a utiliser si le produit n'est pas un produit generique
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Constructeur de la classe
|
* \brief Constructeur de la classe
|
||||||
@ -77,6 +77,7 @@ class Product
|
|||||||
|
|
||||||
$this->typeprodser[0]=$langs->trans("Product");
|
$this->typeprodser[0]=$langs->trans("Product");
|
||||||
$this->typeprodser[1]=$langs->trans("Service");
|
$this->typeprodser[1]=$langs->trans("Service");
|
||||||
|
$this->canvas = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1603,12 +1604,12 @@ class Product
|
|||||||
$db->commit();
|
$db->commit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* \brief fonction récursive uniquement utilisée par get_arbo_each_prod, recompose l'arborescence des sousproduits
|
* \brief fonction récursive uniquement utilisée par get_arbo_each_prod, recompose l'arborescence des sousproduits
|
||||||
* \return void
|
* \return void
|
||||||
*/
|
*/
|
||||||
function fetch_prod_arbo($prod,$compl_path="")
|
function fetch_prod_arbo($prod,$compl_path="")
|
||||||
{
|
{
|
||||||
$this->res;
|
$this->res;
|
||||||
$this->pere_encours;
|
$this->pere_encours;
|
||||||
foreach($prod as $nom_pere => $desc_pere)
|
foreach($prod as $nom_pere => $desc_pere)
|
||||||
@ -1624,12 +1625,12 @@ class Product
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* \brief fonction récursive uniquement utilisée par get_each_prod, ajoute chaque sousproduits dans le tableau res
|
* \brief fonction récursive uniquement utilisée par get_each_prod, ajoute chaque sousproduits dans le tableau res
|
||||||
* \return void
|
* \return void
|
||||||
*/
|
*/
|
||||||
function fetch_prods($prod)
|
function fetch_prods($prod)
|
||||||
{
|
{
|
||||||
$this->res;
|
$this->res;
|
||||||
foreach($prod as $nom_pere => $desc_pere)
|
foreach($prod as $nom_pere => $desc_pere)
|
||||||
{
|
{
|
||||||
@ -1646,8 +1647,8 @@ class Product
|
|||||||
* \brief reconstruit l'arborescence des catégorie sous la forme d'un tableau
|
* \brief reconstruit l'arborescence des catégorie sous la forme d'un tableau
|
||||||
* \return array $this->res
|
* \return array $this->res
|
||||||
*/
|
*/
|
||||||
function get_arbo_each_prod()
|
function get_arbo_each_prod()
|
||||||
{
|
{
|
||||||
$this->res = array();
|
$this->res = array();
|
||||||
if(is_array($this -> sousprods))
|
if(is_array($this -> sousprods))
|
||||||
{
|
{
|
||||||
@ -1660,13 +1661,13 @@ function get_arbo_each_prod()
|
|||||||
sort($this->res);
|
sort($this->res);
|
||||||
}
|
}
|
||||||
return $this->res;
|
return $this->res;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* \brief renvoie tous les sousproduits dans le tableau res, chaque ligne de res contient : id -> qty
|
* \brief renvoie tous les sousproduits dans le tableau res, chaque ligne de res contient : id -> qty
|
||||||
* \return array $this->res
|
* \return array $this->res
|
||||||
*/
|
*/
|
||||||
function get_each_prod()
|
function get_each_prod()
|
||||||
{
|
{
|
||||||
$this->res = array();
|
$this->res = array();
|
||||||
if(is_array($this -> sousprods))
|
if(is_array($this -> sousprods))
|
||||||
{
|
{
|
||||||
@ -1679,9 +1680,9 @@ function get_each_prod()
|
|||||||
sort($this->res);
|
sort($this->res);
|
||||||
}
|
}
|
||||||
return $this->res;
|
return $this->res;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne les catégories pères
|
* \brief Retourne les catégories pères
|
||||||
* \return array prod
|
* \return array prod
|
||||||
*/
|
*/
|
||||||
@ -1709,7 +1710,7 @@ function get_each_prod()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Retourne les fils de la catégorie structurés pour l'arbo
|
* \brief Retourne les fils de la catégorie structurés pour l'arbo
|
||||||
* \return array prod
|
* \return array prod
|
||||||
*/
|
*/
|
||||||
@ -1737,7 +1738,7 @@ function get_each_prod()
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* \brief compose l'arborescence des sousproduits, id, nom et quantité sous la forme d'un tableau associatif
|
* \brief compose l'arborescence des sousproduits, id, nom et quantité sous la forme d'un tableau associatif
|
||||||
* \return void
|
* \return void
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user