forked from Wavyzz/dolibarr
update with html5 compliant code
This commit is contained in:
@@ -257,10 +257,10 @@ while($i < 12)
|
||||
{
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
$i++;
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
|
||||
$sql = "SELECT fd.tva_tx AS vatrate,";
|
||||
$sql .= " fd.product_type AS product_type,";
|
||||
@@ -301,10 +301,10 @@ if ($resql) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||
print '</tr>';
|
||||
}
|
||||
@@ -318,9 +318,9 @@ if ($resql) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
@@ -335,10 +335,10 @@ while($i < 12)
|
||||
{
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
print '<td width="60" class="right">' . $langs->trans('MonthShort' . str_pad($j, 2, '0', STR_PAD_LEFT)) . '</td>';
|
||||
$i++;
|
||||
}
|
||||
print '<td width="60" align="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
print '<td width="60" class="right"><b>' . $langs->trans("TotalHT") . '</b></td></tr>';
|
||||
|
||||
$sql2 = "SELECT ffd.tva_tx AS vatrate,";
|
||||
$sql2 .= " ffd.product_type AS product_type,";
|
||||
@@ -380,10 +380,10 @@ if ($resql2) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($obj->$monthj) . '</td>';
|
||||
$totalpermonth[$j]=(empty($totalpermonth[$j])?0:$totalpermonth[$j])+$obj->$monthj;
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($obj->total) . '</b></td>';
|
||||
$totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
|
||||
print '</tr>';
|
||||
}
|
||||
@@ -397,9 +397,9 @@ if ($resql2) {
|
||||
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
|
||||
if ($j > 12) $j -= 12;
|
||||
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT);
|
||||
print '<td align="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
print '<td class="right" width="6%">' . price($totalpermonth[$j]) . '</td>';
|
||||
}
|
||||
print '<td align="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '<td class="right" width="6%"><b>' . price($totalpermonth['total']) . '</b></td>';
|
||||
print '</tr>';
|
||||
} else {
|
||||
print $db->lasterror(); // Show last sql error
|
||||
|
||||
@@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES')
|
||||
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
|
||||
print '</td>';
|
||||
|
||||
print '<td colspan="5" align="right">';
|
||||
print '<td colspan="5" class="right">';
|
||||
print '<input type="image" class="liste_titre" name="button_search" src="'.img_picto($langs->trans("Search"), 'search.png', '', '', 1).'" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
@@ -337,7 +337,7 @@ print_liste_field_titre(
|
||||
"qty",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -347,7 +347,7 @@ print_liste_field_titre(
|
||||
"qty",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -356,8 +356,8 @@ print_liste_field_titre(
|
||||
$_SERVER["PHP_SELF"],
|
||||
"amount",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
$classslink,
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -367,7 +367,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -377,7 +377,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -400,15 +400,15 @@ print_liste_field_titre(
|
||||
print "</td>\n";
|
||||
|
||||
// Quantity
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $qty[$key];
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
@@ -419,7 +419,7 @@ print_liste_field_titre(
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
/*if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
|
||||
} else {
|
||||
@@ -430,7 +430,7 @@ print_liste_field_titre(
|
||||
print '</td>';
|
||||
|
||||
// Percent;
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// TODO: statistics?
|
||||
|
||||
@@ -441,11 +441,11 @@ print_liste_field_titre(
|
||||
// Total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td>'.$langs->trans("Total").'</td>';
|
||||
print '<td align="right">'.$qtytotal.'</td>';
|
||||
print '<td align="right">100%</td>';
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td align="right">100%</td>';
|
||||
print '<td class="right">'.$qtytotal.'</td>';
|
||||
print '<td class="right">100%</td>';
|
||||
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||
print '<td class="right">'.price($catotal).'</td>';
|
||||
print '<td class="right">100%</td>';
|
||||
print '</tr>';
|
||||
|
||||
$db->free($result);
|
||||
|
||||
@@ -310,7 +310,7 @@ if ($modecompta == 'CREANCES-DETTES') {
|
||||
"amount_ht",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -323,7 +323,7 @@ print_liste_field_titre(
|
||||
"amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -332,7 +332,7 @@ print_liste_field_titre(
|
||||
$_SERVER["PHP_SELF"], "amount_ttc",
|
||||
"",
|
||||
$paramslink,
|
||||
'align="right"',
|
||||
'class="right"',
|
||||
$sortfield,
|
||||
$sortorder
|
||||
);
|
||||
@@ -391,7 +391,7 @@ if (count($amount)) {
|
||||
print "<td>".$linkname."</td>\n";
|
||||
|
||||
// Amount w/o VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES')
|
||||
{
|
||||
if ($key > 0) {
|
||||
@@ -410,7 +410,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Amount with VAT
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
if ($key > 0) {
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
|
||||
@@ -428,7 +428,7 @@ if (count($amount)) {
|
||||
print '</td>';
|
||||
|
||||
// Percent
|
||||
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : ' ').'</td>';
|
||||
|
||||
// Other stats
|
||||
print '<td align="center">';
|
||||
@@ -452,9 +452,9 @@ if (count($amount)) {
|
||||
if ($modecompta != 'CREANCES-DETTES') {
|
||||
print '<td colspan="1"></td>';
|
||||
} else {
|
||||
print '<td align="right">'.price($catotal_ht).'</td>';
|
||||
print '<td class="right">'.price($catotal_ht).'</td>';
|
||||
}
|
||||
print '<td align="right">'.price($catotal).'</td>';
|
||||
print '<td class="right">'.price($catotal).'</td>';
|
||||
print '<td> </td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
|
||||
Reference in New Issue
Block a user