diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index e5189a11540..8076264655b 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -1,7 +1,7 @@ - * Copyright (C) 2016-2019 Alexandre Spangaro - * Copyright (C) 2019 Frédéric France +/* Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,14 +44,14 @@ $hookmanager->initHooks(array('accountancyindex')); if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) { - require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; - $zone=GETPOST('areacode', 'aZ09'); - $userid=GETPOST('userid', 'int'); - $boxorder=GETPOST('boxorder', 'aZ09'); - $boxorder.=GETPOST('boxcombo', 'aZ09'); + require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; + $zone=GETPOST('areacode', 'aZ09'); + $userid=GETPOST('userid', 'int'); + $boxorder=GETPOST('boxorder', 'aZ09'); + $boxorder.=GETPOST('boxcombo', 'aZ09'); - $result=InfoBox::saveboxorder($db, $zone, $boxorder, $userid); - if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null); + $result=InfoBox::saveboxorder($db, $zone, $boxorder, $userid); + if ($result > 0) setEventMessages($langs->trans("BoxAdded"), null); } /* @@ -62,181 +62,185 @@ llxHeader('', $langs->trans("AccountancyArea")); if ($conf->accounting->enabled) { - $resultboxes=FormOther::getBoxesArea($user, "1"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) + $step = 0; - print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy'); + $resultboxes=FormOther::getBoxesArea($user, "1"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) - // FAQ - if (empty($conf->global->ACCOUNTING_DISABLE_FAQ)) { - $step = 0; + print load_fiche_titre($langs->trans("AccountancyArea"), $resultboxes['selectboxlist'], 'accountancy'); - print '' . $langs->trans("AccountancyAreaDescIntro") . "
\n"; - print "
\n"; - print "
\n"; - print load_fiche_titre(' ' . $langs->trans("AccountancyAreaDescActionOnce"), - '', '') . "\n"; - print '
'; - print "
\n"; + print ''; - // STEPS - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescJournalSetup", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("AccountingJournals") . '' . ''); - print "
\n"; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescChartModel", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("Pcg_version") . '' . ''); - print "
\n"; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescChart", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("Chartofaccounts") . '' . ''); - print "
\n"; + print ''; - print "
\n"; - print $langs->trans("AccountancyAreaDescActionOnceBis"); - print "
\n"; - print "
\n"; + print '
'; // hideobject is to start hidden + print "
\n"; + print ''.$langs->trans("AccountancyAreaDescIntro")."
\n"; + print "
\n";print "
\n"; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescDefault", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . '' . ''); - print "
\n"; + print load_fiche_titre(' '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n"; + print '
'; + print "
\n"; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescBank", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("MenuBankAccounts") . '' . '') . "\n"; - print "
\n"; + // STEPS + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").''.''); + print "
\n"; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").''.''); + print "
\n"; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").''.''); + print "
\n"; - $step++; - $textlink = '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("MenuVatAccounts") . '' . ''; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescVat", $step, $textlink); - print "
\n"; - if (!empty($conf->tax->enabled)) { - $textlink = '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("MenuTaxAccounts") . '' . ''; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescContrib", $step, $textlink); - print "
\n"; - } - /*if (! empty($conf->salaries->enabled)) - { - $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, ''.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); - // htdocs/admin/salaries.php - print "
\n"; - print "
\n"; - }*/ - if (!empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. - { - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescExpenseReport", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("MenuExpenseReportAccounts") . '' . ''); - print "
\n"; - } - /* - if (! empty($conf->loan->enabled)) - { - $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, ''.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").' '.$langs->transnoentitiesnoconv("or").' '.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); - print "
\n"; - } - if (! empty($conf->don->enabled)) - { - $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); - print "
\n"; - } - if (! empty($conf->adherents->enabled)) - { - $step++; - print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); - print "
\n"; - }*/ + print "
\n"; + print $langs->trans("AccountancyAreaDescActionOnceBis"); + print "
\n"; + print "
\n"; - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescProd", $step, - '' . '' . $langs->transnoentitiesnoconv("Setup") . ' - ' . $langs->transnoentitiesnoconv("ProductsBinding") . '' . ''); - print "
\n"; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''.''); + print "
\n"; - print '
'; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").''.'')."\n"; + print "
\n"; - // Step A - E - - print "
\n"; - print load_fiche_titre(' ' . $langs->trans("AccountancyAreaDescActionFreq"), - '', ''); - print '
'; - print "
\n"; - $step = 0; - - $langs->loadLangs(array('bills', 'trips')); - - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescBind", chr(64 + $step), - $langs->transnoentitiesnoconv("BillsCustomers"), - '' . '' . $langs->transnoentitiesnoconv("TransferInAccounting") . ' - ' . $langs->transnoentitiesnoconv("CustomersVentilation") . '' . '') . "\n"; - print "
\n"; - - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescBind", chr(64 + $step), - $langs->transnoentitiesnoconv("BillsSuppliers"), - '' . '' . $langs->transnoentitiesnoconv("TransferInAccounting") . ' - ' . $langs->transnoentitiesnoconv("SuppliersVentilation") . '' . '') . "\n"; - print "
\n"; - - if (!empty($conf->expensereport->enabled) || !empty($conf->deplacement->enabled)) { - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescBind", chr(64 + $step), - $langs->transnoentitiesnoconv("ExpenseReports"), - '' . '' . $langs->transnoentitiesnoconv("TransferInAccounting") . ' - ' . $langs->transnoentitiesnoconv("ExpenseReportsVentilation") . '' . '') . "\n"; - print "
\n"; - } - - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescWriteRecords", chr(64 + $step), - $langs->transnoentitiesnoconv("TransferInAccounting") . ' - ' . $langs->transnoentitiesnoconv("RegistrationInAccounting"), - $langs->transnoentitiesnoconv("WriteBookKeeping")) . "\n"; - print "
\n"; - - $step++; - print img_picto('', 'puce') . ' ' . $langs->trans("AccountancyAreaDescAnalyze", chr(64 + $step)) . "
\n"; - print "
\n"; - } - - print '
'; - - print '
'; - - /* - * Show boxes - */ - $boxlist.='
'; - - $boxlist.='
'; - if(!empty($nbworkboardcount)) + $step++; + $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").''.''; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink); + print "
\n"; + if (! empty($conf->tax->enabled)) { - $boxlist.=$boxwork; + $textlink = ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").''.''; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink); + print "
\n"; + } + /*if (! empty($conf->salaries->enabled)) + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, ''.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + // htdocs/admin/salaries.php + print "
\n"; + print "
\n"; + }*/ + if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several. + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").''.''); + print "
\n"; + } + /* + if (! empty($conf->loan->enabled)) + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, ''.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").' '.$langs->transnoentitiesnoconv("or").' '.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + print "
\n"; + } + if (! empty($conf->don->enabled)) + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + print "
\n"; + } + if (! empty($conf->adherents->enabled)) + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, ''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); + print "
\n"; + }*/ + + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, ''.''.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").''.''); + print "
\n"; + + + print '
'; + + // Step A - E + + print "
\n"; + print load_fiche_titre(' '.$langs->trans("AccountancyAreaDescActionFreq"), '', ''); + print '
'; + print "
\n"; + $step = 0; + + $langs->loadLangs(array('bills', 'trips')); + + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").''.'')."\n"; + print "
\n"; + + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").''.'')."\n"; + print "
\n"; + + if (! empty($conf->expensereport->enabled) || ! empty($conf->deplacement->enabled)) + { + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), ''.''.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").''.'')."\n"; + print "
\n"; } - $boxlist.=$resultboxes['boxlista']; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n"; + print "
\n"; - $boxlist.= '
'; - - $boxlist.= '
'; - - $boxlist.=$boxstat; - $boxlist.=$resultboxes['boxlistb']; - - $boxlist.= '
'; - $boxlist.= "\n"; - - $boxlist.='
'; - - - print $boxlist; + $step++; + print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."
\n"; + print "
\n"; print '
'; + + print '
'; + + print '
'; + + /* + * Show boxes + */ + $boxlist.='
'; + + $boxlist.='
'; + if(!empty($nbworkboardcount)) + { + $boxlist.=$boxwork; + } + + $boxlist.=$resultboxes['boxlista']; + + $boxlist.= '
'; + + $boxlist.= '
'; + + $boxlist.=$boxstat; + $boxlist.=$resultboxes['boxlistb']; + + $boxlist.= '
'; + $boxlist.= "\n"; + + $boxlist.='
'; + + + print $boxlist; + + print '
'; } else { + print load_fiche_titre($langs->trans("AccountancyArea"), '', 'accountancy'); + print $langs->trans("Module10Desc")."
\n"; } diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 38b0798d47d..30b060fb4d3 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -257,6 +257,7 @@ ListOfProductsWithoutAccountingAccount=List of products not bound to any account ChangeBinding=Change the binding Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger +ShowFAQ=Show FAQ ## Admin ApplyMassCategories=Apply mass categories