Ajout Function set_pdf_model($user, $modelpdf)

This commit is contained in:
Rodolphe Quiedeville 2003-09-06 15:11:51 +00:00
parent 9c3ad6aeba
commit 100f59c1ac

View File

@ -37,10 +37,11 @@ class Propal
var $price;
Function Propal($DB, $soc_idp="")
Function Propal($DB, $soc_idp="", $propalid=0)
{
$this->db = $DB ;
$this->socidp = $soc_idp;
$this->id = $propalid;
$this->products = array();
$this->remise = 0;
}
@ -456,6 +457,30 @@ class Propal
}
}
}
/*
*
*
*
*/
Function set_pdf_model($user, $modelpdf)
{
if ($user->rights->propale->creer)
{
$sql = "UPDATE llx_propal SET model_pdf = '$modelpdf'";
$sql .= " WHERE rowid = $this->id AND fk_statut = 0 ;";
if ($this->db->query($sql) )
{
return 1;
}
else
{
print $this->db->error() . ' in ' . $sql;
return 0;
}
}
}
/*
*
*