Fix minor look and security errors

This commit is contained in:
Laurent Destailleur 2015-04-21 12:03:51 +02:00
parent 7a4d1d990e
commit 5a9c40eb59
3 changed files with 16 additions and 14 deletions

View File

@ -1374,7 +1374,7 @@ if ($action == 'create')
$absolute_discount = $soc->getAvailableDiscounts();
print '. ';
if ($absolute_discount)
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount), $langs->trans("Currency" . $conf->currency));
print $langs->trans("CompanyHasAbsoluteDiscount", price($absolute_discount, 0, $langs, 1, -1, -1, $conf->currency));
else
print $langs->trans("CompanyHasNoAbsoluteDiscount");
print '.';
@ -1516,18 +1516,18 @@ if ($action == 'create')
$newclassname = 'Intervention';
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>";
print '<tr><td>' . $langs->trans('TotalHT') . '</td><td colspan="2">' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>';
print '<tr><td>' . $langs->trans('TotalVAT') . '</td><td colspan="2">' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
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>";
print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
}
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>";
print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td colspan="2">' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
}
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc) . "</td></tr>";
print '<tr><td>' . $langs->trans('TotalTTC') . '</td><td colspan="2">' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>";
}
print "</table>\n";
@ -1990,7 +1990,7 @@ if ($action == 'create')
print $langs->trans('OutstandingBill');
print '</td><td align=right colspan=3>';
print price($soc->get_OutstandingBill()) . ' / ';
print price($soc->outstanding_limit, 0, '', 1, - 1, - 1, $conf->currency);
print price($soc->outstanding_limit, 0, $langs, 1, - 1, - 1, $conf->currency);
print '</td>';
print '</tr>';
}
@ -2044,7 +2044,7 @@ if ($action == 'create')
// Amount HT
print '<tr><td height="10" width="25%">' . $langs->trans('AmountHT') . '</td>';
print '<td align="right" class="nowrap" colspan="2"><b>' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</b></td>';
print '<td class="nowrap" colspan="2">' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
// Margin Infos
if (! empty($conf->margin->enabled)) {
@ -2056,26 +2056,26 @@ if ($action == 'create')
// Amount VAT
print '<tr><td height="10">' . $langs->trans('AmountVAT') . '</td>';
print '<td align="right" class="nowrap" colspan="2">' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '</tr>';
// Amount Local Taxes
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" colspan="2">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td></td></tr>';
}
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" colspan="2">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '</tr>';
}
// Amount TTC
print '<tr><td height="10">' . $langs->trans('AmountTTC') . '</td>';
print '<td align="right" class="nowrap" colspan="2">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td class="nowrap" colspan="2">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '</tr>';
// Statut

View File

@ -84,6 +84,8 @@ $result=@include_once $conffile; // Keep @ because with some error reporting thi
if (! $result && ! empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done and we are in a web session
{
// Note: If calling page was not into htdocs (index.php, ...), then this redirect will fails.
// There is no real solution, because the only way to know the apache url relative path is to have into conf file.
header("Location: install/index.php");
exit;
}

View File

@ -1796,11 +1796,11 @@ table.nobordernopadding {
}
table.nobordernopadding tr {
border: 0px !important;
padding: 0px 0px;
padding: 0px 0px !important;
}
table.nobordernopadding td {
border: 0px !important;
padding: 0px 0px;
padding: 0px 0px !important;
}
/* For lists */