Merge pull request #5064 from aspangaro/4.0-p21
FIX: Accountancy - Road to stable version
This commit is contained in:
commit
7e047ada2b
@ -43,7 +43,9 @@ $search_pcgtype = GETPOST("search_pcgtype");
|
||||
$search_pcgsubtype = GETPOST("search_pcgsubtype");
|
||||
|
||||
// Security check
|
||||
if (! $user->admin)
|
||||
if ($user->societe_id > 0)
|
||||
accessforbidden();
|
||||
if (! $user->rights->accounting->chartofaccount)
|
||||
accessforbidden();
|
||||
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
@ -145,8 +147,8 @@ if ($result) {
|
||||
print '<br/>';
|
||||
|
||||
print '<a class="butAction" href="./card.php?action=create">' . $langs->trans("Addanaccount") . '</a>';
|
||||
print '<a class="butAction" href="./importaccounts.php">' . $langs->trans("ImportAccount") . '</a>';
|
||||
print '<a class="butAction" href="./productaccount.php">' . $langs->trans("CheckProductAccountancyCode") . '</a>';
|
||||
// print '<a class="butAction" href="./importaccounts.php">' . $langs->trans("ImportAccount") . '</a>';
|
||||
// print '<a class="butAction" href="./productaccount.php">' . $langs->trans("CheckProductAccountancyCode") . '</a>';
|
||||
print '<br/><br/>';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -50,12 +50,14 @@ $main_option = array (
|
||||
|
||||
$model_option = array (
|
||||
'ACCOUNTING_EXPORT_SEPARATORCSV',
|
||||
'ACCOUNTING_EXPORT_DATE',
|
||||
'ACCOUNTING_EXPORT_DATE'
|
||||
/*
|
||||
'ACCOUNTING_EXPORT_PIECE',
|
||||
'ACCOUNTING_EXPORT_GLOBAL_ACCOUNT',
|
||||
'ACCOUNTING_EXPORT_LABEL',
|
||||
'ACCOUNTING_EXPORT_AMOUNT',
|
||||
'ACCOUNTING_EXPORT_DEVISE'
|
||||
'ACCOUNTING_EXPORT_DEVISE'
|
||||
*/
|
||||
);
|
||||
|
||||
/*
|
||||
|
||||
@ -385,7 +385,7 @@ else {
|
||||
print_liste_field_titre($langs->trans("Labelcompte"), $_SERVER['PHP_SELF'], "bk_label_compte", "", $options, "", $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Debit"), $_SERVER['PHP_SELF'], "t.debit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Credit"), $_SERVER['PHP_SELF'], "t.credit", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="right"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Codejournal"), $_SERVER['PHP_SELF'], "t.code_journal", "", $options, 'align="center"', $sortfield, $sortorder);
|
||||
print_liste_field_titre($langs->trans("Action"), $_SERVER["PHP_SELF"], "", $options, "", 'width="60" align="center"', $sortfield, $sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
@ -396,7 +396,7 @@ else {
|
||||
print $langs->trans('From') . ': ';
|
||||
print $form->select_date($search_date_start, 'date_start', 0, 0, 1);
|
||||
print '<br>';
|
||||
print $langs->trans('To') . ': ';
|
||||
print $langs->trans('to') . ': ';
|
||||
print $form->select_date($search_date_end, 'date_end', 0, 0, 1);
|
||||
print '</td>';
|
||||
print '<td><input type="text" name="search_doc_ref" size="8" value="' . $search_doc_ref . '"></td>';
|
||||
@ -404,14 +404,14 @@ else {
|
||||
print $langs->trans('From');
|
||||
print $formventilation->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array (), 1, 1, '');
|
||||
print '<br>';
|
||||
print $langs->trans('To');
|
||||
print $langs->trans('to');
|
||||
print $formventilation->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array (), 1, 1, '');
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print $langs->trans('From');
|
||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1);
|
||||
print '<br>';
|
||||
print $langs->trans('To');
|
||||
print $langs->trans('to');
|
||||
print $formventilation->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1);
|
||||
print '</td>';
|
||||
|
||||
@ -450,7 +450,7 @@ else {
|
||||
print '<td>' . $line->label_compte . '</td>';
|
||||
print '<td align="right">' . price($line->debit) . '</td>';
|
||||
print '<td align="right">' . price($line->credit) . '</td>';
|
||||
print '<td align="right">' . $line->code_journal . '</td>';
|
||||
print '<td align="center">' . $line->code_journal . '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="./card.php?piece_num=' . $line->piece_num . '">' . img_edit() . '</a> ';
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=delmouv&mvt_num=' . $line->piece_num . $options . '&page=' . $page . '">' . img_delete() . '</a>';
|
||||
|
||||
@ -67,7 +67,7 @@ class FormAccounting
|
||||
$sql = "SELECT c.rowid, c.label as type, c.range_account";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c";
|
||||
$sql.= " WHERE c.active = 1";
|
||||
$sql.= " AND c.account_type = 0";
|
||||
$sql.= " AND c.category_type = 0";
|
||||
$sql.= " AND c.fk_country = ".$mysoc->country_id;
|
||||
$sql.= " ORDER BY c.label ASC";
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2014 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2015 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2013-2016 Alexandre Spangaro <aspangaro.dolibarr@gmail.com>
|
||||
* Copyright (C) 2014 Ari Elbaz (elarifr) <github@accedinfo.com>
|
||||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
*
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/modAccounting.class.php
|
||||
* \ingroup Accounting Expert
|
||||
* \ingroup Advanced accountancy
|
||||
* \brief Module to activate Accounting Expert module
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
@ -157,16 +157,19 @@ class modAccounting extends DolibarrModules
|
||||
"yesno",
|
||||
"1"
|
||||
);
|
||||
/*
|
||||
$this->const[15] = array (
|
||||
"ACCOUNTING_GROUPBYACCOUNT",
|
||||
"yesno",
|
||||
"1"
|
||||
);
|
||||
*/
|
||||
$this->const[16] = array (
|
||||
"ACCOUNTING_EXPORT_DATE",
|
||||
"chaine",
|
||||
"%d%m%Y"
|
||||
);
|
||||
/*
|
||||
$this->const[17] = array (
|
||||
"ACCOUNTING_EXPORT_PIECE",
|
||||
"yesno",
|
||||
@ -192,6 +195,7 @@ class modAccounting extends DolibarrModules
|
||||
"yesno",
|
||||
"1"
|
||||
);
|
||||
*/
|
||||
$this->const[22] = array(
|
||||
"ACCOUNTING_EXPENSEREPORT_JOURNAL",
|
||||
"chaine",
|
||||
|
||||
@ -365,7 +365,7 @@ CREATE TABLE llx_c_accounting_category (
|
||||
|
||||
ALTER TABLE llx_c_accounting_category ADD UNIQUE INDEX uk_c_accounting_category(code);
|
||||
UPDATE llx_accounting_account SET account_parent = '0' WHERE account_parent = '';
|
||||
ALTER TABLE llx_accounting_account MODIFY COLUMN account_parent integer;
|
||||
ALTER TABLE llx_accounting_account MODIFY COLUMN account_parent integer DEFAULT 0;
|
||||
|
||||
|
||||
DROP INDEX uk_bordereau_cheque ON llx_bordereau_cheque;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user