[ task #1063 ] Allow edit localtaxes rate for thirds. Improve visu
This commit is contained in:
parent
4063260cc8
commit
8e4e08f907
@ -1463,12 +1463,12 @@ if ($action == 'create') {
|
||||
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
|
||||
if ($mysoc->localtax1_assuj == "1") // Localtax1
|
||||
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
|
||||
}
|
||||
|
||||
if ($mysoc->localtax2_assuj == "1") // Localtax2
|
||||
if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
|
||||
}
|
||||
@ -1985,13 +1985,13 @@ if ($action == 'create') {
|
||||
print '<td></td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj == "1") // Localtax1
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
||||
{
|
||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right" class="nowrap">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
print '<td></td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj == "1") // Localtax2
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2
|
||||
{
|
||||
print '<tr><td height="10">' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right" class="nowrap">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
|
||||
|
||||
@ -1589,12 +1589,12 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
|
||||
if ($mysoc->localtax1_assuj == "1") // Localtax1 RE
|
||||
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
|
||||
}
|
||||
|
||||
if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF
|
||||
if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
|
||||
}
|
||||
@ -1840,9 +1840,9 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
$nbrow ++;
|
||||
|
||||
// Local taxes
|
||||
if ($mysoc->localtax1_assuj == "1")
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
|
||||
$nbrow ++;
|
||||
if ($mysoc->localtax2_assuj == "1")
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0 )
|
||||
$nbrow ++;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
@ -2115,9 +2115,9 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
}
|
||||
|
||||
$rowspan = 4;
|
||||
if ($mysoc->localtax1_assuj == "1")
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
|
||||
$rowspan ++;
|
||||
if ($mysoc->localtax2_assuj == "1")
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0)
|
||||
$rowspan ++;
|
||||
|
||||
// Total HT
|
||||
@ -2138,12 +2138,12 @@ if ($action == 'create' && $user->rights->commande->creer) {
|
||||
print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td align="right">' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj == "1") // Localtax1 RE
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right">' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right">' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
|
||||
@ -2302,12 +2302,12 @@ if ($action == 'create')
|
||||
print '<tr><td>' . $langs->trans($newclassname) . '</td><td colspan="2">' . $objectsrc->getNomUrl(1) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht) . '</td></tr>';
|
||||
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva) . "</td></tr>";
|
||||
if ($mysoc->localtax1_assuj == "1") // Localtax1 RE
|
||||
if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1) . "</td></tr>";
|
||||
}
|
||||
|
||||
if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF
|
||||
if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2) . "</td></tr>";
|
||||
}
|
||||
@ -2907,9 +2907,9 @@ if ($action == 'create')
|
||||
if (! empty($conf->banque->enabled))
|
||||
$nbcols ++;
|
||||
// if (! empty($soc->outstandingbill)) $nbrows++;
|
||||
if ($mysoc->localtax1_assuj == "1")
|
||||
if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0)
|
||||
$nbrows ++;
|
||||
if ($mysoc->localtax2_assuj == "1")
|
||||
if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0)
|
||||
$nbrows ++;
|
||||
if ($selleruserevenustamp)
|
||||
$nbrows ++;
|
||||
@ -3173,12 +3173,12 @@ if ($action == 'create')
|
||||
print '</tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) // Localtax1 (example RE)
|
||||
if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) // Localtax1
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right" colspan="3" nowrap>' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) // Localtax2 (example IRPF)
|
||||
if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) // Localtax2
|
||||
{
|
||||
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
|
||||
print '<td align="right" colspan="3" nowrap>' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '</td></tr>';
|
||||
|
||||
@ -1506,13 +1506,13 @@ elseif (! empty($object->id))
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
|
||||
// Amount Local Taxes
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1
|
||||
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td>';
|
||||
print '<td align="right">'.price($object->total_localtax1).'</td>';
|
||||
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
|
||||
}
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2
|
||||
if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td>';
|
||||
print '<td align="right">'.price($object->total_localtax2).'</td>';
|
||||
|
||||
@ -1368,12 +1368,12 @@ if ($action == 'create')
|
||||
print '<tr><td>'.$langs->trans('TotalVAT').'</td><td colspan="2">'.price($objectsrc->total_tva)."</td></tr>";
|
||||
if ($mysoc->country_code=='ES')
|
||||
{
|
||||
if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
|
||||
if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax1)."</td></tr>";
|
||||
}
|
||||
|
||||
if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
|
||||
if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2
|
||||
{
|
||||
print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->country_code).'</td><td colspan="2">'.price($objectsrc->total_localtax2)."</td></tr>";
|
||||
}
|
||||
|
||||
@ -91,9 +91,6 @@ LocalTax2IsUsedES= Sujeto a IRPF
|
||||
LocalTax2IsNotUsedES= No sujeto a IRPF
|
||||
LocalTax1ES=RE
|
||||
LocalTax2ES=IRPF
|
||||
TypeLocaltax1ES= Tipo RE
|
||||
TypeLocaltax2ES= Tipo IRPF
|
||||
TypeES= Tipo
|
||||
ThirdPartyEMail=%s
|
||||
WrongCustomerCode=Código cliente incorrecto
|
||||
WrongSupplierCode=Código proveedor incorrecto
|
||||
|
||||
Loading…
Reference in New Issue
Block a user