26 require
'../main.inc.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
32 $langs->loadLangs(array(
"compta",
"bills",
"other",
"accountancy",
"loans",
"banks",
"admin",
"dict"));
35 $hookmanager->initHooks(array(
'accountancyindex'));
38 if ($user->socid > 0) {
52 if (empty($user->rights->compta->resultat->lire) && empty($user->rights->accounting->comptarapport->lire) && empty($user->rights->accounting->mouvements->lire) && empty($user->rights->asset->read) && empty($user->rights->intracommreport->read)) {
63 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
64 $zone =
GETPOST(
'areacode',
'int');
65 $userid =
GETPOST(
'userid',
'int');
66 $boxorder =
GETPOST(
'boxorder',
'aZ09');
67 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
84 if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) {
87 print
'<span class="opacitymedium">'.$langs->trans(
"SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices").
"</span>\n";
94 $helpisexpanded = empty($resultboxes[
'boxactivated']) || (empty($resultboxes[
'boxlista']) && empty($resultboxes[
'boxlistb']));
97 if (!$helpisexpanded) {
98 $showtutorial =
'<div align="right"><a href="#" id="show_hide">';
99 $showtutorial .=
img_picto(
'',
'chevron-down');
100 $showtutorial .=
' '.$langs->trans(
"ShowTutorial");
101 $showtutorial .=
'</a></div>';
103 $showtutorial .=
'<script type="text/javascript">
104 jQuery(document).ready(function() {
105 jQuery("#show_hide").click(function () {
106 jQuery( "#idfaq" ).toggle({
114 print
load_fiche_titre($langs->trans(
"AccountancyArea"), $resultboxes[
'selectboxlist'],
'accountancy', 0,
'',
'', $showtutorial);
116 if (!empty($conf->global->INVOICE_USE_SITUATION) && $conf->global->INVOICE_USE_SITUATION == 1) {
117 print
info_admin($langs->trans(
"SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices"));
121 print
'<div class="'.($helpisexpanded ?
'' :
'hideobject').
'" id="idfaq">';
123 print
'<span class="opacitymedium">'.$langs->trans(
"AccountancyAreaDescIntro").
"</span><br>\n";
124 if (!empty($user->rights->accounting->chartofaccount)) {
125 print
load_fiche_titre(
'<span class="fa fa-calendar-check-o"></span> '.$langs->trans(
"AccountancyAreaDescActionOnce"),
'',
'').
"\n";
131 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescJournalSetup", $step,
'{s}');
132 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/journals_list.php?id=35"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"AccountingJournals").
'</strong></a>', $s);
136 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescChartModel", $step,
'{s}');
137 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/accountmodel.php"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"Pcg_version").
'</strong></a>', $s);
141 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescChart", $step,
'{s}');
142 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/account.php"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"Chartofaccounts").
'</strong></a>', $s);
147 print $langs->trans(
"AccountancyAreaDescActionOnceBis");
152 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescDefault", $step,
'{s}');
153 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/defaultaccounts.php"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuDefaultAccounts").
'</strong></a>', $s);
158 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBank", $step,
'{s}').
"\n";
159 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/compta/bank/list.php"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuBankAccounts").
'</strong></a>', $s);
164 $textlink =
'<a href="'.DOL_URL_ROOT.
'/admin/dict.php?id=10&from=accountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuVatAccounts").
'</strong></a>';
165 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescVat", $step,
'{s}');
166 $s = str_replace(
'{s}', $textlink, $s);
171 $textlink =
'<a href="'.DOL_URL_ROOT.
'/admin/dict.php?id=7&from=accountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuTaxAccounts").
'</strong></a>';
173 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescContrib", $step,
'{s}');
174 $s = str_replace(
'{s}', $textlink, $s);
180 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescExpenseReport", $step,
'{s}');
181 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/admin/dict.php?id=17&from=accountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuExpenseReportAccounts").
'</strong></a>', $s);
187 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescProd", $step,
'{s}');
188 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/productaccount.php"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"ProductsBinding").
'</strong></a>', $s);
198 print
load_fiche_titre(
'<span class="fa fa-calendar"></span> '.$langs->trans(
"AccountancyAreaDescActionFreq"),
'',
'');
203 $langs->loadLangs(array(
'bills',
'trips'));
206 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"BillsCustomers"),
'{s}').
"\n";
207 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/customer/index.php"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"CustomersVentilation").
'</strong></a>', $s);
212 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"BillsSuppliers"),
'{s}').
"\n";
213 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/supplier/index.php"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"SuppliersVentilation").
'</strong></a>', $s);
219 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"ExpenseReports"),
'{s}').
"\n";
220 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/expensereport/index.php"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"ExpenseReportsVentilation").
'</strong></a>', $s);
226 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"RegistrationInAccounting"), $langs->transnoentitiesnoconv(
"WriteBookKeeping")).
"\n";
231 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescAnalyze", chr(64 + $step)).
"<br>\n";
239 print
'<div class="clearboth"></div>';
241 print
'<div class="fichecenter fichecenterbis">';
246 $boxlist =
'<div class="twocolumns">';
248 $boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
250 $boxlist .= $resultboxes[
'boxlista'];
252 $boxlist .=
'</div>';
254 $boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
256 $boxlist .= $resultboxes[
'boxlistb'];
258 $boxlist .=
'</div>';
261 $boxlist .=
'</div>';
268 print
load_fiche_titre($langs->trans(
"AccountancyArea"),
'',
'accountancy');
270 print
'<span class="opacitymedium">'.$langs->trans(
"Module10Desc").
"</span>\n";