Gestion du code produit par ligne de facture
This commit is contained in:
parent
0d4e2798a7
commit
269e909992
@ -20,13 +20,15 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FactureLigne {
|
class FactureLigne
|
||||||
|
{
|
||||||
Function FactureLigne()
|
Function FactureLigne()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Facture {
|
class Facture
|
||||||
|
{
|
||||||
var $id;
|
var $id;
|
||||||
var $db;
|
var $db;
|
||||||
var $socidp;
|
var $socidp;
|
||||||
@ -281,13 +283,16 @@ class Facture {
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
Function addline($facid, $desc, $pu, $qty, $txtva)
|
Function addline($facid, $desc, $pu, $qty, $txtva, $fk_product='NULL')
|
||||||
{
|
{
|
||||||
$sql = "INSERT INTO llx_facturedet (fk_facture,description,price,qty,tva_taux) VALUES ($facid, '$desc', $pu, $qty, $txtva) ;";
|
$sql = "INSERT INTO llx_facturedet (fk_facture,description,price,qty,tva_taux, fk_product)";
|
||||||
$result = $this->db->query( $sql);
|
$sql .= " VALUES ($facid, '$desc', $pu, $qty, $txtva, $fk_product) ;";
|
||||||
|
|
||||||
|
if ( $this->db->query( $sql) )
|
||||||
|
{
|
||||||
$this->updateprice($facid);
|
$this->updateprice($facid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user