mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Debug accountancy module
This commit is contained in:
@@ -38,8 +38,10 @@ $langs->load("admin");
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
accessforbidden();
|
{
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
@@ -135,31 +137,14 @@ $var = true;
|
|||||||
/*
|
/*
|
||||||
* Main Options
|
* Main Options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('MainOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('Options') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
|
||||||
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
|
||||||
if (! $conf->use_javascript_ajax) {
|
|
||||||
print '<td class="nowrap">';
|
|
||||||
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
|
||||||
print "</td>";
|
|
||||||
} else {
|
|
||||||
print '<td>';
|
|
||||||
$listformat = array (
|
|
||||||
'csv' => $langs->trans("csv"),
|
|
||||||
'txt' => $langs->trans("txt")
|
|
||||||
);
|
|
||||||
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
|
|
||||||
|
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
print "</td></tr>";
|
|
||||||
|
|
||||||
$num = count($main_option);
|
$num = count($main_option);
|
||||||
if ($num) {
|
if ($num) {
|
||||||
foreach ( $main_option as $key ) {
|
foreach ( $main_option as $key ) {
|
||||||
@@ -221,8 +206,29 @@ if ($num2) {
|
|||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
if ($conf->global->ACCOUNTING_EXPORT_MODELCSV > 1)
|
||||||
|
{
|
||||||
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
print '<tr><td colspan="2" bgcolor="red"><b>' . $langs->trans('OptionsDeactivatedForThisExportModel') . '</b></td></tr>';
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print '<td width="50%">' . $langs->trans("Selectformat") . '</td>';
|
||||||
|
if (! $conf->use_javascript_ajax) {
|
||||||
|
print '<td class="nowrap">';
|
||||||
|
print $langs->trans("NotAvailableWhenAjaxDisabled");
|
||||||
|
print "</td>";
|
||||||
|
} else {
|
||||||
|
print '<td>';
|
||||||
|
$listformat = array (
|
||||||
|
'csv' => $langs->trans("csv"),
|
||||||
|
'txt' => $langs->trans("txt")
|
||||||
|
);
|
||||||
|
print $form->selectarray("format", $listformat, $conf->global->ACCOUNTING_EXPORT_FORMAT, 0);
|
||||||
|
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
print "</td></tr>";
|
||||||
|
|
||||||
foreach ( $model_option as $key ) {
|
foreach ( $model_option as $key ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
|
|||||||
@@ -41,8 +41,10 @@ $langs->load("accountancy");
|
|||||||
$langs->load("salaries");
|
$langs->load("salaries");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
|
{
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
@@ -51,6 +53,7 @@ $list = array (
|
|||||||
'ACCOUNTING_LIMIT_LIST_VENTILATION',
|
'ACCOUNTING_LIMIT_LIST_VENTILATION',
|
||||||
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc
|
||||||
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc
|
||||||
|
'ACCOUNTING_MANAGE_ZERO',
|
||||||
'ACCOUNTING_LENGTH_GACCOUNT',
|
'ACCOUNTING_LENGTH_GACCOUNT',
|
||||||
'ACCOUNTING_LENGTH_AACCOUNT'
|
'ACCOUNTING_LENGTH_AACCOUNT'
|
||||||
);
|
);
|
||||||
@@ -71,6 +74,7 @@ $list_account = array (
|
|||||||
'DONATION_ACCOUNTINGACCOUNT'
|
'DONATION_ACCOUNTINGACCOUNT'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@@ -180,6 +184,7 @@ if ($action == 'setdisabledirectinput') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@@ -200,173 +205,193 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
|
|
||||||
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
|
dol_fiche_head($head, 'general', $langs->trans("Configuration"), 0, 'cron');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
if (! empty($user->admin))
|
||||||
|
{
|
||||||
// Cas du parametre ACCOUNTING_MODE
|
print '<table class="noborder" width="100%">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
// Cas du parametre ACCOUNTING_MODE
|
||||||
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
|
||||||
print "</tr>\n";
|
print '<tr class="liste_titre">';
|
||||||
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
|
print '<td>' . $langs->trans('OptionMode') . '</td><td>' . $langs->trans('Description') . '</td>';
|
||||||
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
print "</tr>\n";
|
||||||
// Write info on way to count VAT
|
print '<tr ' . $bc[false] . '><td width="200"><input type="radio" name="accounting_mode" value="RECETTES-DEPENSES"' . ($accounting_mode != 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeTrue') . '</td>';
|
||||||
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
print '<td colspan="2">' . nl2br($langs->trans('OptionModeTrueDesc'));
|
||||||
// {
|
// Write info on way to count VAT
|
||||||
// // print "<br>\n";
|
// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE))
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
// {
|
||||||
// }
|
// // print "<br>\n";
|
||||||
// else
|
// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite'));
|
||||||
// {
|
// }
|
||||||
// // print "<br>\n";
|
// else
|
||||||
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
// {
|
||||||
// }
|
// // print "<br>\n";
|
||||||
print "</td></tr>\n";
|
// // print nl2br($langs->trans('OptionModeTrueInfoExpert'));
|
||||||
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
|
// }
|
||||||
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
print '<tr ' . $bc[true] . '><td width="200"><input type="radio" name="accounting_mode" value="CREANCES-DETTES"' . ($accounting_mode == 'CREANCES-DETTES' ? ' checked' : '') . '> ' . $langs->trans('OptionModeVirtual') . '</td>';
|
||||||
print "</table>\n";
|
print '<td colspan="2">' . nl2br($langs->trans('OptionModeVirtualDesc')) . "</td></tr>\n";
|
||||||
|
|
||||||
print "<br>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Define Chart of accounts
|
* Define Chart of accounts
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" width="100%">';
|
if (! empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
$var = true;
|
{
|
||||||
|
print '<table class="noborder" width="100%">';
|
||||||
|
$var = true;
|
||||||
|
|
||||||
|
print '<tr class="liste_titre">';
|
||||||
|
print '<td colspan="3">';
|
||||||
|
print $langs->trans("Chartofaccounts") . '</td>';
|
||||||
|
print "</tr>\n";
|
||||||
|
$var = ! $var;
|
||||||
|
print '<tr ' . $bc[$var] . '>';
|
||||||
|
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
||||||
|
print "<td>";
|
||||||
|
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
||||||
|
|
||||||
|
$sql = "SELECT rowid, pcg_version, label, active";
|
||||||
|
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
||||||
|
$sql .= " WHERE active = 1";
|
||||||
|
|
||||||
|
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
||||||
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
|
$var = true;
|
||||||
|
|
||||||
|
if ($resql) {
|
||||||
|
$num = $db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
while ( $i < $num ) {
|
||||||
|
$var = ! $var;
|
||||||
|
$row = $db->fetch_row($resql);
|
||||||
|
|
||||||
|
print '<option value="' . $row[0] . '"';
|
||||||
|
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
||||||
|
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
||||||
|
|
||||||
|
$i ++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
print "</select>";
|
||||||
|
print "</td></tr>";
|
||||||
|
print "</table>";
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print "<br>\n";
|
||||||
print '<td colspan="3">';
|
|
||||||
print $langs->trans("Chartofaccounts") . '</td>';
|
|
||||||
print "</tr>\n";
|
|
||||||
$var = ! $var;
|
|
||||||
print '<tr ' . $bc[$var] . '>';
|
|
||||||
print "<td>" . $langs->trans("Selectchartofaccounts") . "</td>";
|
|
||||||
print "<td>";
|
|
||||||
print '<select class="flat" name="chartofaccounts" id="chartofaccounts">';
|
|
||||||
|
|
||||||
$sql = "SELECT rowid, pcg_version, label, active";
|
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_system";
|
|
||||||
$sql .= " WHERE active = 1";
|
|
||||||
|
|
||||||
dol_syslog('accountancy/admin/index.php:: $sql=' . $sql);
|
|
||||||
$resql = $db->query($sql);
|
|
||||||
|
|
||||||
$var = true;
|
|
||||||
|
|
||||||
if ($resql) {
|
|
||||||
$num = $db->num_rows($resql);
|
|
||||||
$i = 0;
|
|
||||||
while ( $i < $num ) {
|
|
||||||
$var = ! $var;
|
|
||||||
$row = $db->fetch_row($resql);
|
|
||||||
|
|
||||||
print '<option value="' . $row[0] . '"';
|
|
||||||
print $conf->global->CHARTOFACCOUNTS == $row[0] ? ' selected' : '';
|
|
||||||
print '>' . $row[1] . ' - ' . $row[2] . '</option>';
|
|
||||||
|
|
||||||
$i ++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
print "</select>";
|
|
||||||
print "</td></tr>";
|
|
||||||
print "</table>";
|
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Others params
|
* Others params
|
||||||
*/
|
*/
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
print '<td colspan="3">' . $langs->trans('OtherOptions') . '</td>';
|
print '<td colspan="2">' . $langs->trans('OtherOptions') . '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
foreach ( $list as $key ) {
|
if (! empty($user->admin))
|
||||||
$var = ! $var;
|
{
|
||||||
|
// TO DO Mutualize code for yes/no constants
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
// Param
|
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
||||||
$label = $langs->trans($key);
|
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
// Value
|
print '</a></td>';
|
||||||
print '<td>';
|
} else {
|
||||||
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
||||||
print '</td></tr>';
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
||||||
|
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ( $list_account as $key ) {
|
// Param a user $user->rights->accountancy->chartofaccount can access
|
||||||
$var = ! $var;
|
if (! empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
|
{
|
||||||
print '<tr ' . $bc[$var] . ' class="value">';
|
foreach ( $list as $key ) {
|
||||||
|
$var = ! $var;
|
||||||
// Param
|
|
||||||
$label = $langs->trans($key);
|
if ($key != 'ACCOUNTING_MANAGE_ZERO')
|
||||||
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
{
|
||||||
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
// Value
|
|
||||||
print '<td>';
|
// Param
|
||||||
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
$label = $langs->trans($key);
|
||||||
print '</td></tr>';
|
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
||||||
}
|
|
||||||
|
// Value
|
||||||
|
print '<td>';
|
||||||
|
print '<input type="text" size="20" id="' . $key . '" name="' . $key . '" value="' . $conf->global->$key . '">';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
if ($key == 'ACCOUNTING_MANAGE_ZERO')
|
||||||
|
{
|
||||||
|
$var = ! $var;
|
||||||
|
print "<tr " . $bc[$var] . ">";
|
||||||
|
print '<td>' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
||||||
|
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
||||||
|
print img_picto($langs->trans("Activated"), 'switch_on');
|
||||||
|
print '</a></td>';
|
||||||
|
} else {
|
||||||
|
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
||||||
|
print img_picto($langs->trans("Disabled"), 'switch_off');
|
||||||
|
print '</a></td>';
|
||||||
|
}
|
||||||
|
print '</tr>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TO DO Mutualize code for yes/no constants
|
foreach ( $list_account as $key ) {
|
||||||
$var = ! $var;
|
$var = ! $var;
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO") . '</td>';
|
print '<tr ' . $bc[$var] . ' class="value">';
|
||||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=0">';
|
// Param
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
$label = $langs->trans($key);
|
||||||
print '</a></td>';
|
print '<td><label for="' . $key . '">' . $label . '</label></td>';
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsorttodo&value=1">';
|
// Value
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
print '<td>';
|
||||||
print '</a></td>';
|
print $formaccountancy->select_account($conf->global->$key, $key, 1, '', 1, 1);
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE") . '</td>';
|
|
||||||
if (! empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setlistsortdone&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("ACCOUNTING_MANAGE_ZERO") . '</td>';
|
|
||||||
if (! empty($conf->global->ACCOUNTING_MANAGE_ZERO)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setmanagezero&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
$var = ! $var;
|
|
||||||
print "<tr " . $bc[$var] . ">";
|
|
||||||
print '<td width="80%">' . $langs->trans("BANK_DISABLE_DIRECT_INPUT") . '</td>';
|
|
||||||
if (! empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=0">';
|
|
||||||
print img_picto($langs->trans("Activated"), 'switch_on');
|
|
||||||
print '</a></td>';
|
|
||||||
} else {
|
|
||||||
print '<td align="center" colspan="2"><a href="' . $_SERVER['PHP_SELF'] . '?action=setdisabledirectinput&value=1">';
|
|
||||||
print img_picto($langs->trans("Disabled"), 'switch_off');
|
|
||||||
print '</a></td>';
|
|
||||||
}
|
|
||||||
print '</tr>';
|
|
||||||
|
|
||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,10 @@ require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
|
|||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (! $user->admin)
|
if (empty($user->admin) || ! empty($user->rights->accountancy->chartofaccount))
|
||||||
accessforbidden();
|
{
|
||||||
|
accessforbidden();
|
||||||
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'alpha');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ $langs->load("accountancy");
|
|||||||
if (empty($conf->accounting->enabled)) {
|
if (empty($conf->accounting->enabled)) {
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// search & action GETPOST
|
// search & action GETPOST
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ if ($action == 'delbookkeepingyearconfirm') {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessages("NothingDeleted", null, 'warnings');
|
setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,7 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
'default' => $deljournal
|
'default' => $deljournal
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250);
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ if ($action == 'delbookkeepingyear') {
|
|||||||
'default' => $delyear
|
'default' => $delyear
|
||||||
);
|
);
|
||||||
|
|
||||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1);
|
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, 0, 1, 250);
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if ($user->societe_id > 0)
|
|||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||||
if (! GETPOST('cancel', 'alpha')) {
|
if (! GETPOST('cancel', 'alpha')) {
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ if (empty($conf->accounting->enabled)) {
|
|||||||
}
|
}
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ if (! $sortorder) {
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ if (! $sortorder) {
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@@ -75,10 +75,6 @@ print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step,
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>');
|
|
||||||
print "<br>\n";
|
|
||||||
print "<br>\n";
|
|
||||||
$step++;
|
|
||||||
//$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
|
//$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Modules")."-".$langs->transnoentitiesnoconv("Accountancy").'</strong>';
|
||||||
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
|
$textlink='<strong>'.$langs->transnoentitiesnoconv("Home").'-'.$langs->transnoentitiesnoconv("MenuBankCash").'</strong>';
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, $textlink);
|
||||||
@@ -121,6 +117,9 @@ print '<hr>';
|
|||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
$step = 0;
|
$step = 0;
|
||||||
|
|
||||||
|
$step++;
|
||||||
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>')."<br>\n";
|
||||||
|
print "<br>\n";
|
||||||
$step++;
|
$step++;
|
||||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescCustomer", $step, '<strong>'.$langs->transnoentitiesnoconv("Financial").'-'.$langs->transnoentitiesnoconv("Accountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>')."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ $id = GETPOST('id');
|
|||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
if ($action == 'ventil' && $user->rights->accounting->ventilation->dispatch) {
|
if ($action == 'ventil' && $user->rights->accounting->bind->write) {
|
||||||
if (! GETPOST('cancel', 'alpha')) {
|
if (! GETPOST('cancel', 'alpha')) {
|
||||||
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
$sql = " UPDATE " . MAIN_DB_PREFIX . "facture_fourn_det";
|
||||||
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
$sql .= " SET fk_code_ventilation = " . $codeventil;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ if (empty($conf->accounting->enabled)) {
|
|||||||
}
|
}
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->read)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Filter
|
// Filter
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ if (! $sortorder) {
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ if (! $sortorder) {
|
|||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
if (! $user->rights->accounting->ventilation->dispatch)
|
if (! $user->rights->accounting->bind->write)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$formventilation = new FormVentilation($db);
|
$formventilation = new FormVentilation($db);
|
||||||
|
|||||||
@@ -1693,7 +1693,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu
|
|||||||
// Wrapping for accounting exports
|
// Wrapping for accounting exports
|
||||||
else if ($modulepart == 'export_compta')
|
else if ($modulepart == 'export_compta')
|
||||||
{
|
{
|
||||||
if ($fuser->rights->accounting->ventilation->dispatch || preg_match('/^specimen/i',$original_file))
|
if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,15 +210,15 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
|||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2303__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/clients.php?leftmenu=tax_vat', 'ReportByCustomers', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->tax->enabled && empty($conf->global->TAX_DISABLE_VAT_MENUS) && $leftmenu=="tax_vat"', __HANDLER__, 'left', 2304__+MAX_llx_menu__, 'accountancy', '', 2300__+MAX_llx_menu__, '/compta/tva/quadri_detail.php?leftmenu=tax_vat', 'ReportByQuarter', 2, 'companies', '$user->rights->tax->charges->lire', '', 0, 3, __ENTITY__);
|
||||||
-- Accounting Expert
|
-- Accounting Expert
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2400__+MAX_llx_menu__, 'accountancy', 'accounting', 6__+MAX_llx_menu__, '/accountancy/index.php?leftmenu=accounting', 'MenuAccountancy', 0, 'accountancy', '! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire', '', 0, 7, __ENTITY__);
|
||||||
-- Binding
|
-- Binding
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2415__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools', 'ProductsBinding', 1, 'accountancy', '', '', 0, 0, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2415__+MAX_llx_menu__, 'home', '', 2400__+MAX_llx_menu__, '/accountancy/admin/productaccount.php?mainmenu=home&leftmenu=admintools', 'ProductsBinding', 1, 'accountancy', '', '', 0, 0, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 1, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?leftmenu=dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 1, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 2, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 3, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 4, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'ventil_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?leftmenu=dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->ventilation->dispatch', '', 0, 5, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__);
|
||||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->ventilation->read', '', 0, 6, __ENTITY__);
|
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->fournisseur->enabled && $leftmenu=="dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__);
|
||||||
-- Journals
|
-- Journals
|
||||||
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__);
|
-- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'journal', 2400__+MAX_llx_menu__, '/accountancy/journal/index.php?leftmenu=journal', 'Journaux', 1, 'accountancy', '$user->rights->accounting->comptarapport->lire', '', 0, 7, __ENTITY__);
|
||||||
-- General Ledger
|
-- General Ledger
|
||||||
|
|||||||
@@ -938,20 +938,24 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
{
|
{
|
||||||
$langs->load("accountancy");
|
$langs->load("accountancy");
|
||||||
|
|
||||||
$permtoshowmenu=(! empty($conf->accounting->enabled) || $user->rights->accounting->ventilation->read || $user->rights->accounting->ventilation->dispatch || $user->rights->compta->resultat->lire);
|
$permtoshowmenu=(! empty($conf->accounting->enabled) || $user->rights->accounting->bind->write || $user->rights->accounting->bind->write || $user->rights->compta->resultat->lire);
|
||||||
$newmenu->add("/accountancy/index.php?leftmenu=accountancy",$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
$newmenu->add("/accountancy/index.php?leftmenu=accountancy",$langs->trans("MenuAccountancy"), 0, $permtoshowmenu, '', $mainmenu, 'accountancy');
|
||||||
|
|
||||||
|
// Chart of account
|
||||||
|
$langs->load("admin");
|
||||||
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount');
|
||||||
|
|
||||||
// Binding
|
// Binding
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy", $langs->trans("ProductsBinding"), 1, $user->admin);
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy", $langs->trans("ProductsBinding"), 1, $user->admin);
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy",$langs->trans("CustomersVentilation"),1,$user->rights->accounting->ventilation->read, '', $mainmenu, 'dispatch_customer');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/customer/index.php?leftmenu=accountancy_dispatch_customer&mainmenu=accountancy",$langs->trans("CustomersVentilation"),1,$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_customer');
|
||||||
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("ToBind"),2,$user->rights->accounting->ventilation->dispatch);
|
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("ToBind"),2,$user->rights->accounting->bind->write);
|
||||||
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("Binded"),2,$user->rights->accounting->ventilation->read);
|
if (preg_match('/accountancy_dispatch_customer/',$leftmenu)) $newmenu->add("/accountancy/customer/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer",$langs->trans("Binded"),2,$user->rights->accounting->bind->write);
|
||||||
|
|
||||||
if (! empty($conf->supplier_invoice->enabled))
|
if (! empty($conf->supplier_invoice->enabled))
|
||||||
{
|
{
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy",$langs->trans("SuppliersVentilation"),1,$user->rights->accounting->ventilation->read, '', $mainmenu, 'dispatch_supplier');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/supplier/index.php?leftmenu=accountancy_dispatch_supplier&mainmenu=accountancy",$langs->trans("SuppliersVentilation"),1,$user->rights->accounting->bind->write, '', $mainmenu, 'dispatch_supplier');
|
||||||
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("ToBind"),2,$user->rights->accounting->ventilation->dispatch);
|
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/list.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("ToBind"),2,$user->rights->accounting->bind->write);
|
||||||
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("Binded"),2,$user->rights->accounting->ventilation->read);
|
if (preg_match('/accountancy_dispatch_supplier/',$leftmenu)) $newmenu->add("/accountancy/supplier/lines.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier",$langs->trans("Binded"),2,$user->rights->accounting->bind->write);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Journals
|
// Journals
|
||||||
@@ -1006,9 +1010,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report",$langs->trans("ByUsers"),3,$user->rights->accounting->comptarapport->lire);
|
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyuser.php?leftmenu=accountancy_report",$langs->trans("ByUsers"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report", $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire);
|
if (preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=accountancy_report", $langs->trans("ByProductsAndServices"),3,$user->rights->accounting->comptarapport->lire);
|
||||||
|
|
||||||
// Admin
|
// Fiscal year
|
||||||
$langs->load("admin");
|
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Chartofaccounts"),1,$user->rights->accounting->chartofaccount, '', $mainmenu, 'chartofaccount');
|
|
||||||
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // Not yet used. In a future will lock some periods.
|
if ($conf->global->MAIN_FEATURES_LEVEL > 0) // Not yet used. In a future will lock some periods.
|
||||||
{
|
{
|
||||||
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Fiscalyear"),1,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
if (preg_match('/accountancy/',$leftmenu)) $newmenu->add("/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("Fiscalyear"),1,$user->rights->accounting->fiscalyear, '', $mainmenu, 'fiscalyear');
|
||||||
|
|||||||
@@ -231,24 +231,34 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights = array(); // Permission array used by this module
|
$this->rights = array(); // Permission array used by this module
|
||||||
$r = 0;
|
$r = 0;
|
||||||
|
|
||||||
|
$this->rights[$r][0] = 50440;
|
||||||
|
$this->rights[$r][1] = 'Manage chart of accounts, setup of accountancy';
|
||||||
|
$this->rights[$r][2] = 'r';
|
||||||
|
$this->rights[$r][3] = 0;
|
||||||
|
$this->rights[$r][4] = 'chartofaccount';
|
||||||
|
$this->rights[$r][5] = '';
|
||||||
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50401;
|
$this->rights[$r][0] = 50401;
|
||||||
$this->rights[$r][1] = 'Read ventilation';
|
$this->rights[$r][1] = 'Bind products and invoices with accounting accounts';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'ventilation';
|
$this->rights[$r][4] = 'bind';
|
||||||
$this->rights[$r][5] = 'read';
|
$this->rights[$r][5] = 'write';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
/*
|
||||||
$this->rights[$r][0] = 50402;
|
$this->rights[$r][0] = 50402;
|
||||||
$this->rights[$r][1] = 'Dispatched ventilation';
|
$this->rights[$r][1] = 'Make binding with products and invoices';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'ventilation';
|
$this->rights[$r][4] = 'ventilation';
|
||||||
$this->rights[$r][5] = 'dispatch';
|
$this->rights[$r][5] = 'dispatch_advanced';
|
||||||
$r++;
|
$r++;
|
||||||
|
*/
|
||||||
|
|
||||||
$this->rights[$r][0] = 50411;
|
$this->rights[$r][0] = 50411;
|
||||||
$this->rights[$r][1] = 'Lire les mouvements comptables';
|
$this->rights[$r][1] = 'Read operations in General Ledger';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'mouvements';
|
$this->rights[$r][4] = 'mouvements';
|
||||||
@@ -256,7 +266,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50412;
|
$this->rights[$r][0] = 50412;
|
||||||
$this->rights[$r][1] = 'Creer/modifier/annuler les mouvements comptables';
|
$this->rights[$r][1] = 'Write/Edit operations in General Ledger';
|
||||||
$this->rights[$r][2] = 'w';
|
$this->rights[$r][2] = 'w';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'mouvements';
|
$this->rights[$r][4] = 'mouvements';
|
||||||
@@ -264,7 +274,7 @@ class modAccounting extends DolibarrModules
|
|||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50420;
|
$this->rights[$r][0] = 50420;
|
||||||
$this->rights[$r][1] = 'Lire CA, bilans, resultats, journaux, grands livres';
|
$this->rights[$r][1] = 'Report and export reports (turnover, balance, journals, general ledger)';
|
||||||
$this->rights[$r][2] = 'r';
|
$this->rights[$r][2] = 'r';
|
||||||
$this->rights[$r][3] = 0;
|
$this->rights[$r][3] = 0;
|
||||||
$this->rights[$r][4] = 'comptarapport';
|
$this->rights[$r][4] = 'comptarapport';
|
||||||
@@ -279,14 +289,6 @@ class modAccounting extends DolibarrModules
|
|||||||
$this->rights[$r][5] = '';
|
$this->rights[$r][5] = '';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->rights[$r][0] = 50440;
|
|
||||||
$this->rights[$r][1] = 'Manage chart of accounts';
|
|
||||||
$this->rights[$r][2] = 'r';
|
|
||||||
$this->rights[$r][3] = 0;
|
|
||||||
$this->rights[$r][4] = 'chartofaccount';
|
|
||||||
$this->rights[$r][5] = '';
|
|
||||||
$r++;
|
|
||||||
|
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
//-------
|
//-------
|
||||||
|
|||||||
@@ -419,6 +419,7 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||||||
|
|
||||||
// Reload modules (this must be always and only into last targeted version)
|
// Reload modules (this must be always and only into last targeted version)
|
||||||
$listofmodule=array(
|
$listofmodule=array(
|
||||||
|
'MAIN_MODULE_ACCOUNTING'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
|
'MAIN_MODULE_BARCODE'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_CRON'=>'newboxdefonly',
|
'MAIN_MODULE_CRON'=>'newboxdefonly',
|
||||||
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
|
'MAIN_MODULE_FACTURE'=>'newboxdefonly',
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ ACCOUNTING_LENGTH_DESCRIPTION=Length for displaying product & services descripti
|
|||||||
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50)
|
ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Length for displaying product & services account description form in listings (Best = 50)
|
||||||
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts
|
ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts
|
||||||
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts
|
ACCOUNTING_LENGTH_AACCOUNT=Length of the third party accounting accounts
|
||||||
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disable by default. Be careful with the function "length of the accounts".
|
ACCOUNTING_MANAGE_ZERO=Manage the zero at the end of an accounting account. Needed by some countries. Disabled by default. If set to on, you must also set the 2 following parameters (or it is ignored)
|
||||||
BANK_DISABLE_DIRECT_INPUT=Disable free input of bank transactions (Enabled by default with this module).
|
BANK_DISABLE_DIRECT_INPUT=Disable free input of bank transactions (Enabled by default with this module).
|
||||||
|
|
||||||
ACCOUNTING_SELL_JOURNAL=Sell journal
|
ACCOUNTING_SELL_JOURNAL=Sell journal
|
||||||
@@ -103,7 +103,7 @@ NotMatch=Not Set
|
|||||||
DeleteMvt=Delete general ledger lines
|
DeleteMvt=Delete general ledger lines
|
||||||
DelYear=Year to delete
|
DelYear=Year to delete
|
||||||
DelJournal=Journal to delete
|
DelJournal=Journal to delete
|
||||||
ConfirmDeleteMvt=This will delete all lines of the general ledger for year and/or from a specifics journal
|
ConfirmDeleteMvt=This will delete all lines of the general ledger for year and/or from a specific journal. At least one criteria is required.
|
||||||
ConfirmDeleteMvtPartial=This will delete the selected line(s) of the general ledger
|
ConfirmDeleteMvtPartial=This will delete the selected line(s) of the general ledger
|
||||||
DelBookKeeping=Delete the record of the general ledger
|
DelBookKeeping=Delete the record of the general ledger
|
||||||
FinanceJournal=Finance journal
|
FinanceJournal=Finance journal
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ NoTemplateDefined=No template defined for this email type
|
|||||||
AvailableVariables=Available substitution variables
|
AvailableVariables=Available substitution variables
|
||||||
NoTranslation=No translation
|
NoTranslation=No translation
|
||||||
NoRecordFound=No record found
|
NoRecordFound=No record found
|
||||||
|
NoRecordDeleted=No record deleted
|
||||||
NotEnoughDataYet=Not enough data
|
NotEnoughDataYet=Not enough data
|
||||||
NoError=No error
|
NoError=No error
|
||||||
Error=Error
|
Error=Error
|
||||||
|
|||||||
Reference in New Issue
Block a user