2
0
forked from Wavyzz/dolibarr
Files
dolibarr-fork/htdocs/core/class/commonobjectline.class.php
Regis Houssin e04f0a3f9b Works on migration management positioning lines
Phase 1 : llx_propaldet
2010-09-06 10:35:56 +00:00

54 lines
1.6 KiB
PHP

<?php
/* Copyright (C) 2006-2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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/core/class/commonobjectline.class.php
\ingroup core
\brief File of the superclass of classes of lines of business objects (invoice, contract, PROPAL, commands, etc. ...)
\version $Id$
*/
/**
\class CommonObjectLine
\brief Superclass for class inheritance lines of business objects
*/
class CommonObjectLine
{
/**
* Add position of line (rang)
*/
function addRangOfLine($parentid,$parenttype,$childid,$childtype,$rang)
{
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'element_rang (';
$sql.= 'fk_parent, parenttype, fk_child, childtype, rang';
$sql.= ') VALUES (';
$sql.= $parentid.', "'.$parenttype.'", '.$childid.', "'.$childtype.'", '.$rang;
$sql.= ')';
if (! $this->db->query($sql) )
{
dol_print_error($this->db);
}
}
}
?>