mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix: Bad parameter
This commit is contained in:
@@ -92,9 +92,13 @@ class Facturation
|
|||||||
global $conf,$db;
|
global $conf,$db;
|
||||||
|
|
||||||
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
|
$thirdpartyid = $_SESSION['CASHDESK_ID_THIRDPARTY'];
|
||||||
|
|
||||||
$societe = new Societe($db);
|
$societe = new Societe($db);
|
||||||
$societe->fetch($thirdpartyid);
|
$societe->fetch($thirdpartyid);
|
||||||
|
|
||||||
|
$product = new Product($db);
|
||||||
|
$product->fetch($this->id);
|
||||||
|
|
||||||
$sql = "SELECT taux";
|
$sql = "SELECT taux";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva";
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_tva";
|
||||||
$sql.= " WHERE rowid = ".$this->tva();
|
$sql.= " WHERE rowid = ".$this->tva();
|
||||||
@@ -109,13 +113,12 @@ class Facturation
|
|||||||
//var_dump($vat_rate);exit;
|
//var_dump($vat_rate);exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Define part of HT, VAT, TTC
|
// Define part of HT, VAT, TTC
|
||||||
$resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,0,'HT',0);
|
$resultarray=calcul_price_total($this->qte,$this->prix(),$this->remisePercent(),$vat_rate,0,0,$product->type,'HT',0);
|
||||||
|
|
||||||
// Calcul du total ht sans remise
|
// Calcul du total ht sans remise
|
||||||
$total_ht = $resultarray[0];
|
$total_ht = $resultarray[0];
|
||||||
@@ -132,9 +135,6 @@ class Facturation
|
|||||||
$montant_remise_ht = ($resultarray[6] - $resultarray[0]);
|
$montant_remise_ht = ($resultarray[6] - $resultarray[0]);
|
||||||
$this->montantRemise($montant_remise_ht);
|
$this->montantRemise($montant_remise_ht);
|
||||||
|
|
||||||
$product = new Product($db);
|
|
||||||
$product->fetch($this->id);
|
|
||||||
|
|
||||||
$newcartarray=$_SESSION['poscart'];
|
$newcartarray=$_SESSION['poscart'];
|
||||||
$i=count($newcartarray);
|
$i=count($newcartarray);
|
||||||
|
|
||||||
|
|||||||
@@ -445,7 +445,7 @@ class FactureRec extends Facture
|
|||||||
// qty, pu, remise_percent et txtva
|
// qty, pu, remise_percent et txtva
|
||||||
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
// TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker
|
||||||
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
// la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva.
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
$total_tva = $tabprice[1];
|
$total_tva = $tabprice[1];
|
||||||
$total_ttc = $tabprice[2];
|
$total_ttc = $tabprice[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user