diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 4dcc4be7b01..98ecd8e327c 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -229,7 +229,7 @@ if ($resql) $htmlbuttonadd = '' . $langs->trans("Addanaccount") . ''; - print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit); + print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $htmlbuttonadd, '', $limit); // Box to select active chart of account print $langs->trans("Selectchartofaccounts") . " : "; @@ -258,6 +258,7 @@ if ($resql) print ""; print ajax_combobox("chartofaccounts"); print ''; + print '
'; print '
'; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index bf26348b50a..68486080ee7 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -47,16 +47,16 @@ if ($user->societe_id > 0) accessforbidden(); if (! $user->rights->accounting->fiscalyear) // If we can read accounting records, we shoul be able to see fiscal year. accessforbidden(); - + $error = 0; // List of status static $tmpstatut2label = array ( '0' => 'OpenFiscalYear', - '1' => 'CloseFiscalYear' + '1' => 'CloseFiscalYear' ); $statut2label = array ( - '' + '' ); foreach ( $tmpstatut2label as $key => $val ) $statut2label[$key] = $langs->trans($val); @@ -100,8 +100,8 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql.= $db->plimit($limit+1, $offset); $result = $db->query($sql); -if ($result) { - $var = false; +if ($result) +{ $num = $db->num_rows($result); $i = 0; @@ -132,8 +132,7 @@ if ($result) { print '' . dol_print_date($db->jdate($obj->date_end), 'day') . ''; print '' . $fiscalyearstatic->LibStatut($obj->statut, 5) . ''; print ''; - $var = ! $var; - $i ++; + $i++; } } else { print '' . $langs->trans("None") . ''; @@ -143,7 +142,6 @@ if ($result) { dol_print_error($db); } -dol_fiche_end(); // Buttons print '
'; diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 0dea177f00e..1b8934edbcd 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -66,8 +66,8 @@ $formaccounting = new FormAccounting($db); $formother = new FormOther($db); $form = new Form($db); -if (empty($search_date_start)) { - +if (empty($search_date_start)) +{ $month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); $year_start = dol_print_date(dol_now(), '%Y'); $year_end = $year_start + 1; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index eb991d55543..2cc006db4e1 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; // Langs $langs->load("accountancy"); @@ -99,9 +100,19 @@ $formother = new FormOther($db); $form = new Form($db); -if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) { - $search_date_start = dol_mktime(0, 0, 0, 1, 1, dol_print_date(dol_now(), '%Y')); - $search_date_end = dol_mktime(0, 0, 0, 12, 31, dol_print_date(dol_now(), '%Y')); +if ($action != 'export_file' && ! isset($_POST['begin']) && ! isset($_GET['begin']) && ! isset($_POST['formfilteraction']) && empty($page)) +{ + $month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); + $year_start = dol_print_date(dol_now(), '%Y'); + $year_end = $year_start + 1; + $month_end = $month_start - 1; + if ($month_end < 1) + { + $month_end = 12; + $year_end--; + } + $search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); + $search_date_end = dol_get_last_day($year_end, $month_end); } $arrayfields=array( @@ -398,18 +409,14 @@ $listofformat=AccountancyExport::getType(); $button = ''; if (count($filter)) $button.= $langs->trans("ExportFilteredList"); else $button.= $langs->trans("ExportList"); -$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')'; +//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')'; $button.= ''; + $groupby = ' ' . $langs->trans("GroupByAccountAccounting") . ''; +$addbutton = '' . $langs->trans("NewAccountingMvt") . ''; -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby, '', $limit); - -print '
' . "\n"; -print ''; -print ''; - -print '
'; +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $button, $result, $nbtotalofrecords, 'title_accountancy', 0, $groupby.$addbutton, '', $limit); $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields @@ -696,6 +703,12 @@ if ($num > 0) print ""; print '
'; +// TODO Replace this with mass action +print '
' . "\n"; +print '' . $langs->trans("DelBookKeeping") . ''; +print '
'; + + print ''; llxFooter(); diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index efc3d7f0eaa..f73b57b42f3 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; // Langs $langs->load("accountancy"); @@ -39,8 +40,22 @@ $page = GETPOST("page"); $sortorder = GETPOST("sortorder"); $sortfield = GETPOST("sortfield"); $action = GETPOST('action', 'alpha'); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); -$search_date_end = dol_mktime(0, 0, 0, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); + +if (empty($search_date_start)) +{ + $month_start= ($conf->global->SOCIETE_FISCAL_MONTH_START?($conf->global->SOCIETE_FISCAL_MONTH_START):1); + $year_start = dol_print_date(dol_now(), '%Y'); + $year_end = $year_start + 1; + $month_end = $month_start - 1; + if ($month_end < 1) + { + $month_end = 12; + $year_end--; + } + $search_date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); + $search_date_end = dol_get_last_day($year_end, $month_end); +} + $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); @@ -177,7 +192,7 @@ $num=count($object->lines); if ($action == 'delmouv') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delmouvconfirm', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?mvt_num=' . GETPOST('mvt_num'), $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvtPartial'), 'delmouvconfirm', '', 0, 1); print $formconfirm; } if ($action == 'delbookkeepingyear') { @@ -208,8 +223,9 @@ if ($action == 'delbookkeepingyear') { print '
'; $viewflat = ' ' . $langs->trans("ViewFlatList") . ''; +$addbutton = '' . $langs->trans("NewAccountingMvt") . ''; -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat,'', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $options, $sortfield, $sortorder, '', $result, $nbtotalofrecords,'title_accountancy',0,$viewflat.$addbutton,'', $limit); // Reverse sort order if ( preg_match('/^asc/i', $sortorder) ) @@ -217,10 +233,6 @@ if ( preg_match('/^asc/i', $sortorder) ) else $sortorder = "desc"; -print '
' . "\n"; -print ''; -print '
'; - print ''; print ''; diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index f06221a63f1..3d951dfc8f8 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -797,7 +797,7 @@ if (empty($action) || $action == 'view') { if ($obj->nb > 0) { print '
'.img_warning().' '.$langs->trans("TheJournalCodeIsNotDefinedOnSomeBankAccount"); - print ' : '.$langs->trans("AccountancyAreaDescBank", 9, ''.$langs->transnoentitiesnoconv("MenuBankCash").''); + print ' : '.$langs->trans("AccountancyAreaDescBank", 9, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("BankAccounts").''); } } else dol_print_error($db); @@ -813,8 +813,9 @@ if (empty($action) || $action == 'view') { print '
'; - print ''; print ''; + if ($in_bookkeeping == 'notyet') print ''; + else print '' . $langs->trans("WriteBookKeeping") . ''; print '
'; // TODO Avoid using js. We can use a direct link with $param diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index f324cbd3369..faf4823e5a8 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -539,7 +539,8 @@ if (empty($action) || $action == 'view') { print ''; } else { - print ''; + if ($in_bookkeeping == 'notyet') print ''; + else print '' . $langs->trans("WriteBookKeeping") . ''; } //print ''; print ''; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index a07fbd3a96d..3824aae0e50 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -645,13 +645,14 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; + print ''; if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') { print ''; } else { - print ''; + if ($in_bookkeeping == 'notyet') print ''; + else print '' . $langs->trans("WriteBookKeeping") . ''; } - print ''; print '
'; // TODO Avoid using js. We can use a direct link with $param diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index ffa27ee8fda..957844f6d56 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -576,13 +576,14 @@ if (empty($action) || $action == 'view') { print ' : '.$langs->trans("AccountancyAreaDescMisc", 4, ''.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").''); } print '
'; + print ''; if (empty($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER) || $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER == '-1') { print ''; } else { - print ''; + if ($in_bookkeeping == 'notyet') print ''; + else print '' . $langs->trans("WriteBookKeeping") . ''; } - print ''; print '
'; // TODO Avoid using js. We can use a direct link with $param diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 0e7a5458dff..62a67a56ddd 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3709,19 +3709,19 @@ function load_fiche_titre($titre, $morehtmlright='', $picto='title_generic.png', * @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder). Value must be 'urlencoded' before calling function. * @param string $sortfield Field to sort on ('' by default) * @param string $sortorder Order to sort ('' by default) - * @param string $center String in the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction() + * @param string $morehtmlcenter String in the middle ('' by default). We often find here string $massaction comming from $form->selectMassAction() * @param int $num Number of records found by select with limit+1 * @param int|string $totalnboflines Total number of records/lines for all pages (if known). Use a negative value of number to not show number. Use '' if unknown. * @param string $picto Icon to use before title (should be a 32x32 transparent png file) * @param int $pictoisfullpath 1=Icon name is a full absolute url of image - * @param string $morehtml More html to show + * @param string $morehtmlright More html to show * @param string $morecss More css to the table * @param int $limit Max number of lines (-1 = use default, 0 = no limit, > 0 = limit). * @param int $hideselectlimit Force to hide select limit * @param int $hidenavigation Force to hide all navigation tools * @return void */ -function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtml='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0) +function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $morehtmlcenter='', $num=-1, $totalnboflines='', $picto='title_generic.png', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limit=-1, $hideselectlimit=0, $hidenavigation=0) { global $conf,$langs; @@ -3755,9 +3755,9 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so print ''; // Center - if ($center) + if ($morehtmlcenter) { - print ''; + print ''; } // Right @@ -3811,7 +3811,7 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so } } - print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtml, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist + print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtmlright, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist print ''; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 63269cadc5d..a1172c93890 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -178,7 +178,6 @@ PostgreSqlExportParameters= PostgreSQL export parameters UseTransactionnalMode=Use transactional mode FullPathToMysqldumpCommand=Full path to mysqldump command FullPathToPostgreSQLdumpCommand=Full path to pg_dump command -ExportOptions=Export Options AddDropDatabase=Add DROP DATABASE command AddDropTable=Add DROP TABLE command ExportStructure=Structure diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 597dea33118..c04ad735721 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -803,6 +803,7 @@ Export=Export Exports=Exports ExportFilteredList=Export filtered list ExportList=Export list +ExportOptions=Export Options Miscellaneous=Miscellaneous Calendar=Calendar GroupBy=Group by... diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index fe7dea4d76f..abf1badc636 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -2250,6 +2250,9 @@ div.divButAction { div.tabsAction > a.butAction, div.tabsAction > a.butActionRefused { margin-bottom: 1.4em !important; } +div.tabsActionNoBottom > a.butAction, div.tabsActionNoBottom > a.butActionRefused { + margin-bottom: 0 !important; +} span.butAction, span.butActionDelete { cursor: pointer; @@ -2269,6 +2272,11 @@ span.butAction, span.butActionDelete { color: #fff; background: rgb(); border: 1px solid rgb(); + + border-top-right-radius: 0 !important; + border-bottom-right-radius: 0 !important; + border-top-left-radius: 0 !important; + border-bottom-left-radius: 0 !important; } .butAction:hover { @@ -2819,7 +2827,6 @@ input.liste_titre { .listactionlargetitle .liste_titre { line-height: 24px; } - .noborder tr.liste_total td, tr.liste_total td, form.liste_total div, .noborder tr.liste_total_wrap td, tr.liste_total_wrap td, form.liste_total_wrap div { color: #551188; font-weight: normal; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index f5415d2b90b..5d97b53b809 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2155,6 +2155,13 @@ div.tabBar table.tableforservicepart2:last-child { border-bottom: 1px solid #aaa; } +/* ============================================================================== */ +/* Boutons actions */ +/* ============================================================================== */ + +div.divButAction { + margin-bottom: 1.4em; +} div.tabsAction { margin: 20px 0em 20px 0em; padding: 0em 0em;
'.$center.''.$morehtmlcenter.'