clean and update code
This commit is contained in:
parent
ed087161f4
commit
ecda8bf55d
@ -29,11 +29,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
|
||||
// langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("compta","bills","main","accountancy"));
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
@ -141,7 +138,6 @@ if ($result) {
|
||||
$form = new Form($db);
|
||||
$formaccounting = new FormAccounting($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
@ -35,12 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("companies");
|
||||
$langs->load("compta");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("products");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("companies","compta","main","accountancy","products"));
|
||||
|
||||
// Security check
|
||||
if (empty($conf->accounting->enabled)) {
|
||||
@ -360,7 +356,6 @@ if ($result)
|
||||
|
||||
$product_static = new Product($db);
|
||||
|
||||
$var = true;
|
||||
$i=0;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
|
||||
@ -30,12 +30,8 @@ require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("main");
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("accountancy");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","main","accountancy","other"));
|
||||
|
||||
// Filter
|
||||
$year = GETPOST("year",'int');
|
||||
@ -75,8 +71,6 @@ if ($result) {
|
||||
|
||||
$y = $year_current;
|
||||
|
||||
$var = true;
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width=150>' . $langs->trans("Label") . '</td><td align="center">' . $langs->trans("JanuaryMin") . '</td><td align="center">' . $langs->trans("FebruaryMin") . '</td><td align="center">' . $langs->trans("MarchMin") . '</td><td align="center">' . $langs->trans("AprilMin") . '</td><td align="center">' . $langs->trans("MayMin") . '</td><td align="center">' . $langs->trans("JuneMin") . '</td><td align="center">' . $langs->trans("JulyMin") . '</td><td align="center">' . $langs->trans("AugustMin") . '</td><td align="center">' . $langs->trans("SeptemberMin") . '</td><td align="center">' . $langs->trans("OctoberMin") . '</td><td align="center">' . $langs->trans("NovemberMin") . '</td><td align="center">' . $langs->trans("DecemberMin") . '</td><td align="center"><b>Total</b></td></tr>';
|
||||
|
||||
@ -108,7 +102,7 @@ if ($resql) {
|
||||
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<tr class="oddeven"><td width="14%">' . length_accountg($row[0]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[1]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[2]) . '</td>';
|
||||
print '<td align="right" width="6.5%">' . price($row[3]) . '</td>';
|
||||
|
||||
@ -36,13 +36,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","main","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -384,7 +379,6 @@ if ($result) {
|
||||
$product_static = new Product($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
@ -35,14 +35,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("trips");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","main","accountancy","other","trips","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -345,7 +339,6 @@ if ($result) {
|
||||
$expensereport_static = new ExpenseReport($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
@ -36,13 +36,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||
|
||||
// Langs
|
||||
$langs->load("compta");
|
||||
$langs->load("bills");
|
||||
$langs->load("other");
|
||||
$langs->load("main");
|
||||
$langs->load("accountancy");
|
||||
$langs->load("productbatch");
|
||||
// Load traductions files requiredby by page
|
||||
$langs->loadLangs(array("bills","compta","main","accountancy","other","productbatch"));
|
||||
|
||||
$action=GETPOST('action','alpha');
|
||||
$massaction=GETPOST('massaction','alpha');
|
||||
@ -385,7 +380,6 @@ if ($result) {
|
||||
$productfourn_static = new ProductFournisseur($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$var = true;
|
||||
while ( $i < min($num_lines, $limit) ) {
|
||||
$objp = $db->fetch_object($result);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user