Skip to content
Snippets Groups Projects
Commit ccd7100b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Minor code fix

parent 78c0945f
No related branches found
No related tags found
No related merge requests found
......@@ -171,9 +171,9 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
......@@ -220,9 +220,9 @@ print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("TotalVente") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,";
for($i = 1; $i <= 12; $i ++) {
......@@ -264,9 +264,9 @@ if (! empty($conf->margin->enabled)) {
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400">' . $langs->trans("TotalMarge") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,";
for($i = 1; $i <= 12; $i ++) {
......@@ -291,9 +291,9 @@ if (! empty($conf->margin->enabled)) {
print '<tr><td>' . $row[0] . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td align="right">' . price($row[$i]) . '</td>';
print '<td align="right">' . price(price2num($row[$i])) . '</td>';
}
print '<td align="right"><b>' . price($row[13]) . '</b></td>';
print '<td align="right"><b>' . price(price2num($row[13])) . '</b></td>';
print '</tr>';
}
$db->free($resql);
......
......@@ -87,6 +87,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
$formventilation = new FormVentilation($db);
/*
* Actions
*/
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
......@@ -148,10 +153,6 @@ print '<script type="text/javascript">
});
</script>';
/*
* Action
*/
/*
* Customer Invoice lines
*/
......@@ -251,7 +252,7 @@ if ($result) {
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account($account_parent, 'account_parent', 1);
print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '"/></div>';
print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '"/></div>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.facnumber", "", $param, '', $sortfield, $sortorder);
......
......@@ -103,9 +103,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) {
$search_vat = '';
}
/*
* View
*/
llxHeader('', $langs->trans("Ventilation"));
print '<script type="text/javascript">
......
......@@ -155,9 +155,9 @@ print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="200" align="left">' . $langs->trans("Account") . '</td>';
print '<td width="200" align="left">' . $langs->trans("Label") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') ." AS codecomptable,";
$sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,";
......@@ -205,9 +205,9 @@ print "<br>\n";
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre"><td width="400" align="left">' . $langs->trans("Total") . '</td>';
for($i = 1; $i <= 12; $i ++) {
print '<td width="60" align="center">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
print '<td width="60" align="right">' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . '</td>';
}
print '<td width="60" align="center"><b>' . $langs->trans("Total") . '</b></td></tr>';
print '<td width="60" align="right"><b>' . $langs->trans("Total") . '</b></td></tr>';
$sql = "SELECT '" . $langs->trans("CAHTF") . "' AS label,";
for($i = 1; $i <= 12; $i ++) {
......
......@@ -85,6 +85,11 @@ if (! $user->rights->accounting->ventilation->dispatch)
$formventilation = new FormVentilation($db);
/*
* Actions
*/
// Purge search criteria
if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
{
......@@ -121,6 +126,7 @@ if (is_array($changeaccount) && count($changeaccount) > 0) {
}
}
/*
* View
*/
......@@ -198,7 +204,7 @@ if ($result) {
print '<br><div class="inline-block divButAction">' . $langs->trans("ChangeAccount") . '<br>';
print $formventilation->select_account(GETPOST('account_parent'), 'account_parent', 1);
print '<input type="submit" class="butAction" value="' . $langs->trans("Validate") . '" /></div>';
print '<input type="submit" class="button" value="' . $langs->trans("Validate") . '" /></div>';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Invoice"), $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
......
......@@ -54,7 +54,8 @@ create table llx_facturedet
buy_price_ht double(24,8) DEFAULT 0, -- buying price
fk_product_fournisseur_price integer DEFAULT NULL, -- reference of supplier price when line was added (may be used to update buy_price_ht current price when future invoice will be created)
fk_code_ventilation integer DEFAULT 0 NOT NULL,
fk_code_ventilation integer DEFAULT 0 NOT NULL, -- Id in table llx_accounting_bookeeping to know accounting account for product line
special_code integer DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0, -- position of line
fk_contract_line integer NULL, -- id of contract line when invoice comes from contract lines
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment