Fix: Removed deprecated code fo local tax type 7 since we can use now
the fiscal stamp that is a better implementation.
This commit is contained in:
parent
1aa5535741
commit
c6c4a83850
@ -1527,12 +1527,6 @@ abstract class CommonObject
|
||||
$obj->localtax1_tx = $localtax1_array[1];
|
||||
}
|
||||
//end TODO
|
||||
|
||||
if ($obj->localtax1_type == '7')
|
||||
{
|
||||
$this->total_localtax1 += $obj->localtax1_tx;
|
||||
$this->total_ttc += $obj->localtax1_tx;
|
||||
}
|
||||
}
|
||||
if ($this->total_localtax2 == 0)
|
||||
{
|
||||
@ -1546,12 +1540,6 @@ abstract class CommonObject
|
||||
$obj->localtax2_tx = $localtax2_array[1];
|
||||
}
|
||||
//end TODO
|
||||
|
||||
if ($obj->localtax2_type == '7')
|
||||
{
|
||||
$this->total_localtax2 += $obj->localtax2_tx;
|
||||
$this->total_ttc += $obj->localtax2_tx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2838,8 +2838,8 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
if ($local==1 && $obj->localtax1_type != '7') return $obj->localtax1;
|
||||
elseif ($local==2 && $obj->localtax2_type != '7') return $obj->localtax2;
|
||||
if ($local==1) return $obj->localtax1;
|
||||
elseif ($local==2) return $obj->localtax2;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@ -381,12 +381,9 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
//end TODO
|
||||
|
||||
// retrieve global local tax
|
||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
||||
|
||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
||||
if ($localtax1_type && $localtax1ligne != 0)
|
||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||
if ($localtax2_type && ($localtax2ligne != 0 || $localtax2_type == '7'))
|
||||
if ($localtax2_type && $localtax2ligne != 0)
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||
|
||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
@ -826,19 +823,10 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -867,19 +855,11 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
||||
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -383,12 +383,9 @@ class pdf_crabe extends ModelePDFFactures
|
||||
//end TODO
|
||||
|
||||
// retrieve global local tax
|
||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
||||
|
||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
||||
if ($localtax1_type && $localtax1ligne != 0)
|
||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||
if ($localtax2_type && ($localtax2ligne != 0 || $localtax2_type == '7'))
|
||||
if ($localtax2_type && $localtax2ligne != 0)
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||
|
||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
@ -962,19 +959,11 @@ class pdf_crabe extends ModelePDFFactures
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1004,19 +993,11 @@ class pdf_crabe extends ModelePDFFactures
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
||||
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
@ -379,12 +379,9 @@ class pdf_azur extends ModelePDFPropales
|
||||
//end TODO
|
||||
|
||||
// retrieve global local tax
|
||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
||||
|
||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
||||
if ($localtax1_type && $localtax1ligne != 0)
|
||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||
if ($localtax2_type && ($localtax2ligne != 0 || $localtax2_type == '7'))
|
||||
if ($localtax2_type && $localtax2ligne != 0)
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||
|
||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
@ -857,19 +854,11 @@ class pdf_azur extends ModelePDFPropales
|
||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -898,19 +887,11 @@ class pdf_azur extends ModelePDFPropales
|
||||
}
|
||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
||||
|
||||
if ($localtax_type == '7') { // amount on order
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvakey), 0, 'R', 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -381,12 +381,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
//end TODO
|
||||
|
||||
// retrieve global local tax
|
||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
||||
|
||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
||||
if ($localtax1_type && $localtax1ligne != 0)
|
||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
||||
if ($localtax2_type && ($localtax2ligne != 0 || $localtax2_type == '7'))
|
||||
if ($localtax2_type && $localtax2ligne != 0)
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||
|
||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user