Merge remote-tracking branch 'origin/7.0' into 7.0
# Conflicts: # htdocs/comm/propal/class/propal.class.php # htdocs/commande/class/commande.class.php # htdocs/expensereport/class/expensereport.class.php # htdocs/fourn/class/fournisseur.commande.class.php
This commit is contained in:
commit
602986ced8
@ -1358,6 +1358,16 @@ class Contrat extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||||
|
|
||||||
|
// Clean vat code
|
||||||
|
$vat_src_code='';
|
||||||
|
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
||||||
|
{
|
||||||
|
$vat_src_code = $reg[1];
|
||||||
|
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
||||||
|
}
|
||||||
|
|
||||||
// Clean parameters
|
// Clean parameters
|
||||||
$pu_ht=price2num($pu_ht);
|
$pu_ht=price2num($pu_ht);
|
||||||
$pu_ttc=price2num($pu_ttc);
|
$pu_ttc=price2num($pu_ttc);
|
||||||
@ -1394,16 +1404,6 @@ class Contrat extends CommonObject
|
|||||||
// 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.
|
||||||
|
|
||||||
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
|
||||||
|
|
||||||
// Clean vat code
|
|
||||||
$vat_src_code='';
|
|
||||||
if (preg_match('/\((.*)\)/', $txtva, $reg))
|
|
||||||
{
|
|
||||||
$vat_src_code = $reg[1];
|
|
||||||
$txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate.
|
|
||||||
}
|
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,$mysoc, $localtaxes_type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
$total_tva = $tabprice[1];
|
$total_tva = $tabprice[1];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user