Fix: sql syntax error
This commit is contained in:
parent
e1db0ef946
commit
cc39ca7287
@ -195,11 +195,9 @@ class FactureRec extends Facture
|
|||||||
*/
|
*/
|
||||||
function fetch($rowid, $socid=0)
|
function fetch($rowid, $socid=0)
|
||||||
{
|
{
|
||||||
dol_syslog("Facture::Fetch rowid=".$rowid.", societe_id=".$socid, LOG_DEBUG);
|
|
||||||
|
|
||||||
$sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise';
|
$sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise';
|
||||||
$sql.= ', f.date_lim_reglement as dlr';
|
$sql.= ', f.date_lim_reglement as dlr';
|
||||||
$sql.= ', f.note, f.note_public, f.fk_user_author, f.rang, f.special_code';
|
$sql.= ', f.note, f.note_public, f.fk_user_author';
|
||||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement';
|
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement';
|
||||||
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
|
||||||
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
$sql.= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc';
|
||||||
@ -211,8 +209,8 @@ class FactureRec extends Facture
|
|||||||
$sql.= ' WHERE f.rowid='.$rowid;
|
$sql.= ' WHERE f.rowid='.$rowid;
|
||||||
if ($socid > 0) $sql.= ' AND f.fk_soc = '.$socid;
|
if ($socid > 0) $sql.= ' AND f.fk_soc = '.$socid;
|
||||||
|
|
||||||
|
dol_syslog("FactureRec::Fetch rowid=".$rowid.", societe_id=".$socid." sql=".$sql, LOG_DEBUG);
|
||||||
$result = $this->db->query($sql);
|
$result = $this->db->query($sql);
|
||||||
|
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
if ($this->db->num_rows($result))
|
if ($this->db->num_rows($result))
|
||||||
@ -409,7 +407,7 @@ class FactureRec extends Facture
|
|||||||
*/
|
*/
|
||||||
function addline($facid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0)
|
function addline($facid, $desc, $pu_ht, $qty, $txtva, $fk_product=0, $remise_percent=0, $price_base_type='HT', $info_bits=0, $fk_remise_except='', $pu_ttc=0, $type=0, $rang=-1, $special_code=0)
|
||||||
{
|
{
|
||||||
dol_syslog("FactureRec::Addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type", LOG_DEBUG);
|
dol_syslog("FactureRec::addline facid=$facid,desc=$desc,pu_ht=$pu_ht,qty=$qty,txtva=$txtva,fk_product=$fk_product,remise_percent=$remise_percent,date_start=$date_start,date_end=$date_end,ventil=$ventil,info_bits=$info_bits,fk_remise_except=$fk_remise_except,price_base_type=$price_base_type,pu_ttc=$pu_ttc,type=$type", LOG_DEBUG);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/lib/price.lib.php');
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user