index.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <?php
  2. /* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2016-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
  4. * Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * \file htdocs/accountancy/index.php
  21. * \ingroup Accountancy (Double entries)
  22. * \brief Home accounting module
  23. */
  24. require '../main.inc.php';
  25. require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
  26. require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php';
  27. // Load translation files required by the page
  28. $langs->loadLangs(array("compta","bills","other","accountancy","loans","banks","admin","dict"));
  29. // Security check
  30. if ($user->societe_id > 0)
  31. accessforbidden();
  32. // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
  33. $hookmanager->initHooks(array('accountancyindex'));
  34. /*
  35. * Actions
  36. */
  37. // None
  38. /*
  39. * View
  40. */
  41. llxHeader('', $langs->trans("AccountancyArea"));
  42. print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
  43. //dol_fiche_head();
  44. $step = 0;
  45. if ($conf->accounting->enabled)
  46. {
  47. print '<span class="opacitymedium">'.$langs->trans("AccountancyAreaDescIntro")."</span><br>\n";
  48. print "<br>\n";print "<br>\n";
  49. print load_fiche_titre('<span class="fa fa-calendar-check-o"></span> '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n";
  50. print '<hr>';
  51. print "<br>\n";
  52. // STEPS
  53. $step++;
  54. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong>'.'</a>');
  55. print "<br>\n";
  56. $step++;
  57. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong>'.'</a>');
  58. print "<br>\n";
  59. $step++;
  60. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>'.'</a>');
  61. print "<br>\n";
  62. print "<br>\n";
  63. print $langs->trans("AccountancyAreaDescActionOnceBis");
  64. print "<br>\n";
  65. print "<br>\n";
  66. $step++;
  67. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>'.'</a>');
  68. print "<br>\n";
  69. $step++;
  70. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong>'.'</a>')."\n";
  71. print "<br>\n";
  72. $step++;
  73. $textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>'.'</a>';
  74. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
  75. print "<br>\n";
  76. if (! empty($conf->tax->enabled))
  77. {
  78. $textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>'.'</a>';
  79. $step++;
  80. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
  81. print "<br>\n";
  82. }
  83. /*if (! empty($conf->salaries->enabled))
  84. {
  85. $step++;
  86. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
  87. // htdocs/admin/salaries.php
  88. print "<br>\n";
  89. print "<br>\n";
  90. }*/
  91. if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
  92. {
  93. $step++;
  94. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>'.'</a>');
  95. print "<br>\n";
  96. }
  97. /*
  98. if (! empty($conf->loan->enabled))
  99. {
  100. $step++;
  101. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
  102. print "<br>\n";
  103. }
  104. if (! empty($conf->don->enabled))
  105. {
  106. $step++;
  107. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
  108. print "<br>\n";
  109. }
  110. if (! empty($conf->adherents->enabled))
  111. {
  112. $step++;
  113. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
  114. print "<br>\n";
  115. }*/
  116. $step++;
  117. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong>'.'</a>');
  118. print "<br>\n";
  119. print '<br>';
  120. // Step A - E
  121. print "<br>\n";
  122. print load_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
  123. print '<hr>';
  124. print "<br>\n";
  125. $step = 0;
  126. $langs->loadLangs(array('bills', 'trips'));
  127. $step++;
  128. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<a href="'.DOL_URL_ROOT.'/accountancy/customer/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>'.'</a>')."\n";
  129. print "<br>\n";
  130. $step++;
  131. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>'.'</a>')."\n";
  132. print "<br>\n";
  133. if (! empty($conf->expensereport->enabled) || ! empty($conf->deplacement->enabled))
  134. {
  135. $step++;
  136. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>'.'</a>')."\n";
  137. print "<br>\n";
  138. }
  139. $step++;
  140. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
  141. print "<br>\n";
  142. $step++;
  143. print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."<br>\n";
  144. print "<br>\n";
  145. }
  146. else
  147. {
  148. print $langs->trans("Module10Desc")."<br>\n";
  149. }
  150. //dol_fiche_end();
  151. // End of page
  152. llxFooter();
  153. $db->close();