diff --git a/.travis.yml b/.travis.yml index 8e1aa2aa10b..718356e8075 100644 --- a/.travis.yml +++ b/.travis.yml @@ -257,7 +257,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/codesniffer/ruleset.xml --encoding=utf-8 . + phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . set +e echo diff --git a/ChangeLog b/ChangeLog index 2a952c56e6f..750e5c035ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,9 +26,9 @@ check you make a fetch on object before calling the delete. - The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default. - Remove not used function calculate_byte(). Use dol_print_size() instead. - Function pdf_getTotalQty is now deprecated. Not used by Dolibarr core. -- Method expensereport->delete(id, user) has been replaced with delete(user) to follow good practice to - make a fetch on object before deleting it. - +- Method expensereport->delete(id, user) has been replaced with ->delete(user) + Method warehouse->delete(id) has been replace with ->delete(user) + This is to follow good practice to make a fetch on object before deleting it. ***** ChangeLog for 4.0.0 compared to 3.9.* ***** diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 2f7228eb9d4..63f99184884 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -19,7 +19,7 @@ /** * \file htdocs/accountancy/admin/account.php - * \ingroup Advanced accountancy + * \ingroup Advanced accountancy * \brief List accounting account */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 057e2f0484c..6ce8bb5fad0 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -19,7 +19,7 @@ /** * \file htdocs/accountancy/admin/card.php - * \ingroup Advanced accountancy + * \ingroup Advanced accountancy * \brief Card of accounting account */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index f9fb603e483..5b767208987 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -16,12 +16,12 @@ */ /** - * \file htdocs/accountancy/admin/fiscalyear.php - * \ingroup fiscal year - * \brief Setup page to configure fiscal year + * \file htdocs/accountancy/admin/fiscalyear.php + * \ingroup Advanced accountancy + * \brief Setup page to configure fiscal year */ -require '../../main.inc.php'; +require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/fiscalyear.class.php'; @@ -45,9 +45,9 @@ $langs->load("compta"); // Security check if ($user->societe_id > 0) accessforbidden(); -if (! $user->rights->accounting->fiscalyear) - accessforbidden(); - +if (! $user->rights->mouvements->lire) // If we can read accounting records, we shoul be able to see fiscal year. + accessforbidden(); + $error = 0; // List of status @@ -65,6 +65,7 @@ $errors = array (); $object = new Fiscalyear($db); + /* * Actions */ @@ -146,7 +147,14 @@ dol_fiche_end(); // Buttons print '
| ' . $langs->trans("Account") . ' | '; print '' . $langs->trans("Label") . ' | '; for($i = 1; $i <= 12; $i ++) { - print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; + print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; } -print '' . $langs->trans("Total") . ' | ' . $langs->trans("Total") . ' | '; $sql = "SELECT " . $db->ifsql('aa.account_number IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.account_number') . " AS codecomptable,"; $sql .= " " . $db->ifsql('aa.label IS NULL', "'".$langs->trans('NotMatch')."'", 'aa.label') . " AS intitule,"; @@ -220,9 +220,9 @@ print "
| ' . $langs->trans("TotalVente") . ' | '; for($i = 1; $i <= 12; $i ++) { - print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; + print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; } -print '' . $langs->trans("Total") . ' | ' . $langs->trans("Total") . ' | '; $sql = "SELECT '" . $langs->trans("TotalVente") . "' AS total,"; for($i = 1; $i <= 12; $i ++) { @@ -264,9 +264,9 @@ if (! empty($conf->margin->enabled)) { print '
| ' . $langs->trans("TotalMarge") . ' | '; for($i = 1; $i <= 12; $i ++) { - print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; + print '' . $langs->trans('MonthShort' . str_pad($i, 2, '0', STR_PAD_LEFT)) . ' | '; } - print '' . $langs->trans("Total") . ' | ' . $langs->trans("Total") . ' | '; $sql = "SELECT '" . $langs->trans("Vide") . "' AS marge,"; for($i = 1; $i <= 12; $i ++) { @@ -291,9 +291,9 @@ if (! empty($conf->margin->enabled)) { print '
| ' . $row[0] . ' | '; for($i = 1; $i <= 12; $i ++) { - print '' . price($row[$i]) . ' | '; + print '' . price(price2num($row[$i])) . ' | '; } - print '' . price($row[13]) . ' | '; + print '' . price(price2num($row[13])) . ' | '; print '
| '; if ($product_static->id) print $product_static->getNomUrl(1); diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 0c1a4d1eb6b..7d2326b05e5 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -103,9 +103,12 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) { $search_vat = ''; } + + /* * View */ + llxHeader('', $langs->trans("Ventilation")); print ' +'."\n"; + +llxFooter(); +$db->close(); + diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 5daa387dc76..66ade35e09e 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -118,18 +118,20 @@ llxHeader('', $title); // Show tabs $head = marges_prepare_head($user); $picto = 'margin'; -dol_fiche_head($head, $langs->trans('checkMargins'), $title, 0, $picto); print ' |