NEW: Accountancy - Add specific page to export accounting data rather than the journals page
This commit is contained in:
parent
9b141e9d1d
commit
87397a4d20
1403
htdocs/accountancy/bookkeeping/export.php
Normal file
1403
htdocs/accountancy/bookkeeping/export.php
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013-2016 Olivier Geffroy <jeff@jeffinfo.com>
|
||||
* Copyright (C) 2013-2016 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2013-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2013-2023 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2022 Lionel Vessiller <lvessiller@open-dsi.fr>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
@ -29,7 +29,6 @@
|
||||
|
||||
// Load Dolibarr environment
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php';
|
||||
@ -96,14 +95,6 @@ $search_date_validation_start = dol_mktime(0, 0, 0, $search_date_validation_star
|
||||
$search_date_validation_end = dol_mktime(23, 59, 59, $search_date_validation_endmonth, $search_date_validation_endday, $search_date_validation_endyear);
|
||||
$search_import_key = GETPOST("search_import_key", 'alpha');
|
||||
|
||||
//var_dump($search_date_start);exit;
|
||||
if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) {
|
||||
$action = 'delbookkeepingyear';
|
||||
}
|
||||
if (GETPOST("button_export_file_x") || GETPOST("button_export_file.x") || GETPOST("button_export_file")) {
|
||||
$action = 'export_file';
|
||||
}
|
||||
|
||||
$search_account_category = GETPOST('search_account_category', 'int');
|
||||
|
||||
$search_accountancy_code = GETPOST("search_accountancy_code", 'alpha');
|
||||
@ -159,7 +150,7 @@ $hookmanager->initHooks(array('bookkeepinglist'));
|
||||
$formaccounting = new FormAccounting($db);
|
||||
$form = new Form($db);
|
||||
|
||||
if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
if (!in_array($action, array('delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !GETPOSTISSET('formfilteraction') && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values') && !GETPOST('search_accountancy_code_start')) {
|
||||
$query = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
|
||||
$query .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."' limit 1";
|
||||
@ -201,8 +192,8 @@ $arrayfields = array(
|
||||
't.lettering_code'=>array('label'=>$langs->trans("LetteringCode"), 'checked'=>1),
|
||||
't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0),
|
||||
't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0),
|
||||
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1),
|
||||
't.date_validated'=>array('label'=>$langs->trans("DateValidationAndLock"), 'checked'=>1, 'enabled'=>!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")),
|
||||
't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>0),
|
||||
't.date_validated'=>array('label'=>$langs->trans("DateValidationAndLock"), 'checked'=>0, 'enabled'=>!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")),
|
||||
't.import_key'=>array('label'=>$langs->trans("ImportId"), 'checked'=>0, 'position'=>1100),
|
||||
);
|
||||
|
||||
@ -210,13 +201,6 @@ if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) {
|
||||
unset($arrayfields['t.lettering_code']);
|
||||
}
|
||||
|
||||
$accountancyexport = new AccountancyExport($db);
|
||||
$listofformat = $accountancyexport->getType();
|
||||
$formatexportset = getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV');
|
||||
if (empty($listofformat[$formatexportset])) {
|
||||
$formatexportset = 1;
|
||||
}
|
||||
|
||||
$error = 0;
|
||||
|
||||
if (!isModEnabled('accounting')) {
|
||||
@ -457,49 +441,6 @@ if (empty($reshook)) {
|
||||
$param .= '&search_import_key='.urlencode($search_import_key);
|
||||
}
|
||||
|
||||
//if ($action == 'delbookkeepingyearconfirm' && !$user->hasRight('accounting', 'mouvements', 'supprimer_tous')) {
|
||||
// $delmonth = GETPOST('delmonth', 'int');
|
||||
// $delyear = GETPOST('delyear', 'int');
|
||||
// if ($delyear == -1) {
|
||||
// $delyear = 0;
|
||||
// }
|
||||
// $deljournal = GETPOST('deljournal', 'alpha');
|
||||
// if ($deljournal == -1) {
|
||||
// $deljournal = 0;
|
||||
// }
|
||||
//
|
||||
// if (!empty($delmonth) || !empty($delyear) || !empty($deljournal)) {
|
||||
// $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0));
|
||||
// if ($result < 0) {
|
||||
// setEventMessages($object->error, $object->errors, 'errors');
|
||||
// } else {
|
||||
// setEventMessages("RecordDeleted", null, 'mesgs');
|
||||
// }
|
||||
//
|
||||
// // Make a redirect to avoid to launch the delete later after a back button
|
||||
// header("Location: list.php".($param ? '?'.$param : ''));
|
||||
// exit;
|
||||
// } else {
|
||||
// setEventMessages("NoRecordDeleted", null, 'warnings');
|
||||
// }
|
||||
//}
|
||||
if ($action == 'setreexport') {
|
||||
$setreexport = GETPOST('value', 'int');
|
||||
if (!dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) {
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
if ($conf->global->ACCOUNTING_REEXPORT == 1) {
|
||||
setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'warnings');
|
||||
}
|
||||
} else {
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Mass actions
|
||||
$objectclass = 'Bookkeeping';
|
||||
$objectlabel = 'Bookkeeping';
|
||||
@ -707,103 +648,12 @@ if (count($filter) > 0) {
|
||||
}
|
||||
}
|
||||
$sql .= ' WHERE t.entity IN ('.getEntity('accountancy').')';
|
||||
if (empty($conf->global->ACCOUNTING_REEXPORT)) {
|
||||
$sql .= " AND t.date_export IS NULL";
|
||||
}
|
||||
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND '.implode(' AND ', $sqlwhere);
|
||||
}
|
||||
//print $sql;
|
||||
|
||||
|
||||
// Export into a file with format defined into setup (FEC, CSV, ...)
|
||||
// Must be after definition of $sql
|
||||
if ($action == 'export_fileconfirm' && $user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
// TODO Replace the fetchAll to get all ->line followed by call to ->export(). It currently consumes too much memory on large export.
|
||||
// Replace this with the query($sql) and loop on each line to export them.
|
||||
$result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', (empty($conf->global->ACCOUNTING_REEXPORT) ? 0 : 1));
|
||||
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
} else {
|
||||
// Export files then exit
|
||||
$accountancyexport = new AccountancyExport($db);
|
||||
|
||||
$formatexport = GETPOST('formatexport', 'int');
|
||||
$notexportlettering = GETPOST('notexportlettering', 'alpha');
|
||||
|
||||
if (!empty($notexportlettering)) {
|
||||
if (is_array($object->lines)) {
|
||||
foreach ($object->lines as $k => $movement) {
|
||||
unset($object->lines[$k]->lettering_code);
|
||||
unset($object->lines[$k]->date_lettering);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$notifiedexportdate = GETPOST('notifiedexportdate', 'alpha');
|
||||
$notifiedvalidationdate = GETPOST('notifiedvalidationdate', 'alpha');
|
||||
$withAttachment = !empty(trim(GETPOST('notifiedexportfull', 'alphanohtml'))) ? 1 : 0;
|
||||
|
||||
// Output data on screen or download
|
||||
$result = $accountancyexport->export($object->lines, $formatexport, $withAttachment);
|
||||
|
||||
$error = 0;
|
||||
if ($result < 0) {
|
||||
$error++;
|
||||
} else {
|
||||
if (!empty($notifiedexportdate) || !empty($notifiedvalidationdate)) {
|
||||
if (is_array($object->lines)) {
|
||||
dol_syslog("/accountancy/bookkeeping/list.php Function export_file Specify movements as exported", LOG_DEBUG);
|
||||
|
||||
// Specify as export : update field date_export or date_validated
|
||||
$db->begin();
|
||||
|
||||
// TODO Merge update for each line into one gloacl using rowid IN (list of movement ids)
|
||||
foreach ($object->lines as $movement) {
|
||||
$now = dol_now();
|
||||
|
||||
$setfields = '';
|
||||
if (!empty($notifiedexportdate) && empty($movement->date_export)) {
|
||||
$setfields .= ($setfields ? "," : "")." date_export = '".$db->idate($now)."'";
|
||||
}
|
||||
if (!empty($notifiedvalidationdate) && empty($movement->date_validation)) {
|
||||
$setfields .= ($setfields ? "," : "")." date_validated = '".$db->idate($now)."'";
|
||||
}
|
||||
|
||||
if ($setfields) {
|
||||
$sql = " UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping";
|
||||
$sql .= " SET ".$setfields;
|
||||
$sql .= " WHERE rowid = ".((int) $movement->id);
|
||||
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
$error++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$db->commit();
|
||||
} else {
|
||||
$error++;
|
||||
$accountancyexport->errors[] = $langs->trans('NotAllExportedMovementsCouldBeRecordedAsExportedOrValidated');
|
||||
$db->rollback();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
setEventMessages('', $accountancyexport->errors, 'errors');
|
||||
header('Location: '.$_SERVER['PHP_SELF']);
|
||||
}
|
||||
exit(); // download or show errors
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
@ -857,111 +707,6 @@ llxHeader('', $title_page);
|
||||
|
||||
$formconfirm = '';
|
||||
|
||||
if ($action == 'export_file') {
|
||||
$form_question = array();
|
||||
|
||||
$form_question['formatexport'] = array(
|
||||
'name' => 'formatexport',
|
||||
'type' => 'select',
|
||||
'label' => $langs->trans('Modelcsv'), // TODO Use Selectmodelcsv and show a select combo
|
||||
'values' => $listofformat,
|
||||
'default' => $formatexportset,
|
||||
'morecss' => 'minwidth200 maxwidth200'
|
||||
);
|
||||
|
||||
$form_question['separator0'] = array('name'=>'separator0', 'type'=>'separator');
|
||||
|
||||
if (getDolGlobalInt("ACCOUNTING_ENABLE_LETTERING")) {
|
||||
// If 1, we check by default.
|
||||
$checked = !empty($conf->global->ACCOUNTING_DEFAULT_NOT_EXPORT_LETTERING) ? 'true' : 'false';
|
||||
$form_question['notexportlettering'] = array(
|
||||
'name' => 'notexportlettering',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotExportLettering'),
|
||||
'value' => $checked,
|
||||
);
|
||||
|
||||
$form_question['separator1'] = array('name'=>'separator1', 'type'=>'separator');
|
||||
}
|
||||
|
||||
// If 1 or not set, we check by default.
|
||||
$checked = (!isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE));
|
||||
$form_question['notifiedexportdate'] = array(
|
||||
'name' => 'notifiedexportdate',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedExportDate'),
|
||||
'value' => (!empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_EXPORT_DATE) ? 'false' : 'true'),
|
||||
);
|
||||
|
||||
$form_question['separator2'] = array('name'=>'separator2', 'type'=>'separator');
|
||||
|
||||
if (!getDolGlobalString("ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE")) {
|
||||
// If 0 or not set, we NOT check by default.
|
||||
$checked = (isset($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE) || !empty($conf->global->ACCOUNTING_DEFAULT_NOT_NOTIFIED_VALIDATION_DATE));
|
||||
$form_question['notifiedvalidationdate'] = array(
|
||||
'name' => 'notifiedvalidationdate',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedValidationDate', $langs->transnoentitiesnoconv("MenuAccountancyClosure")),
|
||||
'value' => $checked,
|
||||
);
|
||||
|
||||
$form_question['separator3'] = array('name'=>'separator3', 'type'=>'separator');
|
||||
}
|
||||
|
||||
// add documents in an archive for accountancy export (Quadratus)
|
||||
if (getDolGlobalString('ACCOUNTING_EXPORT_MODELCSV') == AccountancyExport::$EXPORT_TYPE_QUADRATUS) {
|
||||
$form_question['notifiedexportfull'] = array(
|
||||
'name' => 'notifiedexportfull',
|
||||
'type' => 'checkbox',
|
||||
'label' => $langs->trans('NotifiedExportFull'),
|
||||
'value' => 'false',
|
||||
);
|
||||
}
|
||||
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans("ExportFilteredList").'...', $langs->trans('ConfirmExportFile'), 'export_fileconfirm', $form_question, '', 1, 420, 600);
|
||||
}
|
||||
|
||||
//if ($action == 'delbookkeepingyear') {
|
||||
// $form_question = array();
|
||||
// $delyear = GETPOST('delyear', 'int');
|
||||
// $deljournal = GETPOST('deljournal', 'alpha');
|
||||
//
|
||||
// if (empty($delyear)) {
|
||||
// $delyear = dol_print_date(dol_now(), '%Y');
|
||||
// }
|
||||
// $month_array = array();
|
||||
// for ($i = 1; $i <= 12; $i++) {
|
||||
// $month_array[$i] = $langs->trans("Month".sprintf("%02d", $i));
|
||||
// }
|
||||
// $year_array = $formaccounting->selectyear_accountancy_bookkepping($delyear, 'delyear', 0, 'array');
|
||||
// $journal_array = $formaccounting->select_journal($deljournal, 'deljournal', '', 1, 1, 1, '', 0, 1);
|
||||
//
|
||||
// $form_question['delmonth'] = array(
|
||||
// 'name' => 'delmonth',
|
||||
// 'type' => 'select',
|
||||
// 'label' => $langs->trans('DelMonth'),
|
||||
// 'values' => $month_array,
|
||||
// 'morecss' => 'minwidth150',
|
||||
// 'default' => ''
|
||||
// );
|
||||
// $form_question['delyear'] = array(
|
||||
// 'name' => 'delyear',
|
||||
// 'type' => 'select',
|
||||
// 'label' => $langs->trans('DelYear'),
|
||||
// 'values' => $year_array,
|
||||
// 'default' => $delyear
|
||||
// );
|
||||
// $form_question['deljournal'] = array(
|
||||
// 'name' => 'deljournal',
|
||||
// 'type' => 'other', // We don't use select here, the journal_array is already a select html component
|
||||
// 'label' => $langs->trans('DelJournal'),
|
||||
// 'value' => $journal_array,
|
||||
// 'default' => $deljournal
|
||||
// );
|
||||
//
|
||||
// $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt', $langs->transnoentitiesnoconv("RegistrationInAccounting")), 'delbookkeepingyearconfirm', $form_question, '', 1, 320);
|
||||
//}
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
@ -1015,21 +760,6 @@ if ($reshook < 0) {
|
||||
$newcardbutton = empty($hookmanager->resPrint) ? '' : $hookmanager->resPrint;
|
||||
|
||||
if (empty($reshook)) {
|
||||
// Button re-export
|
||||
if (!empty($conf->global->ACCOUNTING_REEXPORT)) {
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=0'.($param ? '&'.$param : '').'&sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder).'">'.img_picto($langs->trans("ClickToHideAlreadyExportedLines"), 'switch_off', 'class="small size15x valignmiddle"');
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly paddingleft">'.$langs->trans("ClickToHideAlreadyExportedLines").'</span>';
|
||||
$newcardbutton .= '</a>';
|
||||
} else {
|
||||
$newcardbutton .= '<a class="valignmiddle" href="'.$_SERVER['PHP_SELF'].'?action=setreexport&token='.newToken().'&value=1'.($param ? '&'.$param : '').'&sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder).'">'.img_picto($langs->trans("DocsAlreadyExportedAreExcluded"), 'switch_on', 'class="warning size15x valignmiddle"');
|
||||
$newcardbutton .= '<span class="valignmiddle marginrightonly paddingleft">'.$langs->trans("DocsAlreadyExportedAreExcluded").'</span>';
|
||||
$newcardbutton .= '</a>';
|
||||
}
|
||||
|
||||
if ($user->hasRight('accounting', 'mouvements', 'export')) {
|
||||
$newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file&token='.newToken().($param ? '&'.$param : '').'&sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder), $user->hasRight('accounting', 'mouvements', 'export'));
|
||||
}
|
||||
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss' => 'marginleftonly btnTitleSelected'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss' => 'marginleftonly'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('GroupBySubAccountAccounting'), '', 'fa fa-align-left vmirror paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?type=sub'.$param, '', 1, array('morecss' => 'marginleftonly'));
|
||||
@ -1608,13 +1338,6 @@ print $hookmanager->resPrint;
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
// TODO Replace this with mass delete action
|
||||
//if ($user->rights->accounting->mouvements->supprimer_tous) {
|
||||
// print '<div class="tabsAction tabsActionNoBottom">'."\n";
|
||||
// print '<a class="butActionDelete" name="button_delmvt" href="'.$_SERVER["PHP_SELF"].'?action=delbookkeepingyear&token='.newToken().($param ? '&'.$param : '').'">'.$langs->trans("DeleteMvt").'</a>';
|
||||
// print '</div>';
|
||||
//}
|
||||
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
||||
@ -335,13 +335,16 @@ 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->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 10, __ENTITY__);
|
||||
|
||||
-- General Ledger
|
||||
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', 2432__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 12, __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', 2432__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_bookkeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 12, __ENTITY__);
|
||||
|
||||
-- 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', 2434__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Journals', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __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', 2433__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookkeeping', 'Journals', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 13, __ENTITY__);
|
||||
|
||||
-- Export accountancy
|
||||
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', 2435__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_bookkeeping', 'MenuExportAccountancy', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__);
|
||||
|
||||
-- Closure
|
||||
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', 2437__+MAX_llx_menu__, 'accountancy', 'accountancy_closure', 2400__+MAX_llx_menu__, '/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure', 'MenuAccountancyClosure', 1, 'accountancy', '$user->rights->accounting->fiscalyear->write', '', 0, 17, __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', 2437__+MAX_llx_menu__, 'accountancy', 'accountancy_closure', 2400__+MAX_llx_menu__, '/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure', 'MenuAccountancyClosure', 1, 'accountancy', '$user->rights->accounting->fiscalyear->write', '', 0, 16, __ENTITY__);
|
||||
|
||||
-- Reports
|
||||
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', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
|
||||
|
||||
@ -1773,6 +1773,9 @@ function get_left_menu_accountancy($mainmenu, &$newmenu, $usemenuhider = 1, $lef
|
||||
// Account Balance
|
||||
$newmenu->add("/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("AccountBalance"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
|
||||
|
||||
// Export accountancy
|
||||
$newmenu->add("/accountancy/bookkeeping/export.php?mainmenu=accountancy&leftmenu=accountancy_accountancy", $langs->trans("MenuExportAccountancy"), 1, $user->hasRight('accounting', 'mouvements', 'lire'));
|
||||
|
||||
// Closure
|
||||
$newmenu->add("/accountancy/closure/index.php?mainmenu=accountancy&leftmenu=accountancy_closure", $langs->trans("MenuAccountancyClosure"), 1, $user->hasRight('accounting', 'fiscalyear', 'write'), '', $mainmenu, 'closure');
|
||||
|
||||
|
||||
@ -52,6 +52,8 @@ AccountantFiles=Export source documents
|
||||
ExportAccountingSourceDocHelp=With this tool, you can search and export the source events that are used to generate your accountancy. <br>The exported ZIP file will contain the lists of requested items in CSV, as well as their attached files in their original format (PDF, ODT, DOCX...).
|
||||
ExportAccountingSourceDocHelp2=To export your journals, use the menu entry %s - %s.
|
||||
ExportAccountingProjectHelp=Specify a project if you need an accounting report only for a specific project. Expense reports and loan payments are not included in project reports.
|
||||
ExportAccountancy=Export accountancy
|
||||
WarningDataDisappearsWhenDataIsExportedReport=Warning, this list contains only the accounting entries that have not been exported. If you want to display the accounting entries already exported to re-export them, click on the button above.
|
||||
VueByAccountAccounting=View by accounting account
|
||||
VueBySubAccountAccounting=View by accounting subaccount
|
||||
|
||||
@ -113,6 +115,7 @@ MenuLoanAccounts=Loan accounts
|
||||
MenuProductsAccounts=Product accounts
|
||||
MenuClosureAccounts=Closure accounts
|
||||
MenuAccountancyClosure=Closure
|
||||
MenuExportAccountancy=Export accountancy
|
||||
MenuAccountancyValidationMovements=Validate movements
|
||||
ProductsBinding=Products accounts
|
||||
TransferInAccounting=Transfer in accounting
|
||||
@ -479,7 +482,7 @@ FECFormatMulticurrencyCode=Multicurrency code (Idevise)
|
||||
DateExport=Date export
|
||||
WarningReportNotReliable=Warning, this report is not based on the Ledger, so does not contains transaction modified manually in the Ledger. If your journalization is up to date, the bookkeeping view is more accurate.
|
||||
ExpenseReportJournal=Expense Report Journal
|
||||
DocsAlreadyExportedAreExcluded=Docs already exported are excluded
|
||||
ClickToHideAlreadyExportedLines=Click to hide already exported lines
|
||||
DocsAlreadyExportedAreIncluded=Docs already exported are included
|
||||
ClickToShowAlreadyExportedLines=Click to show already exported lines
|
||||
|
||||
NAccounts=%s accounts
|
||||
|
||||
Loading…
Reference in New Issue
Block a user