FIX #6009
This commit is contained in:
parent
f4fb07b570
commit
97034a7dff
@ -2821,6 +2821,7 @@ class Facture extends CommonInvoice
|
|||||||
*/
|
*/
|
||||||
function deleteline($rowid)
|
function deleteline($rowid)
|
||||||
{
|
{
|
||||||
|
global $user;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG);
|
dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG);
|
||||||
|
|
||||||
@ -2851,9 +2852,10 @@ class Facture extends CommonInvoice
|
|||||||
$line->context = $this->context;
|
$line->context = $this->context;
|
||||||
|
|
||||||
// For triggers
|
// For triggers
|
||||||
$line->fetch($rowid);
|
$result = $line->fetch($rowid);
|
||||||
|
if (! ($result > 0)) dol_print_error($db, $line->error, $line->errors);
|
||||||
|
|
||||||
if ($line->delete() > 0)
|
if ($line->delete($user) > 0)
|
||||||
{
|
{
|
||||||
$result=$this->update_price(1);
|
$result=$this->update_price(1);
|
||||||
|
|
||||||
@ -4208,13 +4210,13 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$sql.= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,';
|
$sql.= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,';
|
||||||
$sql.= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
|
$sql.= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
|
||||||
$sql.= ' fd.fk_code_ventilation,';
|
$sql.= ' fd.fk_code_ventilation,';
|
||||||
$sql.= ' fd.fk_unit, fk_user_author, fk_user_modif,';
|
$sql.= ' fd.fk_unit, fd.fk_user_author, fd.fk_user_modif,';
|
||||||
$sql.= ' fd.situation_percent, fd.fk_prev_id,';
|
$sql.= ' fd.situation_percent, fd.fk_prev_id,';
|
||||||
|
$sql.= ' fd.multicurrency_subprice,';
|
||||||
|
$sql.= ' fd.multicurrency_total_ht,';
|
||||||
|
$sql.= ' fd.multicurrency_total_tva,';
|
||||||
|
$sql.= ' fd.multicurrency_total_ttc,';
|
||||||
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc';
|
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc';
|
||||||
$sql.= ' , fd.multicurrency_subprice';
|
|
||||||
$sql.= ' , fd.multicurrency_total_ht';
|
|
||||||
$sql.= ' , fd.multicurrency_total_tva';
|
|
||||||
$sql.= ' , fd.multicurrency_total_ttc';
|
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as fd';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as fd';
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON fd.fk_product = p.rowid';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON fd.fk_product = p.rowid';
|
||||||
$sql.= ' WHERE fd.rowid = '.$rowid;
|
$sql.= ' WHERE fd.rowid = '.$rowid;
|
||||||
@ -4278,6 +4280,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$this->error = $this->db->lasterror();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4633,8 +4636,9 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete line in database
|
* Delete line in database
|
||||||
*
|
* TODO Add param User $user and notrigger (see skeleton)
|
||||||
* @return int <0 if KO, >0 if OK
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete()
|
function delete()
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user