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];
|
$obj->localtax1_tx = $localtax1_array[1];
|
||||||
}
|
}
|
||||||
//end TODO
|
//end TODO
|
||||||
|
|
||||||
if ($obj->localtax1_type == '7')
|
|
||||||
{
|
|
||||||
$this->total_localtax1 += $obj->localtax1_tx;
|
|
||||||
$this->total_ttc += $obj->localtax1_tx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if ($this->total_localtax2 == 0)
|
if ($this->total_localtax2 == 0)
|
||||||
{
|
{
|
||||||
@ -1546,12 +1540,6 @@ abstract class CommonObject
|
|||||||
$obj->localtax2_tx = $localtax2_array[1];
|
$obj->localtax2_tx = $localtax2_array[1];
|
||||||
}
|
}
|
||||||
//end TODO
|
//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)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($local==1 && $obj->localtax1_type != '7') return $obj->localtax1;
|
if ($local==1) return $obj->localtax1;
|
||||||
elseif ($local==2 && $obj->localtax2_type != '7') return $obj->localtax2;
|
elseif ($local==2) return $obj->localtax2;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
@ -381,12 +381,9 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
//end TODO
|
//end TODO
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
|
||||||
|
|
||||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$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;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
@ -826,14 +823,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
@ -841,7 +830,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
@ -867,13 +855,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
@ -882,7 +863,6 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Total TTC
|
// Total TTC
|
||||||
|
|||||||
@ -383,12 +383,9 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
//end TODO
|
//end TODO
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
|
||||||
|
|
||||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$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;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
@ -962,22 +959,14 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
|
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
@ -1004,13 +993,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
@ -1018,7 +1000,6 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($tvaval), 0, 'R', 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -379,12 +379,9 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
//end TODO
|
//end TODO
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
|
||||||
|
|
||||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$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;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
@ -857,14 +854,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
$tvacompl = " (".$outputlangs->transnoentities("NonPercuRecuperable").")";
|
||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT1",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
@ -872,7 +862,6 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
//Local tax 2 after VAT
|
//Local tax 2 after VAT
|
||||||
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
//if (! empty($conf->global->FACTURE_LOCAL_TAX2_OPTION) && $conf->global->FACTURE_LOCAL_TAX2_OPTION=='localtax2on')
|
||||||
@ -898,13 +887,6 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
$totalvat = $outputlangs->transcountrynoentities("TotalLT2",$mysoc->country_code).' ';
|
$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;
|
$totalvat.=vatrate(abs($tvakey),1).$tvacompl;
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||||
|
|
||||||
@ -913,7 +895,6 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// Total TTC
|
// Total TTC
|
||||||
|
|||||||
@ -381,12 +381,9 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
|||||||
//end TODO
|
//end TODO
|
||||||
|
|
||||||
// retrieve global local tax
|
// retrieve global local tax
|
||||||
if ($localtax1_type == '7') $localtax1_rate = $localtaxtmp_array[1];
|
if ($localtax1_type && $localtax1ligne != 0)
|
||||||
if ($localtax2_type == '7') $localtax2_rate = $localtaxtmp_array[3];
|
|
||||||
|
|
||||||
if ($localtax1_type && ($localtax1ligne != 0 || $localtax1_type == '7'))
|
|
||||||
$this->localtax1[$localtax1_type][$localtax1_rate]+=$localtax1ligne;
|
$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;
|
$this->localtax2[$localtax2_type][$localtax2_rate]+=$localtax2ligne;
|
||||||
|
|
||||||
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate.='*';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user