Uniformize code

This commit is contained in:
Laurent Destailleur 2015-03-10 19:31:04 +01:00
parent b4a8f19696
commit 548e720ca2
3 changed files with 20 additions and 21 deletions

View File

@ -2003,8 +2003,7 @@ if ($action == 'create')
// Amount HT
print '<tr><td height="10" width="25%">' . $langs->trans('AmountHT') . '</td>';
print '<td align="right" class="nowrap"><b>' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</b></td>';
print '<td></td>';
print '<td align="right" class="nowrap" colspan="2"><b>' . price($object->total_ht, '', $langs, 0, - 1, - 1, $conf->currency) . '</b></td>';
// Margin Infos
if (! empty($conf->margin->enabled)) {
@ -2016,27 +2015,27 @@ if ($action == 'create')
// Amount VAT
print '<tr><td height="10">' . $langs->trans('AmountVAT') . '</td>';
print '<td align="right" class="nowrap">' . price($object->total_tva, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td></td></tr>';
print '<td align="right" 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">' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td align="right" 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">' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td></td></tr>';
print '<td align="right" 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">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '<td></td></tr>';
print '<td align="right" class="nowrap" colspan="2">' . price($object->total_ttc, '', $langs, 0, - 1, - 1, $conf->currency) . '</td>';
print '</tr>';
// Statut
print '<tr><td height="10">' . $langs->trans('Status') . '</td><td align="left" colspan="2">' . $object->getLibStatut(4) . '</td></tr>';

View File

@ -65,7 +65,7 @@ if (empty($reshook) && ! empty($extrafields->attribute_label))
print '<td align="right"><a href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&action=edit_extras&attribute=' . $key . '">' . img_edit().'</a></td>';
print '</tr></table>';
print '<td colspan="5">';
print '<td colspan="'.$cols.'">';
// Convert date into timestamp format
if (in_array($extrafields->attribute_type[$key], array('date','datetime'))) {

View File

@ -1947,28 +1947,28 @@ elseif (! empty($object->id))
// Ligne de 3 colonnes
print '<tr><td>'.$langs->trans("AmountHT").'</td>';
print '<td align="right"><b>'.price($object->total_ht).'</b></td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<td colspan="2">'.price($object->total_ht,'',$langs,1,-1,-1,$conf->currency).'</td>';
print '</tr>';
print '<tr><td>'.$langs->trans("AmountVAT").'</td><td align="right">'.price($object->total_tva).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans("AmountVAT").'</td><td colspan="2">'.price($object->total_tva,'',$langs,1,-1,-1,$conf->currency).'</td>';
print '</tr>';
// Amount Local Taxes
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>';
print '<td colspan="2">'.price($object->total_localtax1,'',$langs,1,-1,-1,$conf->currency).'</td>';
print '</tr>';
}
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>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<td colspan="2">'.price($object->total_localtax2,'',$langs,1,-1,-1,$conf->currency).'</td>';
print '</tr>';
}
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td align="right">'.price($object->total_ttc).'</td>';
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
print '<tr><td>'.$langs->trans("AmountTTC").'</td><td colspan="2">'.price($object->total_ttc,'',$langs,1,-1,-1,$conf->currency).'</td>';
print '</tr>';
print "</table><br>";
@ -2610,7 +2610,7 @@ elseif (! empty($object->id))
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&amp;action=reopen">'.$langs->trans("ReOpen").'</a>';
}
}
// Create bill
if (! empty($conf->fournisseur->enabled) && $object->statut >= 2) // 2 means accepted
{