forked from Wavyzz/dolibarr
Fix: phpcs
This commit is contained in:
@@ -990,7 +990,7 @@ 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);
|
$localtaxes_type=getLocalTaxesFromRate($txtva, 0, $this->societe, $mysoc);
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, 1,'', $localtaxes_type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
@@ -1136,7 +1136,7 @@ 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($tvatx,0, $this->societe ,$mysoc);
|
$localtaxes_type=getLocalTaxesFromRate($tvatx, 0, $this->societe, $mysoc);
|
||||||
|
|
||||||
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type);
|
$tabprice=calcul_price_total($qty, $pu, $remise_percent, $tvatx, $localtaxtx1, $txlocaltaxtx2, 0, $price_base_type, $info_bits, 1, '', $localtaxes_type);
|
||||||
$total_ht = $tabprice[0];
|
$total_ht = $tabprice[0];
|
||||||
|
|||||||
@@ -778,11 +778,12 @@ class FormCompany
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a select with localtax values for thirds
|
* Return a HTML select with localtax values for thirdparties
|
||||||
*
|
*
|
||||||
* @param int $local LocalTax
|
* @param int $local LocalTax
|
||||||
* @param int $selected Preselected value
|
* @param int $selected Preselected value
|
||||||
* @param varchar $htmlname HTML select name
|
* @param varchar $htmlname HTML select name
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function select_localtax($local, $selected, $htmlname)
|
function select_localtax($local, $selected, $htmlname)
|
||||||
{
|
{
|
||||||
@@ -794,14 +795,18 @@ class FormCompany
|
|||||||
{
|
{
|
||||||
$valors=explode(":", $tax);
|
$valors=explode(":", $tax);
|
||||||
|
|
||||||
if(count($valors)>1)
|
if (count($valors) > 1)
|
||||||
{
|
{
|
||||||
//montar select
|
//montar select
|
||||||
print '<select class="flat" name="'.$htmlname.'">';
|
print '<select class="flat" name="'.$htmlname.'">';
|
||||||
while($i <= (count($valors))-1){
|
while ($i <= (count($valors))-1)
|
||||||
if ($selected == $valors[$i]){
|
{
|
||||||
|
if ($selected == $valors[$i])
|
||||||
|
{
|
||||||
print '<option value="'.$valors[$i].'" selected="selected">';
|
print '<option value="'.$valors[$i].'" selected="selected">';
|
||||||
}else{
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
print '<option value="'.$valors[$i].'">';
|
print '<option value="'.$valors[$i].'">';
|
||||||
}
|
}
|
||||||
print $valors[$i];
|
print $valors[$i];
|
||||||
@@ -809,7 +814,6 @@ class FormCompany
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
print'</select>';
|
print'</select>';
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3058,7 +3058,8 @@ function get_localtax_by_third($local)
|
|||||||
*
|
*
|
||||||
* @param float $vatrate VAT Rate
|
* @param float $vatrate VAT Rate
|
||||||
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
|
* @param int $local Number of localtax (1 or 2, or 0 to return 1 & 2)
|
||||||
* @param int $thirdparty Company object
|
* @param int $buyer Company object
|
||||||
|
* @param int $seller Company object
|
||||||
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
|
* @return array array(localtax_type1(1-6 / 0 if not found), rate of localtax1, ...)
|
||||||
*/
|
*/
|
||||||
function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
|
function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller)
|
||||||
|
|||||||
Reference in New Issue
Block a user