2
0
forked from Wavyzz/dolibarr

update with html5 compliant code

This commit is contained in:
Philippe GRAND
2019-02-12 14:56:38 +01:00
parent fd6eaf8c3d
commit 5007ef82c8
3 changed files with 37 additions and 37 deletions

View File

@@ -257,10 +257,10 @@ while($i < 12)
{ {
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; 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++; $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 = "SELECT fd.tva_tx AS vatrate,";
$sql .= " fd.product_type AS product_type,"; $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); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); $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; $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; $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
print '</tr>'; print '</tr>';
} }
@@ -318,9 +318,9 @@ if ($resql) {
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); $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>'; print '</tr>';
} else { } else {
print $db->lasterror(); // Show last sql error 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); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; 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++; $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 = "SELECT ffd.tva_tx AS vatrate,";
$sql2 .= " ffd.product_type AS product_type,"; $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); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); $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; $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; $totalpermonth['total']=(empty($totalpermonth['total'])?0:$totalpermonth['total'])+$obj->total;
print '</tr>'; print '</tr>';
} }
@@ -397,9 +397,9 @@ if ($resql2) {
$j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START); $j = $i + (empty($conf->global->SOCIETE_FISCAL_MONTH_START)?1:$conf->global->SOCIETE_FISCAL_MONTH_START);
if ($j > 12) $j -= 12; if ($j > 12) $j -= 12;
$monthj = 'month'.str_pad($j, 2, '0', STR_PAD_LEFT); $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>'; print '</tr>';
} else { } else {
print $db->lasterror(); // Show last sql error print $db->lasterror(); // Show last sql error

View File

@@ -315,7 +315,7 @@ if ($modecompta == 'CREANCES-DETTES')
$form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1); $form->select_type_of_lines(isset($selected_type)?$selected_type:-1, 'search_type', 1, 1, 1);
print '</td>'; 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 '<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>'; print '</td></tr>';
@@ -337,7 +337,7 @@ print_liste_field_titre(
"qty", "qty",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -347,7 +347,7 @@ print_liste_field_titre(
"qty", "qty",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -356,8 +356,8 @@ print_liste_field_titre(
$_SERVER["PHP_SELF"], $_SERVER["PHP_SELF"],
"amount", "amount",
"", "",
$paramslink, $classslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -367,7 +367,7 @@ print_liste_field_titre(
"amount_ttc", "amount_ttc",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -377,7 +377,7 @@ print_liste_field_titre(
"amount_ttc", "amount_ttc",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -400,15 +400,15 @@ print_liste_field_titre(
print "</td>\n"; print "</td>\n";
// Quantity // Quantity
print '<td align="right">'; print '<td class="right">';
print $qty[$key]; print $qty[$key];
print '</td>'; print '</td>';
// Percent; // Percent;
print '<td align="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : '&nbsp;').'</td>'; print '<td class="right">'.($qtytotal > 0 ? round(100 * $qty[$key] / $qtytotal, 2).'%' : '&nbsp;').'</td>';
// Amount w/o VAT // Amount w/o VAT
print '<td align="right">'; print '<td class="right">';
/*if ($key > 0) { /*if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">'; print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else { } else {
@@ -419,7 +419,7 @@ print_liste_field_titre(
print '</td>'; print '</td>';
// Amount with VAT // Amount with VAT
print '<td align="right">'; print '<td class="right">';
/*if ($key > 0) { /*if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">'; print '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?productid='.$key.'">';
} else { } else {
@@ -430,7 +430,7 @@ print_liste_field_titre(
print '</td>'; print '</td>';
// Percent; // Percent;
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>'; print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
// TODO: statistics? // TODO: statistics?
@@ -441,11 +441,11 @@ print_liste_field_titre(
// Total // Total
print '<tr class="liste_total">'; print '<tr class="liste_total">';
print '<td>'.$langs->trans("Total").'</td>'; print '<td>'.$langs->trans("Total").'</td>';
print '<td align="right">'.$qtytotal.'</td>'; print '<td class="right">'.$qtytotal.'</td>';
print '<td align="right">100%</td>'; print '<td class="right">100%</td>';
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 align="right">100%</td>'; print '<td class="right">100%</td>';
print '</tr>'; print '</tr>';
$db->free($result); $db->free($result);

View File

@@ -310,7 +310,7 @@ if ($modecompta == 'CREANCES-DETTES') {
"amount_ht", "amount_ht",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -323,7 +323,7 @@ print_liste_field_titre(
"amount_ttc", "amount_ttc",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -332,7 +332,7 @@ print_liste_field_titre(
$_SERVER["PHP_SELF"], "amount_ttc", $_SERVER["PHP_SELF"], "amount_ttc",
"", "",
$paramslink, $paramslink,
'align="right"', 'class="right"',
$sortfield, $sortfield,
$sortorder $sortorder
); );
@@ -391,7 +391,7 @@ if (count($amount)) {
print "<td>".$linkname."</td>\n"; print "<td>".$linkname."</td>\n";
// Amount w/o VAT // Amount w/o VAT
print '<td align="right">'; print '<td class="right">';
if ($modecompta != 'CREANCES-DETTES') if ($modecompta != 'CREANCES-DETTES')
{ {
if ($key > 0) { if ($key > 0) {
@@ -410,7 +410,7 @@ if (count($amount)) {
print '</td>'; print '</td>';
// Amount with VAT // Amount with VAT
print '<td align="right">'; print '<td class="right">';
if ($modecompta != 'CREANCES-DETTES') { if ($modecompta != 'CREANCES-DETTES') {
if ($key > 0) { if ($key > 0) {
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">'; print '<a href="'.DOL_URL_ROOT.'/compta/paiement/list.php?userid='.$key.'">';
@@ -428,7 +428,7 @@ if (count($amount)) {
print '</td>'; print '</td>';
// Percent // Percent
print '<td align="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>'; print '<td class="right">'.($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2).'%' : '&nbsp;').'</td>';
// Other stats // Other stats
print '<td align="center">'; print '<td align="center">';
@@ -452,9 +452,9 @@ if (count($amount)) {
if ($modecompta != 'CREANCES-DETTES') { if ($modecompta != 'CREANCES-DETTES') {
print '<td colspan="1"></td>'; print '<td colspan="1"></td>';
} else { } 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>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '</tr>'; print '</tr>';