28 require
'../main.inc.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/date.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/accounting.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formother.class.php';
34 $langs->loadLangs(array(
"compta",
"bills",
"other",
"accountancy",
"loans",
"banks",
"admin",
"dict"));
37 $hookmanager->initHooks(array(
'accountancyindex'));
40 if ($user->socid > 0) {
46 if (!$user->hasRight(
'compta',
'resultat',
'lire') && !$user->hasRight(
'accounting',
'comptarapport',
'lire') && !$user->hasRight(
'accounting',
'mouvements',
'lire') && !$user->hasRight(
'asset',
'read') && !$user->hasRight(
'intracommreport',
'read')) {
59 require_once DOL_DOCUMENT_ROOT.
'/core/class/infobox.class.php';
62 $boxorder =
GETPOST(
'boxorder',
'aZ09');
63 $boxorder .=
GETPOST(
'boxcombo',
'aZ09');
76 $help_url =
'EN:Module_Double_Entry_Accounting#Setup|FR:Module_Comptabilité_en_Partie_Double#Configuration';
81 $boxlist =
'<div class="twocolumns">';
82 $boxlist .=
'<div class="firstcolumn fichehalfleft boxhalfleft" id="boxhalfleft">';
83 $boxlist .= $resultboxes[
'boxlista'];
85 $boxlist .=
'<div class="secondcolumn fichehalfright boxhalfright" id="boxhalfright">';
86 $boxlist .= $resultboxes[
'boxlistb'];
95 $helpisexpanded = empty($resultboxes[
'boxactivated']) || (empty($resultboxes[
'boxlista']) && empty($resultboxes[
'boxlistb']));
98 if (!$helpisexpanded) {
99 $showtutorial =
'<div class="right"><a href="#" id="show_hide">';
100 $showtutorial .=
img_picto(
'',
'chevron-down');
101 $showtutorial .=
' '.$langs->trans(
"ShowTutorial");
102 $showtutorial .=
'</a></div>';
104 $showtutorial .=
'<script type="text/javascript">
105 jQuery(document).ready(function() {
106 jQuery("#show_hide").click(function () {
107 jQuery( "#idfaq" ).toggle({
115 print
load_fiche_titre($langs->trans(
"AccountancyArea"), empty($resultboxes[
'selectboxlist']) ?
'' : $resultboxes[
'selectboxlist'],
'accountancy', 0,
'',
'', $showtutorial);
118 print
info_admin($langs->trans(
"SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices"));
122 print
'<div class="'.($helpisexpanded ?
'' :
'hideobject').
'" id="idfaq">';
124 print
'<span class="opacitymedium">'.$langs->trans(
"AccountancyAreaDescIntro").
"</span><br>\n";
125 if ($user->hasRight(
'accounting',
'chartofaccount')) {
127 print
load_fiche_titre(
'<span class="fa fa-calendar"></span> '.$langs->trans(
"AccountancyAreaDescActionOnce"),
'',
'').
"\n";
133 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescJournalSetup", $step,
'{s}');
134 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/journals_list.php?id=35" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"AccountingJournals").
'</strong></a>', $s);
138 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescChartModel", $step,
'{s}');
139 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/accountmodel.php?search_country_id='.$mysoc->country_id.
'" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"Pcg_version").
'</strong></a>', $s);
143 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescChart", $step,
'{s}');
144 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/account.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"Chartofaccounts").
'</strong></a>', $s);
150 $sql =
"SELECT a.rowid, a.pcg_version, a.label, a.active";
151 $sql .=
" FROM ".MAIN_DB_PREFIX.
"accounting_system as a";
152 $sql .=
" WHERE a.rowid = ".((int) $pcgver);
154 $resqlchart = $db->query(
$sql);
156 $obj = $db->fetch_object($resqlchart);
158 $pcgversion = $obj->pcg_version;
159 $pcglabel = $obj->label;
164 print
' <span class="opacitymedium">('.$langs->trans(
"CurrentChartOfAccount").
': '.$pcgversion.
')</span>';
169 print $langs->trans(
"AccountancyAreaDescActionOnceBis");
175 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescFiscalPeriod", $step,
'{s}');
176 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/fiscalyear.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"FiscalPeriod").
'</strong></a>', $s);
182 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescDefault", $step,
'{s}');
183 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/defaultaccounts.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuDefaultAccounts").
'</strong></a>', $s);
188 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBank", $step,
'{s}').
"\n";
189 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/compta/bank/list.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuBankAccounts").
'</strong></a>', $s);
194 $textlink =
'<a href="'.DOL_URL_ROOT.
'/admin/dict.php?id=10&from=accountancy" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuVatAccounts").
'</strong></a>';
195 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescVat", $step,
'{s}');
196 $s = str_replace(
'{s}', $textlink, $s);
201 $textlink =
'<a href="'.DOL_URL_ROOT.
'/admin/dict.php?id=7&from=accountancy" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"MenuTaxAccounts").
'</strong></a>';
203 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescContrib", $step,
'{s}');
204 $s = str_replace(
'{s}', $textlink, $s);
210 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescExpenseReport", $step,
'{s}');
211 $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);
217 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescProd", $step,
'{s}');
218 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/admin/productaccount.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"Setup").
' - '.$langs->transnoentitiesnoconv(
"ProductsBinding").
'</strong></a>', $s);
228 print
load_fiche_titre(
'<span class="fa fa-calendar"></span> '.$langs->trans(
"AccountancyAreaDescActionFreq"),
'',
'');
233 $langs->loadLangs(array(
'bills',
'trips'));
236 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"BillsCustomers"),
'{s}').
"\n";
237 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/customer/index.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"CustomersVentilation").
'</strong></a>', $s);
242 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"BillsSuppliers"),
'{s}').
"\n";
243 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/supplier/index.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"SuppliersVentilation").
'</strong></a>', $s);
249 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescBind", chr(64 + $step), $langs->transnoentitiesnoconv(
"ExpenseReports"),
'{s}').
"\n";
250 $s = str_replace(
'{s}',
'<a href="'.DOL_URL_ROOT.
'/accountancy/expensereport/index.php" target="setupaccountancy"><strong>'.$langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"ExpenseReportsVentilation").
'</strong></a>', $s);
256 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescWriteRecords", chr(64 + $step), $langs->transnoentitiesnoconv(
"TransferInAccounting").
' - '.$langs->transnoentitiesnoconv(
"RegistrationInAccounting"), $langs->transnoentitiesnoconv(
"WriteBookKeeping")).
"\n";
261 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescAnalyze", chr(64 + $step)).
"<br>\n";
265 $s =
img_picto(
'',
'puce').
' '.$langs->trans(
"AccountancyAreaDescClosePeriod", chr(64 + $step)).
"<br>\n";
275 print
'<div class="clearboth"></div>';
277 print
load_fiche_titre($langs->trans(
"AccountancyArea"),
'',
'accountancy');
279 print
'<span class="opacitymedium">'.$langs->trans(
"Module10Desc").
"</span>\n";
283 print
load_fiche_titre($langs->trans(
"AccountancyArea"),
'',
'accountancy');
if(GETPOST('button_removefilter_x', 'alpha')||GETPOST('button_removefilter.x', 'alpha')||GETPOST('button_removefilter', 'alpha')) if(GETPOST('button_search_x', 'alpha')||GETPOST('button_search.x', 'alpha')||GETPOST('button_search', 'alpha')) if($action=="save" &&empty($cancel)) $help_url
View.
static saveboxorder($dbs, $zone, $boxorder, $userid=0)
Save order of boxes for area and user.
if(isModEnabled('invoice') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD') && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) if(isModEnabled('invoice') &&isModEnabled('order') && $user->hasRight("commande", "lire") &&!getDolGlobalString('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')) $sql
Social contributions to pay.
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information in HTML for admin users or standard users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
if(!defined('NOTOKENRENEWAL')) if(!defined('NOLOGIN')) if(!defined('NOCSRFCHECK')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) if(!defined('NOIPCHECK')) if(!defined('NOBROWSERNOTIF')) llxHeader()
Header empty.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.