From 872c99afe951b1ed23611681c0f68e73625dc5b3 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 12 Apr 2016 11:35:39 +0200 Subject: [PATCH 1/9] FIX Hook resprint be printed --- htdocs/core/tpl/objectline_create.tpl.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 31ad9716155..71d34ac4cd4 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -32,7 +32,7 @@ $usemargins=0; -if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) +if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) { $usemargins=1; } @@ -193,11 +193,17 @@ else { { $parameters=array('fk_parent_line'=>GETPOST('fk_parent_line','int')); $reshook=$hookmanager->executeHooks('formCreateProductOptions',$parameters,$object,$action); + if (!empty($hookmanager->resPrint)) { + print $hookmanager->resPrint; + } } if (is_object($hookmanager) && ! empty($senderissupplier)) { $parameters=array('htmlname'=>'addproduct'); $reshook=$hookmanager->executeHooks('formCreateProductSupplierOptions',$parameters,$object,$action); + if (!empty($hookmanager->resPrint)) { + print $hookmanager->resPrint; + } } @@ -476,7 +482,7 @@ jQuery(document).ready(function() { $("#select_type").change(function() { setforfree(); - if (jQuery('#select_type').val() >= 0) + if (jQuery('#select_type').val() >= 0) { /* focus work on a standard textarea but not if field was replaced with CKEDITOR */ jQuery('#dp_desc').focus(); @@ -582,7 +588,7 @@ jQuery(document).ready(function() { /* To set focus */ - if (jQuery('#idprod').val() > 0 || jQuery('#idprodfournprice').val() > 0) + if (jQuery('#idprod').val() > 0 || jQuery('#idprodfournprice').val() > 0) { /* focus work on a standard textarea but not if field was replaced with CKEDITOR */ jQuery('#dp_desc').focus(); From 9de6d31c87d21642b5ce5a5167d5979cf9499dd5 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Wed, 13 Apr 2016 15:57:46 +0200 Subject: [PATCH 2/9] New add link to widthdraw slip card on bank transaction --- htdocs/compta/paiement/class/paiement.class.php | 12 ++++++++++++ .../prelevement/class/bonprelevement.class.php | 1 + 2 files changed, 13 insertions(+) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index daf43ec9d64..9e81180c4fe 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -563,6 +563,18 @@ class Paiement extends CommonObject } } + // Add link 'WithdrawalPayment' in bank_url + if (! $error && $label == '(WithdrawalPayment)') + { + $result=$acc->add_url_line( + $bank_line_id, + $this->id_prelevement, + DOL_URL_ROOT.'/compta/prelevement/card.php?id=', + $this->num_paiement, + 'withdraw' + ); + } + if (! $error && ! $notrigger) { // Appel des triggers diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 3c3a7d14ca0..31d9e4d67c1 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -462,6 +462,7 @@ class BonPrelevement extends CommonObject $paiement->amounts = $amounts; $paiement->paiementid = 3; // $paiement->num_paiement = $this->ref ; + $paiement->id_prelevement = $this->id ; $paiement_id = $paiement->create($user); if ($paiement_id < 0) From b5f7f962cc835d39c8e0faeeaf3b6311b452f581 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 15 Apr 2016 16:05:47 +0200 Subject: [PATCH 3/9] FIX Travis fails --- htdocs/core/modules/import/import_csv.modules.php | 3 ++- htdocs/core/modules/import/import_xlsx.modules.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 245f1a15794..895ed6de89d 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2012-2016 Juanjo Menent * * 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 @@ -171,6 +171,7 @@ class ImportCsv extends ModeleImports /** * Return nb of records. File must be closed. * + * @param string $file Path of filename * @return int <0 if KO, >=0 if OK */ function import_get_nb_of_lines($file) diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 309e3dd7085..627fcfd6fd9 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2012-2016 Juanjo Menent * * 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 @@ -214,7 +214,8 @@ class Importxlsx extends ModeleImports /** * Return nb of records. File must be closed. - * + * + * @param string $file Path of filename * @return int <0 if KO, >=0 if OK */ function import_get_nb_of_lines($file) From f86952dfaa5fef098a89332f23c9d44f1dcd1e15 Mon Sep 17 00:00:00 2001 From: Juanjo Menent Date: Fri, 15 Apr 2016 16:57:11 +0200 Subject: [PATCH 4/9] FIX Add missing field fk_shipping_method_id --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 1 + htdocs/install/mysql/tables/llx_societe.sql | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 8296aa82e74..70cb245c772 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -382,3 +382,4 @@ ALTER TABLE llx_product_fournisseur_price ADD supplier_reputation varchar(10) NU -- Delete old deprecated field ALTER TABLE llx_product_stock DROP COLUMN pmp; +ALTER TABLE llx_societe ADD COLUMN fk_shipping_method_id integer; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index 9822272e7c2..e5d6f722d2c 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -103,5 +103,6 @@ create table llx_societe webservices_key varchar(128), -- supplier webservice key fk_multicurrency integer, - multicurrency_code varchar(255) + multicurrency_code varchar(255), + fk_shipping_method_id integer )ENGINE=innodb; From bc949cafd28ef6c216720d345eb0fc5ef2bdfc3b Mon Sep 17 00:00:00 2001 From: appchecker Date: Sat, 16 Apr 2016 13:39:55 +0300 Subject: [PATCH 5/9] fix: comparing instead of assign --- htdocs/theme/md/style.css.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8997231230f..30188232239 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -120,7 +120,7 @@ if (empty($conf->global->THEME_ELDY_ENABLE_PERSONALIZED)) $conf->global->THEME_ELDY_LINEPAIR1='250,250,250'; $conf->global->THEME_ELDY_LINEPAIR2='248,248,248'; $conf->global->THEME_ELDY_LINEPAIRHOVER='238,246,252'; - $conf->global->THEME_ELDY_USE_HOVER=='238,246,252'; + $conf->global->THEME_ELDY_USE_HOVER='238,246,252'; $conf->global->THEME_ELDY_TEXT='0,0,0'; $conf->global->THEME_ELDY_FONT_SIZE1='13'; $conf->global->THEME_ELDY_FONT_SIZE2='11'; From b59c94e056614f1b20a934948fae6a81d33110f0 Mon Sep 17 00:00:00 2001 From: aspangaro Date: Sun, 17 Apr 2016 15:44:04 +0200 Subject: [PATCH 6/9] NEW: Accountancy - Add Result page & review --- htdocs/accountancy/admin/export.php | 6 +- htdocs/accountancy/admin/importaccounts.php | 6 +- htdocs/accountancy/admin/index.php | 16 +- htdocs/accountancy/admin/journal.php | 6 +- htdocs/accountancy/admin/productaccount.php | 10 +- htdocs/accountancy/bookkeeping/balance.php | 2 +- .../bookkeeping/balancebymonth.php | 6 +- htdocs/accountancy/bookkeeping/card.php | 2 +- htdocs/accountancy/bookkeeping/list.php | 2 +- .../class/accountancycategory.class.php | 386 ++++++++++++++++++ .../class/accountancyexport.class.php | 12 +- .../class/accountancysystem.class.php | 6 +- .../class/accountingaccount.class.php | 6 +- .../accountancy/class/bookkeeping.class.php | 24 +- .../class/html.formventilation.class.php | 6 +- htdocs/accountancy/customer/index.html | 0 htdocs/accountancy/customer/index.php | 12 +- htdocs/accountancy/customer/lines.php | 29 +- htdocs/accountancy/journal/index.php | 45 -- .../accountancy/journal/purchasesjournal.php | 6 +- htdocs/accountancy/report/index.html | 0 htdocs/accountancy/report/result.php | 240 +++++++++++ htdocs/accountancy/supplier/index.php | 10 +- htdocs/accountancy/supplier/lines.php | 21 +- .../core/class/html.formaccounting.class.php | 5 +- htdocs/core/lib/accounting.lib.php | 37 -- htdocs/core/menus/init_menu_auguria.sql | 27 +- htdocs/core/menus/standard/eldy.lib.php | 9 +- .../install/mysql/migration/3.9.0-4.0.0.sql | 5 +- .../tables/llx_c_accounting_category.sql | 8 +- htdocs/langs/en_US/accountancy.lang | 35 +- htdocs/langs/en_US/compta.lang | 1 + 32 files changed, 764 insertions(+), 222 deletions(-) create mode 100644 htdocs/accountancy/class/accountancycategory.class.php create mode 100644 htdocs/accountancy/customer/index.html delete mode 100644 htdocs/accountancy/journal/index.php create mode 100644 htdocs/accountancy/report/index.html create mode 100644 htdocs/accountancy/report/result.php diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 1a32c22e12f..7b4ca7f91ce 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -21,9 +21,9 @@ */ /** - * \file htdocs/accountancy/admin/export.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/export.php + * \ingroup Advanced accountancy + * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index 15bd063bf9c..0dc560aa62e 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -19,9 +19,9 @@ */ /** - * \file htdocs/accountancy/admin/importaccounts.php - * \ingroup Accounting Expert - * \brief Page import accounting account + * \file htdocs/accountancy/admin/importaccounts.php + * \ingroup Advanced accountancy + * \brief Page import accounting account */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 6a63ad433cb..c9041e2a848 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent @@ -23,9 +23,9 @@ */ /** - * \file htdocs/accountancy/admin/index.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/index.php + * \ingroup Advanced accountancy + * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; @@ -38,6 +38,7 @@ $langs->load("compta"); $langs->load("bills"); $langs->load("admin"); $langs->load("accountancy"); +$langs->load("salaries"); // Security check if (! $user->admin) @@ -45,7 +46,7 @@ if (! $user->admin) $action = GETPOST('action', 'alpha'); -// Other parameters ACCOUNTING_* +// Parameters ACCOUNTING_* and others $list = array ( 'ACCOUNTING_LIMIT_LIST_VENTILATION', 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc @@ -63,8 +64,11 @@ $list_account = array ( 'ACCOUNTING_SERVICE_SOLD_ACCOUNT', 'ACCOUNTING_VAT_BUY_ACCOUNT', 'ACCOUNTING_VAT_SOLD_ACCOUNT', + 'ACCOUNTING_VAT_PAY_ACCOUNT', 'ACCOUNTING_ACCOUNT_SUSPENSE', - 'ACCOUNTING_ACCOUNT_TRANSFER_CASH' + 'ACCOUNTING_ACCOUNT_TRANSFER_CASH', + 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT', + 'DONATION_ACCOUNTINGACCOUNT' ); /* diff --git a/htdocs/accountancy/admin/journal.php b/htdocs/accountancy/admin/journal.php index e1b76273193..ca4ab67aee8 100644 --- a/htdocs/accountancy/admin/journal.php +++ b/htdocs/accountancy/admin/journal.php @@ -22,9 +22,9 @@ */ /** - * \file htdocs/accountancy/admin/journal.php - * \ingroup Accounting Expert - * \brief Setup page to configure accounting expert module + * \file htdocs/accountancy/admin/journal.php + * \ingroup Advanced accountancy + * \brief Setup page to configure accounting expert module */ require '../../main.inc.php'; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index b7d563c9621..d6f21960a49 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -20,9 +20,9 @@ */ /** - * \file htdocs/accountancy/admin/productaccount.php - * \ingroup Accounting Expert - * \brief To define accounting account on product / service + * \file htdocs/accountancy/admin/productaccount.php + * \ingroup Advanced accountancy + * \brief To define accounting account on product / service */ require '../../main.inc.php'; @@ -184,7 +184,7 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both * View */ -llxHeader('', $langs->trans("Accounts")); +llxHeader('', $langs->trans("InitAccountancy")); print '