From d4e2fab9834ab10bcd9be6b90f8b4c4aba8d74df Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 13 May 2019 22:25:15 +0200 Subject: [PATCH 1/4] Replace term "Advanced accountancy" by Accountancy (Double entries) --- htdocs/accountancy/admin/account.php | 2 +- htdocs/accountancy/admin/accountmodel.php | 2 +- htdocs/accountancy/admin/card.php | 2 +- htdocs/accountancy/admin/categories.php | 2 +- htdocs/accountancy/admin/closure.php | 2 +- htdocs/accountancy/admin/defaultaccounts.php | 2 +- htdocs/accountancy/admin/export.php | 2 +- htdocs/accountancy/admin/fiscalyear.php | 2 +- htdocs/accountancy/admin/fiscalyear_card.php | 2 +- htdocs/accountancy/admin/fiscalyear_info.php | 2 +- htdocs/accountancy/admin/index.php | 2 +- htdocs/accountancy/admin/journals_list.php | 2 +- htdocs/accountancy/admin/productaccount.php | 2 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- htdocs/accountancy/bookkeeping/balancebymonth.php | 2 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 7 +++++-- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- .../bookkeeping/thirdparty_lettering_supplier.php | 2 +- htdocs/accountancy/class/accountancycategory.class.php | 2 +- htdocs/accountancy/class/accountancyexport.class.php | 2 +- htdocs/accountancy/class/accountancysystem.class.php | 2 +- htdocs/accountancy/class/accountingaccount.class.php | 2 +- htdocs/accountancy/class/accountingjournal.class.php | 2 +- htdocs/accountancy/class/bookkeeping.class.php | 2 +- htdocs/accountancy/class/lettering.class.php | 2 +- htdocs/accountancy/customer/card.php | 2 +- htdocs/accountancy/customer/index.php | 2 +- htdocs/accountancy/customer/lines.php | 2 +- htdocs/accountancy/customer/list.php | 2 +- htdocs/accountancy/expensereport/card.php | 2 +- htdocs/accountancy/expensereport/index.php | 2 +- htdocs/accountancy/expensereport/lines.php | 2 +- htdocs/accountancy/expensereport/list.php | 2 +- htdocs/accountancy/index.php | 2 +- htdocs/accountancy/journal/bankjournal.php | 2 +- htdocs/accountancy/journal/expensereportsjournal.php | 2 +- htdocs/accountancy/journal/purchasesjournal.php | 2 +- htdocs/accountancy/journal/sellsjournal.php | 2 +- htdocs/accountancy/supplier/card.php | 2 +- htdocs/accountancy/supplier/index.php | 2 +- htdocs/accountancy/supplier/lines.php | 2 +- htdocs/accountancy/supplier/list.php | 2 +- 43 files changed, 47 insertions(+), 44 deletions(-) diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 9d4f4b68370..1a42b927506 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 Accountancy (Double entries) * \brief List accounting account */ diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 6404b6119e7..f44ff0071d2 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -28,7 +28,7 @@ /** * \file htdocs/accountancy/admin/accountmodel.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page to administer model of chart of accounts */ diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 6d43f01b03f..a6c3969e64a 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 Accountancy (Double entries) * \brief Card of accounting account */ diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index faba7fb1c62..17fa65d4f5e 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -18,7 +18,7 @@ /** * \file htdocs/accountancy/admin/categories.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page to assign mass categories to accounts */ diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index ff559332316..a638d598ac9 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -18,7 +18,7 @@ /** * \file htdocs/accountancy/admin/closure.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 4ea9ff9139a..cba9ac92f3b 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -24,7 +24,7 @@ /** * \file htdocs/accountancy/admin/defaultaccounts.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 15e455cf84c..74090e54120 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -23,7 +23,7 @@ /** * \file htdocs/accountancy/admin/export.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index df2dec9d3b1..47211087956 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -17,7 +17,7 @@ /** * \file htdocs/accountancy/admin/fiscalyear.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure fiscal year */ diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 4063e28f369..5dc6010d465 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -18,7 +18,7 @@ /** * \file htdocs/accountancy/admin/fiscalyear_card.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page to show a fiscal year */ diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 86b01fa7397..dfec49949a3 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -17,7 +17,7 @@ /** * \file htdocs/accountancy/admin/fiscalyear_info.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page to show info of a fiscal year */ diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 965b63ba9b9..fefa081848e 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -24,7 +24,7 @@ /** * \file htdocs/accountancy/admin/index.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure accounting expert module */ diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index c48e1a5989d..cac81bfbcae 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -18,7 +18,7 @@ /** * \file htdocs/accountancy/admin/journals_list.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Setup page to configure journals */ diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index 80c2ed052c0..4d5561e3aca 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/admin/productaccount.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief To define accounting account on product / service */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 6d2c7644d85..44a12b76f36 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/bookkeeping/balance.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Balance of book keeping */ diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index edf7383b595..b9568228a36 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/bookkeeping/balancebymonth.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Balance by month */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 8974b65a68f..24a0e9605a4 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/bookkeeping/card.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page to show book-entry */ diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 207ea3464d8..7df29416878 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2019 Alexandre Spangaro * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/bookkeeping/list.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief List operation of book keeping */ require '../../main.inc.php'; @@ -47,6 +47,9 @@ $search_date_creation_start = dol_mktime(0, 0, 0, GETPOST('date_creation_startmo $search_date_creation_end = dol_mktime(0, 0, 0, GETPOST('date_creation_endmonth', 'int'), GETPOST('date_creation_endday', 'int'), GETPOST('date_creation_endyear', 'int')); $search_date_modification_start = dol_mktime(0, 0, 0, GETPOST('date_modification_startmonth', 'int'), GETPOST('date_modification_startday', 'int'), GETPOST('date_modification_startyear', 'int')); $search_date_modification_end = dol_mktime(0, 0, 0, GETPOST('date_modification_endmonth', 'int'), GETPOST('date_modification_endday', 'int'), GETPOST('date_modification_endyear', 'int')); +$search_date_export_start = dol_mktime(0, 0, 0, GETPOST('date_export_startmonth', 'int'), GETPOST('date_export_startday', 'int'), GETPOST('date_export_startyear', 'int')); +$search_date_export_end = dol_mktime(0, 0, 0, GETPOST('date_export_endmonth', 'int'), GETPOST('date_export_endday', 'int'), GETPOST('date_export_endyear', 'int')); + //var_dump($search_date_start);exit; if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_delmvt")) { $action = 'delbookkeepingyear'; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 38dc49c5bf6..7b57f443ef9 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/bookkeeping/listbyaccount.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief List operation of book keeping ordered by account number */ diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 50b80c72338..87bd79bb64d 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/bookkeeping/thirdparty_lettrage_supplier.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Tab to setup lettering */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 523fba7acda..f11ff3957f7 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -19,7 +19,7 @@ /** * \file htdocs/accountancy/class/accountancycategory.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class to manage categories of an accounting category_type */ diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 344a45f19fc..5da52e05784 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -27,7 +27,7 @@ /** * \file htdocs/accountancy/class/accountancyexport.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Class accountancy export */ diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index c8a855c0d8a..102ee4cce61 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -19,7 +19,7 @@ /** * \file htdocs/accountancy/class/accountancysystem.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class to manage accountancy systems */ diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 33f8990bc8d..dc5d8eab77d 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/class/accountingaccount.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class to manage accounting accounts */ diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index eb99badd5f3..e8caaab8a89 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -17,7 +17,7 @@ /** * \file htdocs/accountancy/class/accountingjournal.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class to manage accounting journals */ diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 3c985d325bc..c1df8b1045c 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -20,7 +20,7 @@ /** * \file htdocs/accountancy/class/bookkeeping.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class to manage Ledger (General Ledger and Subledger) */ diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 555e1a244a6..a0c977a8d5a 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -20,7 +20,7 @@ /** * \file htdocs/accountancy/class/lettering.class.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief File of class for lettering */ diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 5c1dfc5ccbb..eb66b235d0b 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -19,7 +19,7 @@ /** * \file htdocs/accountancy/customer/card.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Card customer ventilation */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index aa8161b9c52..1086800e355 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/customer/index.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Home customer journalization page */ diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index f7a53c9e210..2801e234486 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/customer/lines.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page of detail of the lines of ventilation of invoices customers */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 4b3906d60da..90bb9574961 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/customer/list.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Ventilation page from customers invoices */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index eb620d7bf14..1052a1d485d 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -23,7 +23,7 @@ */ /** * \file htdocs/accountancy/supplier/card.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Card expense report ventilation */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index e350a3011a0..f5e71082bfa 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -20,7 +20,7 @@ /** * \file htdocs/accountancy/expensereport/index.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Home expense report ventilation */ diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 3a322c07ef3..30734bb803b 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/expensereport/lines.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page of detail of the lines of ventilation of expense reports */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 4f037f3c72b..ffb9297626b 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/expensereport/list.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Ventilation page from expense reports */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/index.php b/htdocs/accountancy/index.php index b34efe5ea04..922f1285b3c 100644 --- a/htdocs/accountancy/index.php +++ b/htdocs/accountancy/index.php @@ -18,7 +18,7 @@ /** * \file htdocs/accountancy/index.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Home accounting module */ diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index 275af10701d..49e76c51dde 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -27,7 +27,7 @@ /** * \file htdocs/accountancy/journal/bankjournal.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page with bank journal */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index 30ed5a07207..fcb0ac8713f 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -25,7 +25,7 @@ /** * \file htdocs/accountancy/journal/expensereportsjournal.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page with expense reports journal */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 6bbc4ad9c62..f23bc48c134 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -25,7 +25,7 @@ /** * \file htdocs/accountancy/journal/purchasesjournal.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page with purchases journal */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 25c53863162..ac36238af6e 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -26,7 +26,7 @@ /** * \file htdocs/accountancy/journal/sellsjournal.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page with sells journal */ diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 10e52d6c029..97f7d618ce8 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -23,7 +23,7 @@ */ /** * \file htdocs/accountancy/supplier/card.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Card supplier ventilation */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index ab85507a7b4..95bcc15b9fd 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -20,7 +20,7 @@ /** * \file htdocs/accountancy/supplier/index.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Home supplier journalization page */ diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 4af51060b4b..7752d8355f0 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -21,7 +21,7 @@ /** * \file htdocs/accountancy/supplier/lines.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Page of detail of the lines of ventilation of invoices suppliers */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 27cccdb7eb2..c6480c6d6eb 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -22,7 +22,7 @@ /** * \file htdocs/accountancy/supplier/list.php - * \ingroup Advanced accountancy + * \ingroup Accountancy (Double entries) * \brief Ventilation page from suppliers invoices */ require '../../main.inc.php'; From 7c9ccee64d21634b3a364cdb2bc0d5ec780f0c8c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Tue, 14 May 2019 05:45:36 +0200 Subject: [PATCH 2/4] NEW Accountancy - Differentiated export --- htdocs/accountancy/bookkeeping/list.php | 66 +++++++++++++++++-- .../accountancy/class/bookkeeping.class.php | 23 ++++--- .../install/mysql/migration/9.0.0-10.0.0.sql | 2 + .../tables/llx_accounting_bookkeeping.sql | 5 +- htdocs/langs/en_US/main.lang | 1 + 5 files changed, 80 insertions(+), 17 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 7df29416878..ac9811c687c 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -146,6 +146,7 @@ $arrayfields=array( 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), + 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>0), ); if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); @@ -181,6 +182,8 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_date_creation_end = ''; $search_date_modification_start = ''; $search_date_modification_end = ''; + $search_date_export_start = ''; + $search_date_export_end = ''; $search_debit = ''; $search_credit = ''; $search_lettering_code = ''; @@ -272,6 +275,16 @@ if (! empty($search_date_modification_end)) { $tmp=dol_getdate($search_date_modification_end); $param .= '&date_modification_endmonth=' . $tmp['mon'] . '&date_modification_endday=' . $tmp['mday'] . '&date_modification_endyear=' . $tmp['year']; } +if (! empty($search_date_export_start)) { + $filter['t.date_export>='] = $search_date_export_start; + $tmp=dol_getdate($search_date_export_start); + $param .= '&date_export_startmonth=' . $tmp['mon'] . '&date_export_startday=' . $tmp['mday'] . '&date_export_startyear=' . $tmp['year']; +} +if (! empty($search_date_export_end)) { + $filter['t.date_export<='] = $search_date_export_end; + $tmp=dol_getdate($search_date_export_end); + $param .= '&date_export_endmonth=' . $tmp['mon'] . '&date_export_endday=' . $tmp['mday'] . '&date_export_endyear=' . $tmp['year']; +} if (! empty($search_debit)) { $filter['t.debit'] = $search_debit; $param .= '&search_debit=' . urlencode($search_debit); @@ -351,8 +364,9 @@ if ($action == 'delmouvconfirm') { // Export into a file with format defined into setup (FEC, CSV, ...) if ($action == 'export_file') { + $reexportMovements = GETPOST('already_exported')=='on'?1:0; - $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); + $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $reexportMovements); if ($result < 0) { @@ -363,6 +377,22 @@ if ($action == 'export_file') { $accountancyexport = new AccountancyExport($db); $accountancyexport->export($object->lines); + // TODO Move in class bookKeeping + // Specify as export : update field date_export + foreach ( $object->lines as $movement ) { + $now = dol_now(); + $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; + $sql .= " SET date_export = '" . $db->idate($now) . "'"; + $sql .= " WHERE rowid = " . $movement->id; + + dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=" . $sql, LOG_DEBUG); + if ($db->query($sql)) { + $db->commit(); + } else { + $db->rollback(); + } + } + if (!empty($accountancyexport->errors)) { setEventMessages('', $accountancyexport->errors, 'errors'); @@ -446,10 +476,10 @@ print ''; print ''; $listofformat=AccountancyExport::getType(); -$button = ''; +$button = ' ' . $langs->trans("IncludeDocsAlreadyExported"); +$button .= 'global->ACCOUNTING_EXPORT_MODELCSV].')'.'" name="button_export_file" href="'.$_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'').'">'; if (count($filter)) $button.= $langs->trans("ExportFilteredList"); else $button.= $langs->trans("ExportList"); -//$button.=' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')'; $button.= ''; @@ -600,6 +630,20 @@ if (! empty($arrayfields['t.tms']['checked'])) print ''; print ''; } +// Date export +if (! empty($arrayfields['t.date_export']['checked'])) +{ + print ''; + print '
'; + print $langs->trans('From') . ' '; + print $form->selectDate($search_date_export_start, 'date_export_start', 0, 0, 1); + print '
'; + print '
'; + print $langs->trans('to') . ' '; + print $form->selectDate($search_date_export_end, 'date_export_end', 0, 0, 1); + print '
'; + print ''; +} // Action column print ''; $searchpicto=$form->showFilterButtons(); @@ -620,6 +664,7 @@ if (! empty($arrayfields['t.lettering_code']['checked'])) print_liste_field_tit if (! empty($arrayfields['t.code_journal']['checked'])) print_liste_field_titre($arrayfields['t.code_journal']['label'], $_SERVER['PHP_SELF'], "t.code_journal", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['t.date_creation']['checked'])) print_liste_field_titre($arrayfields['t.date_creation']['label'], $_SERVER['PHP_SELF'], "t.date_creation", "", $param, '', $sortfield, $sortorder, 'center '); if (! empty($arrayfields['t.tms']['checked'])) print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER['PHP_SELF'], "t.tms", "", $param, '', $sortfield, $sortorder, 'center '); +if (! empty($arrayfields['t.date_export']['checked'])) print_liste_field_titre($arrayfields['t.date_export']['label'], $_SERVER['PHP_SELF'], "t.date_export", "", $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; @@ -732,11 +777,20 @@ if ($num > 0) if (! $i) $totalarray['nbfield']++; } + // Exported operation date + if (! empty($arrayfields['t.date_export']['checked'])) + { + print '' . dol_print_date($line->date_export, 'dayhour') . ''; + if (! $i) $totalarray['nbfield']++; + } + // Action column print ''; - print '' . img_edit() . ' '; - print '' . img_delete() . ''; - print ''; + if(empty($line->date_export)) { + print '' . img_edit() . ' '; + print '' . img_delete() . ''; + } + print ''; if (! $i) $totalarray['nbfield']++; print "\n"; diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index c1df8b1045c..872bd56ca0f 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -866,15 +866,16 @@ class BookKeeping extends CommonObject /** * Load object in memory from the database * - * @param string $sortorder Sort Order - * @param string $sortfield Sort field - * @param int $limit Offset limit - * @param int $offset Offset limit - * @param array $filter Filter array - * @param string $filtermode Filter mode (AND or OR) - * @return int <0 if KO, >0 if OK + * @param string $sortorder Sort Order + * @param string $sortfield Sort field + * @param int $limit Offset limit + * @param int $offset Offset limit + * @param array $filter Filter array + * @param string $filtermode Filter mode (AND or OR) + * @param int $showAlreadyExportMovements Show movements when field 'date_export' is not empty (0:No / 1:Yes (Default)) + * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND', $showAlreadyExportMovements = 1) { global $conf; @@ -904,7 +905,8 @@ class BookKeeping extends CommonObject $sql .= " t.journal_label,"; $sql .= " t.piece_num,"; $sql .= " t.date_creation,"; - $sql .= " t.tms as date_modification"; + $sql .= " t.tms as date_modification,"; + $sql .= " t.date_export"; $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element . ' as t'; // Manage filter $sqlwhere = array (); @@ -924,6 +926,8 @@ class BookKeeping extends CommonObject $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; } elseif ($key == 't.tms>=' || $key == 't.tms<=') { $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; + } elseif ($key == 't.date_export>=' || $key == 't.date_export<=') { + $sqlwhere[] = $key . '\'' . $this->db->idate($value) . '\''; } elseif ($key == 't.credit' || $key == 't.debit') { $sqlwhere[] = natural_search($key, $value, 1, 1); } else { @@ -978,6 +982,7 @@ class BookKeeping extends CommonObject $line->piece_num = $obj->piece_num; $line->date_creation = $this->db->jdate($obj->date_creation); $line->date_modification = $this->db->jdate($obj->date_modification); + $line->date_export = $this->db->jdate($obj->date_export); $this->lines[] = $line; diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index b53d0603be6..ef8a8c7b750 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -366,4 +366,6 @@ ALTER TABLE llx_reception_extrafields ADD INDEX idx_reception_extrafields (fk_ob ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_projet integer DEFAULT NULL; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN fk_reception integer DEFAULT NULL; +ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL after date_validated; + \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index af693c273a4..4a8f3ac7587 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013-2014 Olivier Geffroy --- Copyright (C) 2013-2017 Alexandre Spangaro +-- Copyright (C) 2013-2019 Alexandre Spangaro -- -- 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 @@ -51,6 +51,7 @@ CREATE TABLE llx_accounting_bookkeeping piece_num integer NOT NULL, -- FEC:EcritureNum | accounting source document validated tinyint DEFAULT 0 NOT NULL, -- | 0 line not validated / 1 line validated (No deleting / No modification) date_validated datetime, -- FEC:ValidDate - import_key varchar(14), + date_export datetime DEFAULT NULL, -- + import_key varchar(14), -- extraparams varchar(255) -- for other parameters with json format ) ENGINE=innodb; diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index f91cbd8f1eb..be4d25cfef5 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -842,6 +842,7 @@ Exports=Exports ExportFilteredList=Export filtered list ExportList=Export list ExportOptions=Export Options +IncludeDocsAlreadyExported=Include docs already exported Miscellaneous=Miscellaneous Calendar=Calendar GroupBy=Group by... From 4ba8cf0641f6d435d52732610af84e08f973ba0c Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 23 May 2019 11:08:06 +0200 Subject: [PATCH 3/4] Fix --- htdocs/accountancy/bookkeeping/list.php | 74 +++++++++++++------ .../accountancy/class/bookkeeping.class.php | 4 +- htdocs/langs/en_US/main.lang | 4 + 3 files changed, 59 insertions(+), 23 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 80e9d9b2e71..6860bf94006 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -32,6 +32,7 @@ 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'; +require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; // Load translation files required by the page $langs->loadLangs(array("accountancy")); @@ -146,7 +147,7 @@ $arrayfields=array( 't.code_journal'=>array('label'=>$langs->trans("Codejournal"), 'checked'=>1), 't.date_creation'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0), 't.tms'=>array('label'=>$langs->trans("DateModification"), 'checked'=>0), - 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>0), + 't.date_export'=>array('label'=>$langs->trans("DateExport"), 'checked'=>1), ); if (empty($conf->global->ACCOUNTING_ENABLE_LETTERING)) unset($arrayfields['t.lettering_code']); @@ -364,9 +365,7 @@ if ($action == 'delmouvconfirm') { // Export into a file with format defined into setup (FEC, CSV, ...) if ($action == 'export_file') { - $reexportMovements = GETPOST('already_exported')=='on'?1:0; - - $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $reexportMovements); + $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); if ($result < 0) { @@ -374,33 +373,57 @@ if ($action == 'export_file') { } else { + // Export files $accountancyexport = new AccountancyExport($db); $accountancyexport->export($object->lines); - // TODO Move in class bookKeeping - // Specify as export : update field date_export - foreach ( $object->lines as $movement ) { - $now = dol_now(); - $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; - $sql .= " SET date_export = '" . $db->idate($now) . "'"; - $sql .= " WHERE rowid = " . $movement->id; + if (! empty($accountancyexport->errors)) + { + setEventMessages('', $accountancyexport->errors, 'errors'); + } else { + // Specify as export : update field date_export + // TODO Move in class bookKeeping + $error=0; + $db->begin(); - dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=" . $sql, LOG_DEBUG); - if ($db->query($sql)) { - $db->commit(); - } else { - $db->rollback(); + if (is_array($object->lines)) { + foreach ($object->lines as $movement) { + $now = dol_now(); + $sql = " UPDATE " . MAIN_DB_PREFIX . "accounting_bookkeeping"; + $sql .= " SET date_export = '" . $db->idate($now) . "'"; + $sql .= " WHERE rowid = " . $movement->id; + + dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=" . $sql, LOG_DEBUG); + $result = $db->query($sql); + if ($result) { + $db->commit(); + // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs'); + } else { + $db->rollback(); + // setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors'); + } + } } } - - if (!empty($accountancyexport->errors)) - { - setEventMessages('', $accountancyexport->errors, 'errors'); - } exit; } } +if ($action == 'setreexport') { + $export = 0; + $setreexport = GETPOST('value', 'int'); + if (! dolibarr_set_const($db, "ACCOUNTING_REEXPORT", $setreexport, 'yesno', 0, '', $conf->entity)) $error++; + + if (! $error) { + if ($conf->global->ACCOUNTING_REEXPORT == 1) { + setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsEnable"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("ExportOfPiecesAlreadyExportedIsDisable"), null, 'mesgs'); + } + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} /* * View @@ -481,7 +504,14 @@ $listofformat=AccountancyExport::getType(); if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList"); else $buttonLabel = $langs->trans("ExportList"); -$newcardbutton = ' ' . $langs->trans("IncludeDocsAlreadyExported"); +// Button re-export +if (! empty($conf->global->ACCOUNTING_REEXPORT)) { + print $newcardbutton =''.img_picto($langs->trans("Activated"), 'switch_on').' '; +} else { + print $newcardbutton =''.img_picto($langs->trans("Disabled"), 'switch_off').' '; +} +$newcardbutton.= $langs->trans("IncludeDocsAlreadyExported"); + $newcardbutton.= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$conf->global->ACCOUNTING_EXPORT_MODELCSV].')', 'fa fa-file-export', $_SERVER["PHP_SELF"].'?action=export_file'.($param?'&'.$param:'')); $newcardbutton.= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-object-group', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 872bd56ca0f..784c1ab06e8 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -936,10 +936,12 @@ class BookKeeping extends CommonObject } } $sql.= ' WHERE t.entity IN (' . getEntity('accountancy') . ')'; + if ($showAlreadyExportMovements == 0) { + $sql .= " AND t.date_export IS NULL"; + } if (count($sqlwhere) > 0) { $sql .= ' AND ' . implode(' ' . $filtermode . ' ', $sqlwhere); } - if (! empty($sortfield)) { $sql .= $this->db->order($sortfield, $sortorder); } diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index be4d25cfef5..996fdf63d1d 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -843,6 +843,10 @@ ExportFilteredList=Export filtered list ExportList=Export list ExportOptions=Export Options IncludeDocsAlreadyExported=Include docs already exported +ExportOfPiecesAlreadyExportedIsEnable=Export of pieces already exported is enable +ExportOfPiecesAlreadyExportedIsDisable=Export of pieces already exported is disable +AllExportedMovementsWereRecordedAsExported=All exported movements were recorded as exported +NotAllExportedMovementsCouldBeRecordedAsExported=Not all exported movements could be recorded as exported Miscellaneous=Miscellaneous Calendar=Calendar GroupBy=Group by... From 34a91ef96f1fb6442c915ad9e73e7f19d8c9a83b Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Thu, 23 May 2019 11:21:41 +0200 Subject: [PATCH 4/4] Apply button reexport on view list --- htdocs/accountancy/bookkeeping/list.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 6860bf94006..51ea2b9359f 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -436,14 +436,14 @@ llxHeader('', $title_page); // List $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); + $nbtotalofrecords = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); if ($nbtotalofrecords < 0) { setEventMessages($object->error, $object->errors, 'errors'); } } // TODO Do not use this -$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter); +$result = $object->fetchAll($sortorder, $sortfield, $limit, $offset, $filter, 'AND', $conf->global->ACCOUNTING_REEXPORT); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); }