From b2c57cb4f2e9f2f2f83851b70523b60336600ca5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 27 Jan 2019 19:43:56 +0100 Subject: [PATCH 01/20] fix travis --- htdocs/core/modules/expensereport/mod_expensereport_jade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expensereport/mod_expensereport_jade.php b/htdocs/core/modules/expensereport/mod_expensereport_jade.php index 4690b64e0b5..1be0c815bd9 100644 --- a/htdocs/core/modules/expensereport/mod_expensereport_jade.php +++ b/htdocs/core/modules/expensereport/mod_expensereport_jade.php @@ -78,7 +78,7 @@ class mod_expensereport_jade extends ModeleNumRefExpenseReport /** - * Test whether the numbers already in force in the base do not cause conflicts + * Test whether the numbers already in force in the base do not cause conflicts * that would prevent this numbering from working. * * @return boolean false si conflit, true si ok From cc88c4f8ffc705937e184f5328a75fe1c6d08d48 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 28 Jan 2019 21:39:22 +0100 Subject: [PATCH 02/20] Move my email to the new one --- .mailmap | 6 +++--- 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/categories_list.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/importaccounts.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 | 2 +- htdocs/accountancy/bookkeeping/listbyaccount.php | 2 +- .../bookkeeping/thirdparty_lettering_customer.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/expensereport/card.php | 2 +- htdocs/accountancy/expensereport/index.php | 2 +- htdocs/accountancy/expensereport/lines.php | 2 +- htdocs/accountancy/expensereport/list.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 +- htdocs/accountancy/tpl/export_journal.tpl.php | 2 +- htdocs/adherents/card.php | 2 +- htdocs/adherents/class/adherent.class.php | 2 +- htdocs/adherents/list.php | 2 +- htdocs/adherents/subscription.php | 2 +- htdocs/adherents/type.php | 2 +- htdocs/admin/accountant.php | 2 +- htdocs/admin/company.php | 2 +- htdocs/admin/dict.php | 2 +- htdocs/admin/loan.php | 2 +- htdocs/admin/mails_templates.php | 2 +- htdocs/admin/openinghours.php | 2 +- htdocs/admin/salaries.php | 2 +- htdocs/admin/taxes.php | 2 +- htdocs/asset/admin/assets_extrafields.php | 2 +- htdocs/asset/admin/assets_type_extrafields.php | 2 +- htdocs/asset/admin/setup.php | 2 +- htdocs/asset/card.php | 2 +- htdocs/asset/class/asset.class.php | 2 +- htdocs/asset/class/asset_type.class.php | 2 +- htdocs/asset/document.php | 2 +- htdocs/asset/info.php | 2 +- htdocs/asset/list.php | 2 +- htdocs/asset/note.php | 2 +- htdocs/asset/type.php | 2 +- htdocs/comm/action/card.php | 2 +- htdocs/comm/card.php | 2 +- htdocs/compta/bank/bankentries_list.php | 2 +- htdocs/compta/bank/card.php | 2 +- htdocs/compta/bank/class/account.class.php | 2 +- htdocs/compta/bank/class/paymentvarious.class.php | 2 +- htdocs/compta/bank/ligne.php | 2 +- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/bank/various_payment/document.php | 2 +- htdocs/compta/bank/various_payment/info.php | 2 +- htdocs/compta/bank/various_payment/list.php | 2 +- htdocs/compta/cashcontrol/report.php | 2 +- htdocs/compta/charges/index.php | 2 +- htdocs/compta/facture/class/facture.class.php | 2 +- htdocs/compta/facture/fiche-rec.php | 2 +- htdocs/compta/facture/invoicetemplate_list.php | 2 +- htdocs/compta/journal/purchasesjournal.php | 2 +- htdocs/compta/journal/sellsjournal.php | 2 +- htdocs/compta/paiement/cheque/card.php | 2 +- htdocs/compta/paiement/cheque/list.php | 2 +- htdocs/compta/paiement/list.php | 2 +- htdocs/compta/resultat/result.php | 2 +- htdocs/compta/salaries/card.php | 2 +- htdocs/compta/salaries/class/paymentsalary.class.php | 2 +- htdocs/compta/salaries/class/salariesstats.class.php | 2 +- htdocs/compta/salaries/document.php | 2 +- htdocs/compta/salaries/info.php | 2 +- htdocs/compta/salaries/list.php | 2 +- htdocs/compta/salaries/stats/index.php | 2 +- htdocs/compta/sociales/card.php | 2 +- htdocs/compta/sociales/class/chargesociales.class.php | 2 +- htdocs/compta/sociales/payments.php | 2 +- htdocs/compta/tva/card.php | 2 +- htdocs/compta/tva/class/tva.class.php | 2 +- htdocs/compta/tva/info.php | 2 +- htdocs/compta/tva/list.php | 2 +- htdocs/contact/agenda.php | 2 +- htdocs/contact/card.php | 2 +- htdocs/contact/class/contact.class.php | 2 +- htdocs/contact/document.php | 2 +- htdocs/contact/list.php | 2 +- htdocs/core/class/commonobject.class.php | 2 +- htdocs/core/class/fiscalyear.class.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/core/class/html.formaccounting.class.php | 2 +- htdocs/core/class/html.formbank.class.php | 2 +- htdocs/core/lib/accounting.lib.php | 2 +- htdocs/core/lib/asset.lib.php | 2 +- htdocs/core/lib/bank.lib.php | 2 +- htdocs/core/lib/company.lib.php | 2 +- htdocs/core/lib/doleditor.lib.php | 2 +- htdocs/core/lib/donation.lib.php | 2 +- htdocs/core/lib/fiscalyear.lib.php | 2 +- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/lib/hrm.lib.php | 2 +- htdocs/core/lib/loan.lib.php | 2 +- htdocs/core/lib/member.lib.php | 2 +- htdocs/core/lib/usergroups.lib.php | 2 +- htdocs/core/lib/vat.lib.php | 2 +- htdocs/core/modules/dons/html_cerfafr.modules.php | 2 +- .../core/modules/expensereport/doc/pdf_standard.modules.php | 2 +- htdocs/core/modules/modAccounting.class.php | 2 +- htdocs/core/modules/modAdherent.class.php | 2 +- htdocs/core/modules/modAsset.class.php | 2 +- htdocs/core/modules/modDon.class.php | 2 +- htdocs/core/modules/modHRM.class.php | 2 +- htdocs/core/modules/modLoan.class.php | 2 +- htdocs/core/modules/modSalaries.class.php | 2 +- htdocs/core/modules/modSocialNetworks.class.php | 2 +- htdocs/core/modules/modStripe.class.php | 2 +- .../supplier_invoice/mod_facture_fournisseur_cactus.php | 2 +- .../supplier_invoice/mod_facture_fournisseur_tulip.php | 2 +- htdocs/don/admin/donation.php | 2 +- htdocs/don/admin/donation_extrafields.php | 2 +- htdocs/don/card.php | 2 +- htdocs/don/class/don.class.php | 2 +- htdocs/don/class/paymentdonation.class.php | 2 +- htdocs/don/document.php | 2 +- htdocs/don/info.php | 2 +- htdocs/don/note.php | 2 +- htdocs/don/payment/card.php | 2 +- htdocs/don/payment/payment.php | 2 +- htdocs/don/stats/index.php | 2 +- htdocs/ecm/dir_add_card.php | 2 +- htdocs/ecm/index_auto.php | 2 +- htdocs/expensereport/card.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 2 +- htdocs/expensereport/class/paymentexpensereport.class.php | 2 +- htdocs/expensereport/index.php | 2 +- htdocs/expensereport/list.php | 2 +- htdocs/expensereport/payment/card.php | 2 +- htdocs/expensereport/payment/info.php | 2 +- htdocs/expensereport/payment/payment.php | 2 +- htdocs/fichinter/card-rec.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 2 +- htdocs/fourn/facture/card.php | 2 +- htdocs/fourn/facture/document.php | 2 +- htdocs/fourn/facture/info.php | 2 +- htdocs/fourn/facture/paiement.php | 2 +- htdocs/holiday/card.php | 2 +- htdocs/hrm/admin/admin_establishment.php | 2 +- htdocs/hrm/admin/admin_hrm.php | 2 +- htdocs/hrm/class/establishment.class.php | 2 +- htdocs/hrm/establishment/card.php | 2 +- htdocs/hrm/establishment/info.php | 2 +- htdocs/hrm/index.php | 2 +- htdocs/install/mysql/data/llx_00_c_country.sql | 2 +- htdocs/install/mysql/data/llx_accounting_abc.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_be.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_bf.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_bj.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cd.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cf.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cg.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ci.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cl.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_cm.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_dk.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_es.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_fr.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ga.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_gq.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_km.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ml.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_ne.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_sn.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_td.sql | 2 +- htdocs/install/mysql/data/llx_accounting_account_tg.sql | 2 +- htdocs/install/mysql/data/llx_accounting_category.sql | 2 +- htdocs/install/mysql/data/llx_c_hrm_department.sql | 2 +- htdocs/install/mysql/data/llx_c_hrm_function.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_account.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql | 2 +- .../install/mysql/tables/llx_accounting_bookkeeping_tmp.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_journal.key.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_journal.sql | 2 +- htdocs/install/mysql/tables/llx_accounting_system.sql | 2 +- htdocs/install/mysql/tables/llx_asset.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset.sql | 2 +- htdocs/install/mysql/tables/llx_asset_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type.sql | 2 +- .../install/mysql/tables/llx_asset_type_extrafields.key.sql | 2 +- htdocs/install/mysql/tables/llx_asset_type_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_bank_account.sql | 2 +- .../install/mysql/tables/llx_c_accounting_category.key.sql | 2 +- htdocs/install/mysql/tables/llx_c_accounting_category.sql | 2 +- htdocs/install/mysql/tables/llx_c_country.sql | 2 +- htdocs/install/mysql/tables/llx_c_hrm_department.sql | 2 +- htdocs/install/mysql/tables/llx_c_hrm_function.sql | 2 +- htdocs/install/mysql/tables/llx_c_paiement.sql | 2 +- htdocs/install/mysql/tables/llx_c_tva.sql | 2 +- htdocs/install/mysql/tables/llx_c_type_fees.sql | 2 +- htdocs/install/mysql/tables/llx_chargesociales.sql | 2 +- htdocs/install/mysql/tables/llx_don.sql | 2 +- htdocs/install/mysql/tables/llx_don_extrafields.key.sql | 2 +- htdocs/install/mysql/tables/llx_don_extrafields.sql | 2 +- htdocs/install/mysql/tables/llx_establishment.sql | 2 +- htdocs/install/mysql/tables/llx_loan.sql | 2 +- htdocs/install/mysql/tables/llx_loan_schedule.sql | 2 +- htdocs/install/mysql/tables/llx_payment_donation.sql | 2 +- htdocs/install/mysql/tables/llx_payment_expensereport.sql | 2 +- htdocs/install/mysql/tables/llx_payment_loan.sql | 2 +- htdocs/install/mysql/tables/llx_payment_salary.sql | 2 +- htdocs/install/mysql/tables/llx_payment_various.sql | 2 +- htdocs/install/mysql/tables/llx_user_rib.sql | 2 +- htdocs/langs/en_US/assets.lang | 2 +- htdocs/langs/fr_FR/assets.lang | 2 +- htdocs/langs/lv_LV/assets.lang | 2 +- htdocs/langs/pt_BR/assets.lang | 2 +- htdocs/loan/card.php | 2 +- htdocs/loan/class/loan.class.php | 2 +- htdocs/loan/class/paymentloan.class.php | 2 +- htdocs/loan/createschedule.php | 2 +- htdocs/loan/document.php | 2 +- htdocs/loan/info.php | 2 +- htdocs/loan/list.php | 2 +- htdocs/loan/note.php | 2 +- htdocs/loan/payment/card.php | 2 +- htdocs/loan/payment/payment.php | 2 +- htdocs/loan/schedule.php | 2 +- htdocs/opensurvey/wizard/create_survey.php | 2 +- htdocs/product/class/product.class.php | 2 +- htdocs/product/fournisseurs.php | 2 +- htdocs/product/price.php | 2 +- htdocs/projet/element.php | 2 +- htdocs/public/members/new.php | 2 +- htdocs/public/members/public_card.php | 2 +- htdocs/public/stripe/newpayment.php | 2 +- htdocs/societe/card.php | 2 +- htdocs/societe/class/societe.class.php | 2 +- htdocs/societe/contact.php | 2 +- htdocs/stripe/admin/stripe.php | 2 +- htdocs/stripe/config.php | 2 +- htdocs/stripe/lib/stripe.lib.php | 2 +- htdocs/theme/md/style.css.php | 2 +- htdocs/user/bank.php | 2 +- htdocs/user/card.php | 2 +- htdocs/user/class/user.class.php | 2 +- htdocs/user/class/userbankaccount.class.php | 2 +- htdocs/user/list.php | 2 +- scripts/accountancy/export-thirdpartyaccount.php | 2 +- 270 files changed, 272 insertions(+), 272 deletions(-) diff --git a/.mailmap b/.mailmap index 436b557ee63..ae4b0eb7146 100644 --- a/.mailmap +++ b/.mailmap @@ -21,9 +21,9 @@ Florian Henry FHenry Florian HENRY Florian Henry FHenry Florian Henry HENRY Florian -Alexandre Spangaro aspangaro -Alexandre Spangaro Spangaro Alexandre -Alexandre Spangaro Alexandre SPANGARO +Alexandre Spangaro aspangaro +Alexandre Spangaro Spangaro Alexandre +Alexandre Spangaro Alexandre SPANGARO Raphaël Doursenaud Raphaël Doursenaud Philippe Grand Grand Philippe Philippe Grand Philippe GRAND diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index 45ecb5cd6e6..78493da1e71 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2016-2018 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 0d1d5625958..159173ce1af 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index b8e6945b632..449d425b846 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 290aa93c0b7..14eec9fa58a 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -1,6 +1,6 @@ - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 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 diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index ebd8011469e..a508b7ed6c8 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2017 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 diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 6ef4bdda90b..21fef9a1930 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index 26620c635e2..06641d7d0a9 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2018 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 diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 42a6710c3c1..19f6da0c922 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2016 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 3141a624194..9dfa7a681e2 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2016 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 diff --git a/htdocs/accountancy/admin/importaccounts.php b/htdocs/accountancy/admin/importaccounts.php index d3a62b5a6ab..236ca09cfee 100644 --- a/htdocs/accountancy/admin/importaccounts.php +++ b/htdocs/accountancy/admin/importaccounts.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 536b3c38148..b3b8a67241b 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-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014 Marcos García * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index f26aba437e5..f9d495968ac 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 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 diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index bce4f12e559..78d2ac08e14 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index 6a323121a6e..8b35c9b4cec 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2018 Alexandre Spangaro + * Copyright (C) 2016-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/balancebymonth.php b/htdocs/accountancy/bookkeeping/balancebymonth.php index a01c42b285a..a5327a6cd35 100644 --- a/htdocs/accountancy/bookkeeping/balancebymonth.php +++ b/htdocs/accountancy/bookkeeping/balancebymonth.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index 4cc03f7a529..105c87409c1 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2017 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 509dcd88abe..41939ffd0ce 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-2018 Alexandre Spangaro * Copyright (C) 2016-2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index c2991ce2598..34481d7680d 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -2,7 +2,7 @@ /* Copyright (C) 2016 Neil Orley * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 19e0dcbaaac..7ca432bbbc1 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Laurent Destailleur * Copyright (C) 2013 Olivier Geffroy * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index 27d04962e1b..f9489040c36 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -3,7 +3,7 @@ * Copyright (C) 2005 Laurent Destailleur * Copyright (C) 2013 Olivier Geffroy * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 70752f6d268..6885df63b61 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016-2017 Alexandre Spangaro + * Copyright (C) 2016-2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 6f9c0534d2f..d61932884dc 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2015 Florian Henry * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Pierre-Henry Favre - * Copyright (C) 2016-2018 Alexandre Spangaro + * Copyright (C) 2016-2018 Alexandre Spangaro * Copyright (C) 2013-2017 Olivier Geffroy * Copyright (C) 2017 Elarifr. Ari Elbaz * Copyright (C) 2017 Frédéric France diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index b70fa7238bb..65852258867 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 38f4e49f2a6..681073332d7 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Ari Elbaz (elarifr) diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 94cfbf3bd66..2a2d050af7b 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 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 diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 047628a7b96..2aaf918b197 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015-2017 Florian Henry * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index 1130020b01d..a0b2c763d96 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2013 Olivier Geffroy - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 7d506c6c72c..5c1dfc5ccbb 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 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 diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 36f840315aa..9c9d0db38a4 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index 4a4cfa928ac..0a4065762aa 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2014-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index b245e2539a7..eb620d7bf14 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index f34456a95b9..81b1f81416a 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index c6fa1202171..12182bdaa43 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/expensereport/list.php b/htdocs/accountancy/expensereport/list.php index 078a91bc96e..c0d77fc753a 100644 --- a/htdocs/accountancy/expensereport/list.php +++ b/htdocs/accountancy/expensereport/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent s diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index cb58737b6f5..34a8d219b90 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2018 Frédéric France diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 2ff45e51bd5..54024fe6471 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2018 Frédéric France diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 09bc9a18e9a..9526bc763ec 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -4,7 +4,7 @@ * Copyright (C) 2011 Juanjo Menent * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2013-2016 Olivier Geffroy * Copyright (C) 2014 Raphaël Doursenaud diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 8de24e09a9e..10e52d6c029 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -1,7 +1,7 @@ * Copyright (C) 2005 Simon TOSSER - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index d63f8ee52fa..fcc6bbecd81 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -1,7 +1,7 @@ * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index 585c8400680..cf5d36d6e80 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2016 Florian Henry * Copyright (C) 2014 Juanjo Menent diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 1a315897f02..e04be12df3b 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014-2015 Ari Elbaz (elarifr) * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2014 Juanjo Menent s diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index ca3c9c49ea0..97f0da548ca 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2018 Alexandre Spangaro * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 2f2c5f9dde8..7a6898da9d3 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2018 Regis Houssin * Copyright (C) 2012 Marcos García * Copyright (C) 2012-2018 Philippe Grand - * Copyright (C) 2015-2018 Alexandre Spangaro + * Copyright (C) 2015-2018 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index d12d4b31aa2..959dacba2c1 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2009-2017 Regis Houssin - * Copyright (C) 2014-2018 Alexandre Spangaro + * Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2015-2018 Frédéric France * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index 8a8186fcd2b..d27c2365f47 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2014-2016 Juanjo Menent - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 86c31e6cd04..0c5618ca1d9 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2012-2017 Regis Houssin - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index b5407646359..499f41dce3e 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index 92d80464088..7b24260cd8d 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 41786c2c55b..c0599a666dc 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2010-2014 Juanjo Menent * Copyright (C) 2011-2017 Philippe Grand - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2017 Rui Strecht * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index c57a511b3c9..990bbec2932 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 419f6efbee9..20e0b59199a 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2017 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 diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index 35f5e5d6e72..49db8b8af23 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Remy Younes * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012 Christophe Battarel - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2018 Frédéric France diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index 19225273bfc..da5aed70c81 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/admin/salaries.php b/htdocs/admin/salaries.php index f724bd9e50c..057c2cfa3db 100644 --- a/htdocs/admin/salaries.php +++ b/htdocs/admin/salaries.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2015 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 diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 76e7496cc4e..b3fd9ef4359 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2011-2013 Juanjo Menent - * Copyright (C) 2015-2018 Alexandre Spangaro + * Copyright (C) 2015-2018 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 diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index f220d5cb849..2735981b564 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index a791078f37b..7038f6df5a0 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 57738309abd..236315b52d8 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index d8b8f3aa056..e24e6a96c83 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 93f2e88f725..aafdbacc791 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 54421b8910f..29851185391 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index c1332ed10a2..6433b30a543 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index e01316ae685..3c6260ffde7 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index fa1ef9f2760..c6710f290cc 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index f76c6ea028f..7e74ec0a805 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 861bbd2130e..31c328d9326 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 0c2bbb2e10f..053d6809c40 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2014 Cedric GROSS - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 916143b896a..cc5a0e6e29a 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2015 Marcos García * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index a3928cbc0ca..67e6deace4c 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -6,7 +6,7 @@ * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index b63136c8581..d20802dabbd 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2014-2017 Alexandre Spangaro + * Copyright (C) 2014-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 9e94d262c18..7c72ad8c362 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015-2016 Marcos García - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index cb8f21ecc5a..e126937e95c 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/ligne.php b/htdocs/compta/bank/ligne.php index d359a5c814f..f73073f2fe1 100644 --- a/htdocs/compta/bank/ligne.php +++ b/htdocs/compta/bank/ligne.php @@ -4,7 +4,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2004 Christophe Combelles * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Marcos García * Copyright (C) 2018 Frédéric France diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index d2adc857ec7..d9fa5c3c9a1 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index c255ef19c16..6b864c09f81 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 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 diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index d9f8709b155..34be85c6975 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 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 diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 91608666601..c6e5d95e3db 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 01c5aed49e7..85ef39a6c97 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -6,7 +6,7 @@ * Copyright (C) 2014 Florian Henry * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2016 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Andreu Bisquerra * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 66dc955aee7..9fe05e57bd9 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 14d01419037..9ed5e234882 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2013 Cedric Gross * Copyright (C) 2013 Florian Henry * Copyright (C) 2016 Ferran Marcet - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/facture/fiche-rec.php b/htdocs/compta/facture/fiche-rec.php index 7cc63b10e72..c0dd351f009 100644 --- a/htdocs/compta/facture/fiche-rec.php +++ b/htdocs/compta/facture/fiche-rec.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Meziane Sof * Copyright (C) 2017-2018 Frédéric France * diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 1b70c50c8f4..a025829f274 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Meziane Sof * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 2ab17905715..e979e297dd7 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2011-2012 Alexandre spangaro + * Copyright (C) 2011-2012 Alexandre spangaro * Copyright (C) 2013 Marcos García * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 42b2c8a95af..5aec70b1dec 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -3,7 +3,7 @@ * Copyright (C) 2007-2010 Jean Heimburger * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2011-2012 Alexandre Spangaro + * Copyright (C) 2011-2012 Alexandre Spangaro * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2013 Marcos García * Copyright (C) 2014 Raphaël Doursenaud diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index e186dfce4cd..f710ff2615e 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -4,7 +4,7 @@ * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2011-2016 Juanjo Menent * Copyright (C) 2013 Philippe Grand - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index d84b26f78b2..ab074e58541 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2006 Rodolphe Quiedeville * Copyright (C) 2007-2016 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 12669947cff..9234ca1e68d 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2013 Cédric Salvador * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Charlene Benke * diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 16d2631686c..85f38cb9905 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 Alexandre Spangaro * Copyright (C) 2018 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/salaries/card.php b/htdocs/compta/salaries/card.php index 474fcd0a6cb..91c0e169b5d 100644 --- a/htdocs/compta/salaries/card.php +++ b/htdocs/compta/salaries/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2018 Alexandre Spangaro * Copyright (C) 2014 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Charlie BENKE diff --git a/htdocs/compta/salaries/class/paymentsalary.class.php b/htdocs/compta/salaries/class/paymentsalary.class.php index 8f55b5804cc..21423f85e87 100644 --- a/htdocs/compta/salaries/class/paymentsalary.class.php +++ b/htdocs/compta/salaries/class/paymentsalary.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2018 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/salaries/class/salariesstats.class.php b/htdocs/compta/salaries/class/salariesstats.class.php index 1a96fbc56aa..befd0dd5c51 100644 --- a/htdocs/compta/salaries/class/salariesstats.class.php +++ b/htdocs/compta/salaries/class/salariesstats.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 Alexandre Spangaro * Copyright (c) 2018 Fidesio * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/salaries/document.php b/htdocs/compta/salaries/document.php index 33e92ecaf3b..0ce0fb66e52 100644 --- a/htdocs/compta/salaries/document.php +++ b/htdocs/compta/salaries/document.php @@ -6,7 +6,7 @@ * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 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 diff --git a/htdocs/compta/salaries/info.php b/htdocs/compta/salaries/info.php index 87d24ceb406..c7a180346fb 100644 --- a/htdocs/compta/salaries/info.php +++ b/htdocs/compta/salaries/info.php @@ -1,7 +1,7 @@ * Copyright (C) 2015 Charlie BENKE - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 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 diff --git a/htdocs/compta/salaries/list.php b/htdocs/compta/salaries/list.php index c7f5970723e..761d40a5227 100644 --- a/htdocs/compta/salaries/list.php +++ b/htdocs/compta/salaries/list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2015-2016 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/compta/salaries/stats/index.php b/htdocs/compta/salaries/stats/index.php index 6471f66cf57..5b1d5c1b973 100644 --- a/htdocs/compta/salaries/stats/index.php +++ b/htdocs/compta/salaries/stats/index.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 Alexandre Spangaro * Copyright (C) 2018 Fidesio * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 6a0d53d6987..b31339a8d5f 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2016-2018 Frédéric France - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 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 diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 1828e750914..57646cebc7c 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002 Rodolphe Quiedeville * Copyright (C) 2004-2007 Laurent Destailleur * Copyright (C) 2016 Frédéric France - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 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 diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index efdd39d2205..bb194f8cb3e 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2011-2016 Alexandre Spangaro + * Copyright (C) 2011-2016 Alexandre Spangaro * Copyright (C) 2011-2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index d5779266661..985c0b834a5 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2016 Laurent Destailleur * Copyright (C) 2005-2013 Regis Houssin - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 5da7b0e144c..fba25b0e752 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2017 Alexandre Spangaro * Copyright (C) 2018 Philippe Grand * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/compta/tva/info.php b/htdocs/compta/tva/info.php index 4a2308bd0bd..feea451f1db 100644 --- a/htdocs/compta/tva/info.php +++ b/htdocs/compta/tva/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2016-2017 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 diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 0d3b7ec135d..d54a99acc76 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2018 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2017 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 diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index fbd3e46b9a7..3df7945a08e 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 9371f1e3200..6b6bc9f69da 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Frédéric France diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4dbd78f5085..bd7819ee299 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Marcos García * diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index d118c4de3b9..3dbf5f660a7 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2017 Regis Houssin * diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 087db5ddea6..8ca5ce040ac 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013-2015 Raphaël Doursenaud * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Juanjo Menent diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 649b9d317b7..fecc8b560c0 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7,7 +7,7 @@ * Copyright (C) 2012-2015 Marcos García * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Bahfir abbes * Copyright (C) 2017 ATM Consulting * Copyright (C) 2017 Nicolas ZABOURI diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index cf6a3cf345d..e3f52f703b3 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 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 diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index bb710c5e29f..68edd564020 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2012-2016 Marcos García * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2012-2015 Raphaël Doursenaud - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Frédéric France * Copyright (C) 2018 Nicolas ZABOURI diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 41476fb4966..8b4c4e5390d 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2014 Olivier Geffroy * Copyright (C) 2015 Ari Elbaz (elarifr) * Copyright (C) 2016 Marcos García - * Copyright (C) 2016-2017 Alexandre Spangaro + * Copyright (C) 2016-2017 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 diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index 9cf60cc45b1..b4fd2df88f3 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 30ace607536..3eebbde72e5 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php index b0a4a6b81a9..2a7fbba5fc1 100644 --- a/htdocs/core/lib/asset.lib.php +++ b/htdocs/core/lib/asset.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2018 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 diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index c03cd09ff16..15a2e90e7bf 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 55b4d80ac68..c63883bdb29 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -6,7 +6,7 @@ * Copyright (C) 2013-2014 Florian Henry * Copyright (C) 2013-2014 Juanjo Menent * Copyright (C) 2013 Christophe Battarel - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2015-2018 Frédéric France * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2017 Rui Strecht diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index 5ed80465428..5df18c652bf 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2012 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/core/lib/donation.lib.php b/htdocs/core/lib/donation.lib.php index 665ff7cb4e3..77de332f5e3 100644 --- a/htdocs/core/lib/donation.lib.php +++ b/htdocs/core/lib/donation.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/core/lib/fiscalyear.lib.php b/htdocs/core/lib/fiscalyear.lib.php index 083930ee9f9..6ea24bfacc2 100644 --- a/htdocs/core/lib/fiscalyear.lib.php +++ b/htdocs/core/lib/fiscalyear.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014 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 diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 81a3adecdd6..52e5257907d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -9,7 +9,7 @@ * Copyright (C) 2008 Raphael Bertrand (Resultic) * Copyright (C) 2010-2018 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013-2017 Alexandre Spangaro + * Copyright (C) 2013-2017 Alexandre Spangaro * Copyright (C) 2014 Cédric GROSS * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Jean-François Ferry diff --git a/htdocs/core/lib/hrm.lib.php b/htdocs/core/lib/hrm.lib.php index 08b0e3be01a..f38d72ec275 100644 --- a/htdocs/core/lib/hrm.lib.php +++ b/htdocs/core/lib/hrm.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/core/lib/loan.lib.php b/htdocs/core/lib/loan.lib.php index 0b617bb0d5c..0624a7df072 100644 --- a/htdocs/core/lib/loan.lib.php +++ b/htdocs/core/lib/loan.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2016 Alexandre Spangaro * Copyright (C) 2015 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index a5016579cd4..7a6ed21cb4a 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2017 Regis Houssin * diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index 224d8407c48..70566cc8e0e 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -1,7 +1,7 @@ * Copyright (C) 2010-2017 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/lib/vat.lib.php b/htdocs/core/lib/vat.lib.php index 1cb564da4ac..9ba4a1617ae 100644 --- a/htdocs/core/lib/vat.lib.php +++ b/htdocs/core/lib/vat.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2016 Alexandre Spangaro * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/dons/html_cerfafr.modules.php b/htdocs/core/modules/dons/html_cerfafr.modules.php index faf5b00d2c7..0673ed304e3 100644 --- a/htdocs/core/modules/dons/html_cerfafr.modules.php +++ b/htdocs/core/modules/dons/html_cerfafr.modules.php @@ -3,7 +3,7 @@ * Copyright (C) 2005-2006 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 Marcos García - * Copyright (C) 2014-2015 Alexandre Spangaro + * Copyright (C) 2014-2015 Alexandre Spangaro * Copyright (C) 2015 Benoit Bruchard * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php index ec65dd80f93..db1c5c51bd2 100644 --- a/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/expensereport/doc/pdf_standard.modules.php @@ -1,6 +1,6 @@ - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016-2018 Philippe Grand * Copyright (C) 2018 Frédéric France * Copyright (C) 2018 Francis Appels diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c47e8d310f1..aea8a7f9ae2 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2013-2018 Alexandre Spangaro + * Copyright (C) 2013-2018 Alexandre Spangaro * Copyright (C) 2014 Ari Elbaz (elarifr) * Copyright (C) 2014 Florian Henry * Copyright (C) 2016-2017 Laurent Destailleur diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 006c529fc02..192ed2ae953 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -6,7 +6,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2014-2015 Raphaël Doursenaud - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/core/modules/modAsset.class.php b/htdocs/core/modules/modAsset.class.php index fc123cb3cd6..2cb6f7031dc 100644 --- a/htdocs/core/modules/modAsset.class.php +++ b/htdocs/core/modules/modAsset.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/core/modules/modDon.class.php b/htdocs/core/modules/modDon.class.php index 10665c91b93..f92c1cea2a5 100644 --- a/htdocs/core/modules/modDon.class.php +++ b/htdocs/core/modules/modDon.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 9c2559f1218..4a083f272c0 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/core/modules/modLoan.class.php b/htdocs/core/modules/modLoan.class.php index 2c098961cc1..2624d6075a8 100644 --- a/htdocs/core/modules/modLoan.class.php +++ b/htdocs/core/modules/modLoan.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014 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 diff --git a/htdocs/core/modules/modSalaries.class.php b/htdocs/core/modules/modSalaries.class.php index 9fe00cead73..a35070ef303 100644 --- a/htdocs/core/modules/modSalaries.class.php +++ b/htdocs/core/modules/modSalaries.class.php @@ -5,7 +5,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2014 Juanjo Menent - * Copyright (C) 2014 Alexandre Spangaro + * Copyright (C) 2014 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 diff --git a/htdocs/core/modules/modSocialNetworks.class.php b/htdocs/core/modules/modSocialNetworks.class.php index 137547bfb15..dfc325d3e68 100644 --- a/htdocs/core/modules/modSocialNetworks.class.php +++ b/htdocs/core/modules/modSocialNetworks.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2014 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 9a1584da477..5124d46e69a 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Saasprov * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php index b4954a1dd9b..80bdd94c2c2 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_cactus.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2008 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013-2018 Philippe Grand - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 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 diff --git a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php index 39efa7d676b..6f2106fd380 100644 --- a/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php +++ b/htdocs/core/modules/supplier_invoice/mod_facture_fournisseur_tulip.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013-2018 Philippe Grand * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 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 diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 99a801e9e25..7fda34c1508 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -2,7 +2,7 @@ /* Copyright (C) 2005-2010 Laurent Destailleur * Copyright (C) 2012-2015 Juanjo Menent * Copyright (C) 2013-2017 Philippe Grand - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015 Benoit Bruchard * Copyright (C) 2019 Thibault FOUCART * diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index c819cde1e08..82e3a92c2b0 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Juanjo Menent * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/don/card.php b/htdocs/don/card.php index 0efcd09f2f0..ef7dd8cf84c 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2018-2019 Thibault FOUCART * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index ec0e3006974..d62b81708a6 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2009 Regis Houssin * Copyright (C) 2014 Florian Henry - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2016 Juanjo Menent * Copyright (C) 2019 Thibault FOUCART * diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index ba322f9fe08..7012a7f6601 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/don/document.php b/htdocs/don/document.php index cdcb5648501..fa738702b80 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -6,7 +6,7 @@ * Copyright (C) 2005 Simon TOSSER * Copyright (C) 2011-2012 Juanjo Menent * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/don/info.php b/htdocs/don/info.php index 30c2129b6c6..a57070190ad 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2016 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 diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 60bf2c1939f..be95e0db0d1 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2008 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 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 diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index bf9c2768815..c18c3bc1790 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index e016bb80a8e..948646996a2 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 56657694f80..383a57fd59d 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2001-2003 Rodolphe Quiedeville * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index a2c0762321c..c1aba1b628b 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2012 Regis Houssin - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 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 diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index a3390475f44..3c13a221e2b 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -1,7 +1,7 @@ * Copyright (C) 2008-2010 Regis Houssin - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 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 diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index a2713bd836f..ac4b86c172a 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015-2017 Alexandre Spangaro + * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index de310fe0516..52768896073 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2015 Laurent Destailleur - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * Copyright (c) 2018 Frédéric France * Copyright (C) 2016-2018 Ferran Marcet diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index b18eae8c514..0762a8c0cf5 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 4748bd2c2a4..516f4a5a534 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2011 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index 7e94a10418a..0278c2d37c8 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Charlene Benke * diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 7e1a1bf0d61..4593129a7fc 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2017 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 diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php index 6c7f8dd99c6..2de6684cf1b 100644 --- a/htdocs/expensereport/payment/info.php +++ b/htdocs/expensereport/payment/info.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2009 Laurent Destailleur * Copyright (C) 2013 Marcos García - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index a4346ce34bc..3985f813edd 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Laurent Destailleur * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 837b77eb3aa..62e16c0e483 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -6,7 +6,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016-2018 Charlie Benke * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index e4463d7ba65..1f8b7b3ba8b 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -10,7 +10,7 @@ * Copyright (C) 2014-2016 Marcos García * Copyright (C) 2015 Bahfir Abbes * Copyright (C) 2015 Ferran Marcet - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 Alexandre Spangaro * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 5c616a70b0e..a2a96762d9d 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2013-2015 Philippe Grand * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2016 Marcos García - * Copyright (C) 2016-2017 Alexandre Spangaro + * Copyright (C) 2016-2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index c13be230789..6954473ee43 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -4,7 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index dfca394c7cb..4fd287b1eb5 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2006 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2016 Alexandre Spangaro + * Copyright (C) 2016 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index c5194aa7344..377407831de 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -8,7 +8,7 @@ * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index f6b6586a9ec..3360a150959 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -3,7 +3,7 @@ * Copyright (C) 2012-2016 Laurent Destailleur * Copyright (C) 2012-2016 Regis Houssin * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2014-2017 Ferran Marcet * Copyright (C) 2018 Frédéric France * diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 98221ce6594..bd6e5b012cd 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index c61480347bb..13f678e40d8 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 7e967176582..e686a93aefd 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 4343e3a2c50..0bb32c4f4c3 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index 35e4f483e3d..7fee0e8bc79 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015 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 diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 3129760bc7a..af334e3c456 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2011 Dimitri Mouillard * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2012-2014 Regis Houssin - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 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 diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 0ea1a55d3d3..a4c09f8ae30 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 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 diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql index 6e4c62d8228..b1dcdb64c35 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2018 Alexandre Spangaro +-- Copyright (C) 2011-2018 Alexandre Spangaro -- Copyright (C) 2015-2017 Juanjo Menent -- Copyright (C) 2018 Abbes bahfir -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_be.sql b/htdocs/install/mysql/data/llx_accounting_account_be.sql index 610913ed36e..75ee10f7de8 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_be.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_be.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2017 Alexandre Spangaro +-- Copyright (C) 2011-2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_bf.sql b/htdocs/install/mysql/data/llx_accounting_account_bf.sql index 337ae5b905d..51961097b77 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bf.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_bj.sql b/htdocs/install/mysql/data/llx_accounting_account_bj.sql index 0bca4b646a4..13aa8b135e7 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bj.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bj.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_cd.sql b/htdocs/install/mysql/data/llx_accounting_account_cd.sql index 0df56ea4bbf..25e1e5b7809 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cd.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cd.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_cf.sql b/htdocs/install/mysql/data/llx_accounting_account_cf.sql index b38c3c02a09..6968641d6ae 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cf.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_cg.sql b/htdocs/install/mysql/data/llx_accounting_account_cg.sql index 7317b8f0bee..92d3fa34428 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cg.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_ci.sql b/htdocs/install/mysql/data/llx_accounting_account_ci.sql index b12a8e1068f..9df71c78316 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ci.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ci.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_cl.sql b/htdocs/install/mysql/data/llx_accounting_account_cl.sql index 3029bc9350d..3e962a18680 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cl.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cl.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2017 Alexandre Spangaro +-- Copyright (C) 2011-2017 Alexandre Spangaro -- Copyright (C) 2017 Juanjo Menent -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/data/llx_accounting_account_cm.sql b/htdocs/install/mysql/data/llx_accounting_account_cm.sql index 26bbbce4338..c2514a83379 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cm.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cm.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_dk.sql b/htdocs/install/mysql/data/llx_accounting_account_dk.sql index f7b3ea7e519..83d9942d9db 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_dk.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_dk.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2017 Alexandre Spangaro +-- Copyright (C) 2011-2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_es.sql b/htdocs/install/mysql/data/llx_accounting_account_es.sql index ef7d5aaa634..93a80265bb9 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_es.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_es.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2017 Alexandre Spangaro +-- Copyright (C) 2011-2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index ef8ef176597..267602143f3 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -5,7 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin --- Copyright (C) 2011-2017 Alexandre Spangaro +-- Copyright (C) 2011-2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_ga.sql b/htdocs/install/mysql/data/llx_accounting_account_ga.sql index 06a14f69214..f99a42df171 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ga.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ga.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_gq.sql b/htdocs/install/mysql/data/llx_accounting_account_gq.sql index f38dc2365f8..dd82a35d64c 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_gq.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_gq.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_km.sql b/htdocs/install/mysql/data/llx_accounting_account_km.sql index 64b42ee3730..14cb877f999 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_km.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_km.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_ml.sql b/htdocs/install/mysql/data/llx_accounting_account_ml.sql index c18fb8a4166..d54f0fb7844 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ml.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ml.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_ne.sql b/htdocs/install/mysql/data/llx_accounting_account_ne.sql index dbdf2837bda..e43ff41a0a1 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ne.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ne.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_sn.sql b/htdocs/install/mysql/data/llx_accounting_account_sn.sql index 525f927bf17..c4eec7245a5 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_sn.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_sn.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_td.sql b/htdocs/install/mysql/data/llx_accounting_account_td.sql index c09548f12e3..71871663bc3 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_td.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_td.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_account_tg.sql b/htdocs/install/mysql/data/llx_accounting_account_tg.sql index 31bcbe2ae27..21e3989fd74 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_tg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_tg.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/data/llx_accounting_category.sql b/htdocs/install/mysql/data/llx_accounting_category.sql index 3d96ea205eb..a569114506e 100644 --- a/htdocs/install/mysql/data/llx_accounting_category.sql +++ b/htdocs/install/mysql/data/llx_accounting_category.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2016 Alexandre Spangaro +-- Copyright (C) 2016 Alexandre Spangaro -- Copyright (C) 2017 Laurent Destailleur -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/data/llx_c_hrm_department.sql b/htdocs/install/mysql/data/llx_c_hrm_department.sql index c4865ad9e30..714963896cc 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_department.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013 Jean-François Ferry --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/data/llx_c_hrm_function.sql b/htdocs/install/mysql/data/llx_c_hrm_function.sql index dd5c6e832bd..900439f9709 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_function.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013 Jean-François Ferry --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 79215115cfb..727965f6a9d 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -1,7 +1,7 @@ -- ============================================================================ -- Copyright (C) 2004-2006 Laurent Destailleur -- Copyright (C) 2014 Juanjo Menent --- Copyright (C) 2016 Alexandre Spangaro +-- Copyright (C) 2016 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index af6cd66826d..af693c273a4 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-2017 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index 2798a3d48e9..d8b1fd81066 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2013-2017 Olivier Geffroy --- Copyright (C) 2013-2017 Alexandre Spangaro +-- Copyright (C) 2013-2017 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index 89fd3ac8780..4cff341ed52 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql index 701c39e06a2..7e16f707710 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2016 Alexandre Spangaro +-- Copyright (C) 2016 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.sql b/htdocs/install/mysql/tables/llx_accounting_journal.sql index 51f1f972859..80d129ba3f6 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2016-2017 Alexandre Spangaro +-- Copyright (C) 2016-2017 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 diff --git a/htdocs/install/mysql/tables/llx_accounting_system.sql b/htdocs/install/mysql/tables/llx_accounting_system.sql index 69f31eaa15f..cbee4ee25d3 100644 --- a/htdocs/install/mysql/tables/llx_accounting_system.sql +++ b/htdocs/install/mysql/tables/llx_accounting_system.sql @@ -1,6 +1,6 @@ -- ============================================================================ -- Copyright (C) 2004-2006 Laurent Destailleur --- Copyright (C) 2011-2016 Alexandre Spangaro +-- Copyright (C) 2011-2016 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 diff --git a/htdocs/install/mysql/tables/llx_asset.key.sql b/htdocs/install/mysql/tables/llx_asset.key.sql index 31bed33a3ee..101a5d50250 100644 --- a/htdocs/install/mysql/tables/llx_asset.key.sql +++ b/htdocs/install/mysql/tables/llx_asset.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset.sql b/htdocs/install/mysql/tables/llx_asset.sql index d6eba5ed93b..a0891ef4b0e 100644 --- a/htdocs/install/mysql/tables/llx_asset.sql +++ b/htdocs/install/mysql/tables/llx_asset.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.sql index bc5eedae6d6..19a3edf6ddc 100644 --- a/htdocs/install/mysql/tables/llx_asset_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset_type.key.sql b/htdocs/install/mysql/tables/llx_asset_type.key.sql index 2186a4aafd2..412f2ffff20 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset_type.sql b/htdocs/install/mysql/tables/llx_asset_type.sql index 6b6a8b23db1..7a8866456b1 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql index dbcc2500df8..22c2eee9753 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql index 1b98bd3f524..2faae65702b 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql @@ -1,4 +1,4 @@ --- Copyright (C) 2018 Alexandre Spangaro +-- Copyright (C) 2018 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 diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 3da5a8d4ec8..ebe6672e70d 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2000-2004 Rodolphe Quiedeville -- Copyright (C) 2004-2014 Laurent Destailleur -- Copyright (C) 2005-2012 Regis Houssin --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 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 diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql index be927f6e761..91fe439e46d 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015-2016 Alexandre Spangaro +-- Copyright (C) 2015-2016 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 diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.sql index 9df9a9d6ab0..275e001f18d 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015-2016 Alexandre Spangaro +-- Copyright (C) 2015-2016 Alexandre Spangaro -- Copyright (C) 2016 Jamal Elbaz -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_c_country.sql b/htdocs/install/mysql/tables/llx_c_country.sql index a955d76ea81..ab3935c3103 100644 --- a/htdocs/install/mysql/tables/llx_c_country.sql +++ b/htdocs/install/mysql/tables/llx_c_country.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2004 Rodolphe Quiedeville -- Copyright (C) 2004 Laurent Destailleur --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 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 diff --git a/htdocs/install/mysql/tables/llx_c_hrm_department.sql b/htdocs/install/mysql/tables/llx_c_hrm_department.sql index f9432d8b821..3407f38d0bd 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_department.sql @@ -1,6 +1,6 @@ -- -- Copyright (C) 2013 Jean-François Ferry --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_c_hrm_function.sql b/htdocs/install/mysql/tables/llx_c_hrm_function.sql index f3f87461866..38b63bfc5db 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_function.sql @@ -1,6 +1,6 @@ -- -- Copyright (C) 2013 Jean-François Ferry --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_c_paiement.sql b/htdocs/install/mysql/tables/llx_c_paiement.sql index 9e752b7e186..8286e4c8e1f 100644 --- a/htdocs/install/mysql/tables/llx_c_paiement.sql +++ b/htdocs/install/mysql/tables/llx_c_paiement.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2004 Rodolphe Quiedeville -- Copyright (C) 2004-2014 Laurent Destailleur --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 Alexandre Spangaro -- Copyright (C) 2017 Regis Houssin -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index 91e141ad4d1..62d5b04125f 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2005 Laurent Destailleur -- Copyright (C) 2010-2015 Juanjo Menent --- Copyright (C) 2011-2012 Alexandre Spangaro +-- Copyright (C) 2011-2012 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 diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.sql b/htdocs/install/mysql/tables/llx_c_type_fees.sql index 15c6fe52182..787aac8d2c8 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002,2004 Rodolphe Quiedeville -- Copyright (C) 2004 Laurent Destailleur --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 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 diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index e1556689a29..9efef8aec68 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -1,7 +1,7 @@ -- ======================================================================== -- Copyright (C) 2001-2002 Rodolphe Quiedeville -- Copyright (C) 2005-2009 Regis Houssin --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index 4cb081045ee..c9948133954 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -2,7 +2,7 @@ -- Copyright (C) 2001-2002 Rodolphe Quiedeville -- Copyright (C) 2009 Regis Houssin -- Copyright (C) 2011 Laurent Destailleur --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql index e8da3084d34..46a77f1c162 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.sql b/htdocs/install/mysql/tables/llx_don_extrafields.sql index 72b4d0a862a..a854098a20f 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.sql @@ -1,5 +1,5 @@ -- ======================================================================== --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index 667d512762d..cb9aa676d40 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -1,5 +1,5 @@ -- ============================================================================ --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_loan.sql b/htdocs/install/mysql/tables/llx_loan.sql index f153e25dd22..abb1eab0c09 100644 --- a/htdocs/install/mysql/tables/llx_loan.sql +++ b/htdocs/install/mysql/tables/llx_loan.sql @@ -1,5 +1,5 @@ -- ======================================================================== --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 Alexandre Spangaro -- Copyright (C) 2015 Frederic France -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_loan_schedule.sql b/htdocs/install/mysql/tables/llx_loan_schedule.sql index 005ae07528e..11c167ae305 100644 --- a/htdocs/install/mysql/tables/llx_loan_schedule.sql +++ b/htdocs/install/mysql/tables/llx_loan_schedule.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 Alexandre Spangaro -- Copyright (C) 2015 Frederic France -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_payment_donation.sql b/htdocs/install/mysql/tables/llx_payment_donation.sql index d452d4da054..67f6eade0f0 100644 --- a/htdocs/install/mysql/tables/llx_payment_donation.sql +++ b/htdocs/install/mysql/tables/llx_payment_donation.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_payment_expensereport.sql b/htdocs/install/mysql/tables/llx_payment_expensereport.sql index deeb82f615c..aadd0a090fd 100644 --- a/htdocs/install/mysql/tables/llx_payment_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_payment_expensereport.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/install/mysql/tables/llx_payment_loan.sql b/htdocs/install/mysql/tables/llx_payment_loan.sql index 10801fc7454..28edaf6cb37 100644 --- a/htdocs/install/mysql/tables/llx_payment_loan.sql +++ b/htdocs/install/mysql/tables/llx_payment_loan.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2014 Alexandre Spangaro +-- Copyright (C) 2014 Alexandre Spangaro -- Copyright (C) 2015 Frederic France -- -- This program is free software; you can redistribute it and/or modify diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index c56e6459aa0..3540725173b 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2011-2018 Alexandre Spangaro +-- Copyright (C) 2011-2018 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 diff --git a/htdocs/install/mysql/tables/llx_payment_various.sql b/htdocs/install/mysql/tables/llx_payment_various.sql index d3351287e58..880fb4b5698 100644 --- a/htdocs/install/mysql/tables/llx_payment_various.sql +++ b/htdocs/install/mysql/tables/llx_payment_various.sql @@ -1,5 +1,5 @@ -- =================================================================== --- Copyright (C) 2017 Alexandre Spangaro +-- Copyright (C) 2017 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 diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 05738ce4582..d6d397c5787 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -1,5 +1,5 @@ -- ============================================================================= --- Copyright (C) 2015 Alexandre Spangaro +-- Copyright (C) 2015 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 diff --git a/htdocs/langs/en_US/assets.lang b/htdocs/langs/en_US/assets.lang index 6fb40755fdb..293d9b205f6 100644 --- a/htdocs/langs/en_US/assets.lang +++ b/htdocs/langs/en_US/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro +# Copyright (C) 2018 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 diff --git a/htdocs/langs/fr_FR/assets.lang b/htdocs/langs/fr_FR/assets.lang index 356245e8761..847e5a6cb15 100644 --- a/htdocs/langs/fr_FR/assets.lang +++ b/htdocs/langs/fr_FR/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro +# Copyright (C) 2018 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 diff --git a/htdocs/langs/lv_LV/assets.lang b/htdocs/langs/lv_LV/assets.lang index f632913c15e..7afddf85d74 100644 --- a/htdocs/langs/lv_LV/assets.lang +++ b/htdocs/langs/lv_LV/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro +# Copyright (C) 2018 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 diff --git a/htdocs/langs/pt_BR/assets.lang b/htdocs/langs/pt_BR/assets.lang index 877bd41ecd1..56f4a48c9fc 100644 --- a/htdocs/langs/pt_BR/assets.lang +++ b/htdocs/langs/pt_BR/assets.lang @@ -1,4 +1,4 @@ -# Copyright (C) 2018 Alexandre Spangaro +# Copyright (C) 2018 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 diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 3bab5474b08..9edb77dee7f 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2017 Laurent Destailleur * diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 09fddcb5599..6f99adb5cbd 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015-2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index f11842bf0c1..8f65617d2a2 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015-2018 Frederic France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 7a68d3e38a8..203ab1d8c19 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 553bbc258e8..e24a77c82cf 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index cc923b17fea..276528fc721 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 780d28df081..707ae473358 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2015 Juanjo Menent * Copyright (C) 2016 Laurent Destailleur diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index e066ef07a8e..a4ed60de2f0 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2013 Florian Henry * Copyright (C) 2015 Frederic France - * Copyright (C) 2016-2018 Alexandre Spangaro + * Copyright (C) 2016-2018 Alexandre Spangaro * Copyright (C) 2017 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 017f6a26254..cd916c6e868 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 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 diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 2ca310a1689..f09ae3d1cce 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015-2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 30ba126aefb..7f5b0cf53bc 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -1,6 +1,6 @@ - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 8664e616c55..7add3ffc425 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -1,7 +1,7 @@ * Copyright (C) 2014 Marcos García - * Copyright (C) 2015-2016 Alexandre Spangaro + * Copyright (C) 2015-2016 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 9e07dc90d46..8205b54c0b7 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2012 Cedric Salvador * Copyright (C) 2013-2014 Cedric GROSS * Copyright (C) 2013-2016 Marcos García - * Copyright (C) 2011-2017 Alexandre Spangaro + * Copyright (C) 2011-2017 Alexandre Spangaro * Copyright (C) 2014 Henry Florian * Copyright (C) 2014-2016 Philippe Grand * Copyright (C) 2014 Ion agorria diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index e190e3a55d1..1e643c7f192 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -6,7 +6,7 @@ * Copyright (C) 2010-2012 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2014 Ion Agorria - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 1c73758c5f2..804dabe7e4f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -8,7 +8,7 @@ * Copyright (C) 2014-2018 Juanjo Menent * Copyright (C) 2014-2019 Philippe Grand * Copyright (C) 2014 Ion agorria - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2018 Frédéric France diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index d4b0e4c8dae..66eeeedc97f 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent - * Copyright (C) 2015-2018 Alexandre Spangaro + * Copyright (C) 2015-2018 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Josep Lluís Amador * diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php index efbf449ae26..fe5116137f2 100644 --- a/htdocs/public/members/new.php +++ b/htdocs/public/members/new.php @@ -5,7 +5,7 @@ * Copyright (C) 2012 Regis Houssin * Copyright (C) 2012 J. Fernando Lagrange * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php index c2df82fb2f2..cee3bb1ee16 100644 --- a/htdocs/public/members/public_card.php +++ b/htdocs/public/members/public_card.php @@ -3,7 +3,7 @@ * Copyright (C) 2002-2003 Jean-Louis Bergamo * Copyright (C) 2007-2012 Laurent Destailleur * Copyright (C) 2012 Regis Houssin - * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2018 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 diff --git a/htdocs/public/stripe/newpayment.php b/htdocs/public/stripe/newpayment.php index cb22aa72cd4..25fa3365840 100644 --- a/htdocs/public/stripe/newpayment.php +++ b/htdocs/public/stripe/newpayment.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Saasprov * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2017 Ferran Marcet diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index dbb7fbcd91b..9518e3db0c8 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2017 Regis Houssin * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2013 Alexandre Spangaro + * Copyright (C) 2011-2013 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 90c20ca1cf2..bc368a10b2c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2018 Juanjo Menent * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2013 Peter Fontaine * Copyright (C) 2014-2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/societe/contact.php b/htdocs/societe/contact.php index 4077a0b1815..112ac46900c 100644 --- a/htdocs/societe/contact.php +++ b/htdocs/societe/contact.php @@ -6,7 +6,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Patrick Raguin * Copyright (C) 2010-2016 Juanjo Menent - * Copyright (C) 2011-2013 Alexandre Spangaro + * Copyright (C) 2011-2013 Alexandre Spangaro * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Marcos García * Copyright (C) 2015 Raphaël Doursenaud diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 6a4dd8713f7..a0846cdd79e 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Olivier Geffroy * Copyright (C) 2017 Saasprov * Copyright (C) 2018 ptibogxiv diff --git a/htdocs/stripe/config.php b/htdocs/stripe/config.php index cea97efe0a3..b313e97b9fa 100644 --- a/htdocs/stripe/config.php +++ b/htdocs/stripe/config.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 Alexandre Spangaro * Copyright (C) 2017 Saasprov * Copyright (C) 2017 Ferran Marcet * diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index bafa83c21cf..099bffefa45 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017 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 diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index e20ffbe43e2..d3e2368217e 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4,7 +4,7 @@ * Copyright (C) 2007-2017 Regis Houssin * Copyright (C) 2011 Philippe Grand * Copyright (C) 2012 Juanjo Menent - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2018 Ferran Marcet * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index c76cab34f3b..527a7af5cb7 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -5,7 +5,7 @@ * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Peter Fontaine * Copyright (C) 2015-2016 Marcos García - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 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 diff --git a/htdocs/user/card.php b/htdocs/user/card.php index f4799e7b17f..f0b3aa361cc 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -8,7 +8,7 @@ * Copyright (C) 2011 Herve Prot * Copyright (C) 2012-2018 Juanjo Menent * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013-2016 Alexandre Spangaro + * Copyright (C) 2013-2016 Alexandre Spangaro * Copyright (C) 2015-2017 Jean-François Ferry * Copyright (C) 2015 Ari Elbaz (elarifr) * Copyright (C) 2015-2018 Charlene Benke diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index fbc0237c37b..15139bd0291 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -8,7 +8,7 @@ * Copyright (C) 2005 Lionel Cousteix * Copyright (C) 2011 Herve Prot * Copyright (C) 2013-2018 Philippe Grand - * Copyright (C) 2013-2015 Alexandre Spangaro + * Copyright (C) 2013-2015 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2018 charlene Benke * Copyright (C) 2018 Nicolas ZABOURI diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index d18ece1f89e..8e9ad2745c3 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -3,7 +3,7 @@ * Copyright (C) 2010-2013 Laurent Destailleur * Copyright (C) 2012 Regis Houssin * Copyright (C) 2013 Peter Fontaine - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/htdocs/user/list.php b/htdocs/user/list.php index ea8d340e0ae..4a449771a64 100644 --- a/htdocs/user/list.php +++ b/htdocs/user/list.php @@ -2,7 +2,7 @@ /* Copyright (C) 2002-2005 Rodolphe Quiedeville * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2005-2017 Regis Houssin - * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Alexandre Spangaro * Copyright (C) 2016 Marcos García * * This program is free software; you can redistribute it and/or modify diff --git a/scripts/accountancy/export-thirdpartyaccount.php b/scripts/accountancy/export-thirdpartyaccount.php index e8468d64ece..90a072ebeba 100755 --- a/scripts/accountancy/export-thirdpartyaccount.php +++ b/scripts/accountancy/export-thirdpartyaccount.php @@ -1,7 +1,7 @@ #!/usr/bin/env php - * Copyright (C) 2013-2014 Alexandre Spangaro + * Copyright (C) 2013-2014 Alexandre Spangaro * Copyright (C) 2014 Florian Henry * Copyright (C) 2018 Frédéric France * From f6be0f768648ebea75c359d9e3d26acd877e9d6f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 10:48:45 +0100 Subject: [PATCH 03/20] Fix duplicate log when using mass action email send --- htdocs/core/actions_massactions.inc.php | 2212 ++++++++++++----------- 1 file changed, 1143 insertions(+), 1069 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 5b4f0c28d0e..d01f0705817 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -37,8 +37,8 @@ // Protection if (empty($objectclass) || empty($uploaddir)) { - dol_print_error(null, 'include of actions_massactions.inc.php is done but var $massaction or $objectclass or $uploaddir was not defined'); - exit; + dol_print_error(null, 'include of actions_massactions.inc.php is done but var $massaction or $objectclass or $uploaddir was not defined'); + exit; } @@ -46,1047 +46,1060 @@ if (empty($objectclass) || empty($uploaddir)) $maxformassaction=(empty($conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS)?1000:$conf->global->MAIN_LIMIT_FOR_MASS_ACTIONS); if (! empty($massaction) && count($toselect) < 1) { - $error++; - setEventMessages($langs->trans("NoRecordSelected"), null, "warnings"); + $error++; + setEventMessages($langs->trans("NoRecordSelected"), null, "warnings"); } if (! $error && is_array($toselect) && count($toselect) > $maxformassaction) { - setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); - $error++; + setEventMessages($langs->trans('TooManyRecordForMassAction',$maxformassaction), null, 'errors'); + $error++; } if (! $error && $massaction == 'confirm_presend' && ! GETPOST('sendmail')) // If we do not choose button send (for example when we change template or limit), we must not send email, but keep on send email form { - $massaction='presend'; + $massaction='presend'; } if (! $error && $massaction == 'confirm_presend') { - $resaction = ''; - $nbsent = 0; - $nbignored = 0; - $langs->load("mails"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $listofobjectid=array(); - $listofobjectthirdparties=array(); - $listofobjectref=array(); - - if (! $error) - { - $thirdparty=new Societe($db); - if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); - if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - - $objecttmp=new $objectclass($db); - foreach($toselect as $toselectid) - { - $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - $listofobjectid[$toselectid]=$toselectid; - $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); - if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; - if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; - if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; - } - } - } - - // Check mandatory parameters - if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) - { - $error++; - setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); - $massaction='presend'; - } - - $receiver=$_POST['receiver']; - if (! is_array($receiver)) - { - if (empty($receiver) || $receiver == '-1') $receiver=array(); - else $receiver=array($receiver); - } - if (! trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) // if only one recipient, receiver is mandatory - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); - $massaction='presend'; - } - - if (! GETPOST('subject','none')) - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); - $massaction='presend'; - } - - // Loop on each recipient/thirdparty - if (! $error) - { - foreach ($listofobjectthirdparties as $thirdpartyid) - { - $result = $thirdparty->fetch($thirdpartyid); - if ($result < 0) - { - dol_print_error($db); - exit; - } - - $sendto=''; - $sendtocc=''; - $sendtobcc=''; - $sendtoid = array(); - - // Define $sendto - $tmparray=array(); - if (trim($_POST['sendto'])) - { - // Recipients are provided into free text - $tmparray[] = trim($_POST['sendto']); - } - if (count($receiver)>0) - { - foreach($receiver as $key=>$val) - { - // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party or user - { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact - { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); - $sendtoid[] = $val; - } - } - } - $sendto=implode(',',$tmparray); - - // Define $sendtocc - $receivercc=$_POST['receivercc']; - if (! is_array($receivercc)) - { - if ($receivercc == '-1') $receivercc=array(); - else $receivercc=array($receivercc); - } - $tmparray=array(); - if (trim($_POST['sendtocc'])) - { - $tmparray[] = trim($_POST['sendtocc']); - } - if (count($receivercc) > 0) - { - foreach($receivercc as $key=>$val) - { - // Recipient was provided from combo list - if ($val == 'thirdparty') // Id of third party - { - $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val) // Id du contact - { - $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); - //$sendtoid[] = $val; TODO Add also id of contact in CC ? - } - } - } - $sendtocc=implode(',',$tmparray); - - //var_dump($listofobjectref);exit; - $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); - $listofqualifiedobj=array(); - $listofqualifiedref=array(); - $thirdpartywithoutemail=array(); - - foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) - { - //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); - if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; - continue; // Payment done or started or canceled - } - if ($objectclass == 'Commande' && $objectoj->statut == Commande::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; - continue; - } - if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'

'; - continue; // Payment done or started or canceled - } - - // Test recipient - if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) - { - if ($objectobj->element == 'expensereport') - { - $fuser = new User($db); - $fuser->fetch($objectobj->fk_user_author); - $sendto = $fuser->email; - } - else - { - $objectobj->fetch_thirdparty(); - $sendto = $objectobj->thirdparty->email; - } - } - - if (empty($sendto)) - { - //print "No recipient for thirdparty ".$objectobj->thirdparty->name; - $nbignored++; - if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) - { - $resaction.='
'.$langs->trans('NoRecipientEmail',$objectobj->thirdparty->name).'

'; - } - dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); - $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; - continue; - } - - if ($_POST['addmaindocfile']) - { - // TODO Use future field $objectobj->fullpathdoc to know where is stored default file - // TODO If not defined, use $objectobj->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. - $filename=dol_sanitizeFileName($objectobj->ref).'.pdf'; - $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); - $file = $filedir . '/' . $filename; - $mime = dol_mimetype($file); - - if (dol_is_file($file)) - { - // Create form object - $attachedfiles=array( - 'paths'=>array_merge($attachedfiles['paths'],array($file)), - 'names'=>array_merge($attachedfiles['names'],array($filename)), - 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) - ); - } - else - { - $nbignored++; - $langs->load("errors"); - $resaction.='
'.$langs->trans('ErrorCantReadFile',$file).'

'; - dol_syslog('Failed to read file: '.$file, LOG_WARNING); - continue; - } - } - - // Object of thirdparty qualified - $listofqualifiedobj[$objectid]=$objectobj; - $listofqualifiedref[$objectid]=$objectobj->ref; - - - //var_dump($listofqualifiedref); - } - - // Send email if there is at least one qualified record - if (count($listofqualifiedobj) > 0) - { - $langs->load("commercial"); - - $fromtype = GETPOST('fromtype'); - if ($fromtype === 'user') { - $from = $user->getFullName($langs) .' <'.$user->email.'>'; - } - elseif ($fromtype === 'company') { - $from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; - } - elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { - $tmp=explode(',', $user->email_aliases); - $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { - $tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); - $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { - $sql='SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile WHERE rowid = '.(int) $reg[1]; - $resql = $db->query($sql); - $obj = $db->fetch_object($resql); - if ($obj) - { - $from = $obj->label.' <'.$obj->email.'>'; - } - } - else { - $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; - } - - $replyto = $from; - $subject = GETPOST('subject','none'); - $message = GETPOST('message','none'); - - $sendtobcc = GETPOST('sendtoccc'); - if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); - if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); - if ($objectclass == 'Facture') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); - if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); - if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); - if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - - // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) - $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); - $looparray=array(); - if (! $oneemailperrecipient) - { - $looparray = $listofqualifiedobj; - foreach ($looparray as $key => $objecttmp) - { - $looparray[$key]->thirdparty = $thirdparty; - } - } - else - { - $objectforloop=new $objectclass($db); - $objectforloop->thirdparty = $thirdparty; - $looparray[0]=$objectforloop; - } - //var_dump($looparray);exit; - - foreach ($looparray as $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per record - { - // Make substitution in email content - $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); - $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ',array_keys($listofqualifiedobj)) : $objecttmp->id); - $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); - $substitutionarray['__EMAIL__'] = $thirdparty->email; - $substitutionarray['__CHECK_READ__'] = ''; - - $parameters=array('mode'=>'formemail'); - - if ( ! empty( $listofobjectthirdparties ) ) { - $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; - } - if ( ! empty( $listofobjectref ) ) { - $parameters['listofobjectref'] = $listofobjectref; - } - - complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - - $subject=make_substitutions($subject, $substitutionarray); - $message=make_substitutions($message, $substitutionarray); - - $filepath = $attachedfiles['paths']; - $filename = $attachedfiles['names']; - $mimetype = $attachedfiles['mimes']; - - // Define the trackid when emails sent from the mass action - if ($oneemailperrecipient) - { - $trackid='thi'.$thirdparty->id; - if ($objecttmp->element == 'expensereport') $trackid='use'.$thirdparty->id; - if ($objecttmp->element == 'holiday') $trackid='use'.$thirdparty->id; - } - else - { - $trackid=strtolower(get_class($objecttmp)); - if (get_class($objecttmp)=='Contrat') $trackid='con'; - if (get_class($objecttmp)=='Propal') $trackid='pro'; - if (get_class($objecttmp)=='Commande') $trackid='ord'; - if (get_class($objecttmp)=='Facture') $trackid='inv'; - if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; - if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; - if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - - $trackid.=$objecttmp->id; - } - //var_dump($filepath); - //var_dump($trackid);exit; - - // Send mail (substitutionarray must be done just before this) - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); - if ($mailfile->error) - { - $resaction.='
'.$mailfile->error.'
'; - } - else - { - $result=$mailfile->sendfile(); - if ($result) - { - $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'
'; // Must not contain " - - $error=0; - - // Insert logs into agenda - foreach($listofqualifiedobj as $objid => $objectobj) - { - dol_syslog("Try to insert email event into agenda for objid=".$objid." => objectobj=".get_class($objectobj)); - - /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; - if ($objectclass == 'Commande') $actiontypecode='AC_COM'; - if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; - if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; - if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; - if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ - - $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; - if ($message) - { - if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); - $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); - $actionmsg = dol_concatdesc($actionmsg, $message); - } - $actionmsg2=''; - - // Initialisation donnees - $objectobj->sendtoid = 0; - $objectobj->actionmsg = $actionmsg; // Long text - $objectobj->actionmsg2 = $actionmsg2; // Short text - $objectobj->fk_element = $objid; - $objectobj->elementtype = $objectobj->element; - - $triggername = strtoupper(get_class($objectobj)) .'_SENTBYMAIL'; - if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; - if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; - if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; - if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL'; - if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYMAIL'; - if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; - if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - - if (! empty($triggername)) - { - // Appel des triggers - include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; - $interface=new Interfaces($db); - $result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf); - if ($result < 0) { $error++; $errors=$interface->errors; } - // Fin appel triggers - - if ($error) - { - setEventMessages($db->lasterror(), $errors, 'errors'); - dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); - } - } - - $nbsent++; - } - } - else - { - $langs->load("other"); - if ($mailfile->error) - { - $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); - $resaction.='
'.$mailfile->error.'
'; - } - else - { - $resaction.='
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; - } - } - } - } - } - } - - $resaction.=($resaction?'
':$resaction); - $resaction.=''.$langs->trans("ResultOfMailSending").':
'."\n"; - $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n
"; - $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n
"; - $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n
"; - - if ($nbsent) - { - $action=''; // Do not show form post if there was at least one successfull sent - //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); - setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); - setEventMessages($resaction, null, 'mesgs'); - } - else - { - //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file - setEventMessages($resaction, null, 'warnings'); - } - - $action='list'; - $massaction=''; - } + $resaction = ''; + $nbsent = 0; + $nbignored = 0; + $langs->load("mails"); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + + if (! $error) + { + $thirdparty=new Societe($db); + + $objecttmp=new $objectclass($db); + if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); + if ($objecttmp->element == 'holiday') $thirdparty=new User($db); + + foreach($toselect as $toselectid) + { + $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listofobjectid[$toselectid]=$toselectid; + + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); + if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; + if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; + if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; + if (empty($thirdpartyid)) $thirdpartyid=0; + + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + } + } + } + + // Check mandatory parameters + if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) + { + $error++; + setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); + $massaction='presend'; + } + + $receiver=$_POST['receiver']; + if (! is_array($receiver)) + { + if (empty($receiver) || $receiver == '-1') $receiver=array(); + else $receiver=array($receiver); + } + if (! trim($_POST['sendto']) && count($receiver) == 0 && count($listofobjectthirdparties) == 1) // if only one recipient, receiver is mandatory + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); + $massaction='presend'; + } + + if (! GETPOST('subject','none')) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); + $massaction='presend'; + } + + // Loop on each recipient/thirdparty + if (! $error) + { + foreach ($listofobjectthirdparties as $thirdpartyid) + { + $result = $thirdparty->fetch($thirdpartyid); + if ($result < 0) + { + dol_print_error($db); + exit; + } + + $sendto=''; + $sendtocc=''; + $sendtobcc=''; + $sendtoid = array(); + + // Define $sendto + $tmparray=array(); + if (trim($_POST['sendto'])) + { + // Recipients are provided into free text + $tmparray[] = trim($_POST['sendto']); + } + if (count($receiver)>0) + { + foreach($receiver as $key=>$val) + { + // Recipient was provided from combo list + if ($val == 'thirdparty') // Id of third party or user + { + $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + } + elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact + { + $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + $sendtoid[] = $val; + } + } + } + $sendto=implode(',',$tmparray); + + // Define $sendtocc + $receivercc=$_POST['receivercc']; + if (! is_array($receivercc)) + { + if ($receivercc == '-1') $receivercc=array(); + else $receivercc=array($receivercc); + } + $tmparray=array(); + if (trim($_POST['sendtocc'])) + { + $tmparray[] = trim($_POST['sendtocc']); + } + if (count($receivercc) > 0) + { + foreach($receivercc as $key=>$val) + { + // Recipient was provided from combo list + if ($val == 'thirdparty') // Id of third party + { + $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; + } + elseif ($val) // Id du contact + { + $tmparray[] = $thirdparty->contact_get_property((int) $val,'email'); + //$sendtoid[] = $val; TODO Add also id of contact in CC ? + } + } + } + $sendtocc=implode(',',$tmparray); + + //var_dump($listofobjectref);exit; + $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); + $listofqualifiedobj=array(); + $listofqualifiedref=array(); + $thirdpartywithoutemail=array(); + + foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) + { + //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); + if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='
'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; + continue; // Payment done or started or canceled + } + if ($objectclass == 'Commande' && $objectoj->statut == Commande::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='
'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction',$objectobj->ref).'

'; + continue; + } + if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='
'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'

'; + continue; // Payment done or started or canceled + } + + // Test recipient + if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) + { + if ($objectobj->element == 'expensereport') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user_author); + $sendto = $fuser->email; + } + elseif ($objectobj->element == 'holiday') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user); + $sendto = $fuser->email; + } + else + { + $objectobj->fetch_thirdparty(); + $sendto = $objectobj->thirdparty->email; + } + } + + if (empty($sendto)) + { + //print "No recipient for thirdparty ".$objectobj->thirdparty->name; + $nbignored++; + if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) + { + $resaction.='
'.$langs->trans('NoRecipientEmail',$objectobj->thirdparty->name).'

'; + } + dol_syslog('No recipient for thirdparty: '.$objectobj->thirdparty->name, LOG_WARNING); + $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; + continue; + } + + if ($_POST['addmaindocfile']) + { + // TODO Use future field $objectobj->fullpathdoc to know where is stored default file + // TODO If not defined, use $objectobj->modelpdf (or defaut invoice config) to know what is template to use to regenerate doc. + $filename=dol_sanitizeFileName($objectobj->ref).'.pdf'; + $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); + $file = $filedir . '/' . $filename; + $mime = dol_mimetype($file); + + if (dol_is_file($file)) + { + // Create form object + $attachedfiles=array( + 'paths'=>array_merge($attachedfiles['paths'],array($file)), + 'names'=>array_merge($attachedfiles['names'],array($filename)), + 'mimes'=>array_merge($attachedfiles['mimes'],array($mime)) + ); + } + else + { + $nbignored++; + $langs->load("errors"); + $resaction.='
'.$langs->trans('ErrorCantReadFile',$file).'

'; + dol_syslog('Failed to read file: '.$file, LOG_WARNING); + continue; + } + } + + // Object of thirdparty qualified, we add it + $listofqualifiedobj[$objectid]=$objectobj; + $listofqualifiedref[$objectid]=$objectobj->ref; + + //var_dump($listofqualifiedref); + } + + // Send email if there is at least one qualified object for current thirdparty + if (count($listofqualifiedobj) > 0) + { + $langs->load("commercial"); + + $fromtype = GETPOST('fromtype'); + if ($fromtype === 'user') { + $from = $user->getFullName($langs) .' <'.$user->email.'>'; + } + elseif ($fromtype === 'company') { + $from = $conf->global->MAIN_INFO_SOCIETE_NOM .' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; + } + elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { + $tmp=explode(',', $user->email_aliases); + $from = trim($tmp[($reg[1] - 1)]); + } + elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { + $tmp=explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); + $from = trim($tmp[($reg[1] - 1)]); + } + elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { + $sql='SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile WHERE rowid = '.(int) $reg[1]; + $resql = $db->query($sql); + $obj = $db->fetch_object($resql); + if ($obj) + { + $from = $obj->label.' <'.$obj->email.'>'; + } + } + else { + $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; + } + + $replyto = $from; + $subject = GETPOST('subject','none'); + $message = GETPOST('message','none'); + + $sendtobcc = GETPOST('sendtoccc'); + if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); + if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); + if ($objectclass == 'Facture') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)); + if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); + if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); + if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); + + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) + // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) + $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); + $looparray=array(); + if (! $oneemailperrecipient) + { + $looparray = $listofqualifiedobj; + foreach ($looparray as $key => $objecttmp) + { + $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object + } + } + else + { + $objectforloop=new $objectclass($db); + $objectforloop->thirdparty = $thirdparty; // Force thirdparty on object (even if object was not loaded) + $looparray[0]=$objectforloop; + } + //var_dump($looparray);exit; + dol_syslog("We have set an array of ".count($looparray)." emails to send"); + + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object + { + // Make substitution in email content + $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); + $substitutionarray['__ID__'] = ($oneemailperrecipient ? join(', ',array_keys($listofqualifiedobj)) : $objecttmp->id); + $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); + $substitutionarray['__EMAIL__'] = $thirdparty->email; + $substitutionarray['__CHECK_READ__'] = ''; + + $parameters=array('mode'=>'formemail'); + + if ( ! empty( $listofobjectthirdparties ) ) { + $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; + } + if ( ! empty( $listofobjectref ) ) { + $parameters['listofobjectref'] = $listofobjectref; + } + + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); + + $subject=make_substitutions($subject, $substitutionarray); + $message=make_substitutions($message, $substitutionarray); + + $filepath = $attachedfiles['paths']; + $filename = $attachedfiles['names']; + $mimetype = $attachedfiles['mimes']; + + // Define the trackid when emails sent from the mass action + if ($oneemailperrecipient) + { + $trackid='thi'.$thirdparty->id; + if ($objecttmp->element == 'expensereport') $trackid='use'.$thirdparty->id; + if ($objecttmp->element == 'holiday') $trackid='use'.$thirdparty->id; + } + else + { + $trackid=strtolower(get_class($objecttmp)); + if (get_class($objecttmp)=='Contrat') $trackid='con'; + if (get_class($objecttmp)=='Propal') $trackid='pro'; + if (get_class($objecttmp)=='Commande') $trackid='ord'; + if (get_class($objecttmp)=='Facture') $trackid='inv'; + if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; + if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; + if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; + + $trackid.=$objecttmp->id; + } + //var_dump($filepath); + //var_dump($trackid);exit; + + // Send mail (substitutionarray must be done just before this) + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); + if ($mailfile->error) + { + $resaction.='
'.$mailfile->error.'
'; + } + else + { + $result=$mailfile->sendfile(); + if ($result) + { + $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'
'; // Must not contain " + + $error=0; + + // Insert logs into agenda + foreach($listofqualifiedobj as $objid2 => $objectobj2) + { + if ((! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); + + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; + if ($objectclass == 'Commande') $actiontypecode='AC_COM'; + if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; + if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; + if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; + if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ + + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; + if ($message) + { + if ($sendtocc) $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject); + $actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":"); + $actionmsg = dol_concatdesc($actionmsg, $message); + } + $actionmsg2=''; + + // Initialisation donnees + $objectobj2->sendtoid = 0; + $objectobj2->actionmsg = $actionmsg; // Long text + $objectobj2->actionmsg2 = $actionmsg2; // Short text + $objectobj2->fk_element = $objid2; + $objectobj2->elementtype = $objectobj2->element; + + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; + if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; + if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; + if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; + if ($triggername == 'FACTURE_SENTBYMAIL') $triggername = 'BILL_SENTBYMAIL'; + if ($triggername == 'EXPEDITION_SENTBYMAIL') $triggername = 'SHIPPING_SENTBYMAIL'; + if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; + if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; + if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; + + if (! empty($triggername)) + { + // Appel des triggers + include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; + $interface=new Interfaces($db); + $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); + if ($result < 0) { $error++; $errors=$interface->errors; } + // Fin appel triggers + + if ($error) + { + setEventMessages($db->lasterror(), $errors, 'errors'); + dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); + } + } + } + + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) + } + else + { + $langs->load("other"); + if ($mailfile->error) + { + $resaction.=$langs->trans('ErrorFailedToSendMail',$from,$sendto); + $resaction.='
'.$mailfile->error.'
'; + } + else + { + $resaction.='
No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
'; + } + } + } + } + } + } + + $resaction.=($resaction?'
':$resaction); + $resaction.=''.$langs->trans("ResultOfMailSending").':
'."\n"; + $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n
"; + $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n
"; + $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n
"; + + if ($nbsent) + { + $action=''; // Do not show form post if there was at least one successfull sent + //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); + setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); + setEventMessages($resaction, null, 'mesgs'); + } + else + { + //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file + setEventMessages($resaction, null, 'warnings'); + } + + $action='list'; + $massaction=''; + } } if ($massaction == 'confirm_createbills') { - $orders = GETPOST('toselect','array'); - $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); - $validate_invoices = GETPOST('valdate_invoices', 'int'); - - $TFact = array(); - $TFactThird = array(); - - $nb_bills_created = 0; - - $db->begin(); - - foreach($orders as $id_order) - { - $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) continue; - - $objecttmp = new Facture($db); - if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. - else { - // Load extrafields of order - $cmd->fetch_optionals(); - - $objecttmp->socid = $cmd->socid; - $objecttmp->type = Facture::TYPE_STANDARD; - $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; - $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; - $objecttmp->fk_project = $cmd->fk_project; - - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - if (empty($datefacture)) - { - $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); - } - - $objecttmp->date = $datefacture; - $objecttmp->origin = 'commande'; - $objecttmp->origin_id = $id_order; - - $objecttmp->array_options = $cmd->array_options; // Copy extrafields - - $res = $objecttmp->create($user); - - if($res > 0) $nb_bills_created++; - } - - if ($objecttmp->id > 0) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; - $sql.= "fk_source"; - $sql.= ", sourcetype"; - $sql.= ", fk_target"; - $sql.= ", targettype"; - $sql.= ") VALUES ("; - $sql.= $id_order; - $sql.= ", '".$objecttmp->origin."'"; - $sql.= ", ".$objecttmp->id; - $sql.= ", '".$objecttmp->element."'"; - $sql.= ")"; - - if (! $db->query($sql)) - { - $error++; - } - - if (! $error) - { - $lines = $cmd->lines; - if (empty($lines) && method_exists($cmd, 'fetch_lines')) - { - $cmd->fetch_lines(); - $lines = $cmd->lines; - } - - $fk_parent_line=0; - $num=count($lines); - - for ($i=0;$i<$num;$i++) - { - $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); - if ($lines[$i]->subprice < 0) - { - // Negative line, we create a discount line - $discount = new DiscountAbsolute($db); - $discount->fk_soc=$objecttmp->socid; - $discount->amount_ht=abs($lines[$i]->total_ht); - $discount->amount_tva=abs($lines[$i]->total_tva); - $discount->amount_ttc=abs($lines[$i]->total_ttc); - $discount->tva_tx=$lines[$i]->tva_tx; - $discount->fk_user=$user->id; - $discount->description=$desc; - $discountid=$discount->create($user); - if ($discountid > 0) - { - $result=$objecttmp->insert_discount($discountid); - //$result=$discount->link_to_invoice($lineid,$id); - } - else - { - setEventMessages($discount->error, $discount->errors, 'errors'); - $error++; - break; - } - } - else - { - // Positive line - $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); - // Date start - $date_start=false; - if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; - //Date end - $date_end=false; - if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) - { - $fk_parent_line = 0; - } - - // Extrafields - if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals($lines[$i]->rowid); - $array_options = $lines[$i]->array_options; - } - - $result = $objecttmp->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->localtax2_tx, - $lines[$i]->fk_product, - $lines[$i]->remise_percent, - $date_start, - $date_end, - 0, - $lines[$i]->info_bits, - $lines[$i]->fk_remise_except, - 'HT', - 0, - $product_type, - $ii, - $lines[$i]->special_code, - $objecttmp->origin, - $lines[$i]->rowid, - $fk_parent_line, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - $lines[$i]->label, - $array_options - ); - if ($result > 0) - { - $lineid=$result; - } - else - { - $lineid=0; - $error++; - break; - } - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { - $fk_parent_line = $result; - } - } - } - } - } - - //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - - if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; - else $TFact[$objecttmp->id] = $objecttmp; - } - - // Build doc with all invoices - $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; - $toselect = array(); - - if (! $error && $validate_invoices) - { - $massaction = $action = 'builddoc'; - - foreach($TAllFact as &$objecttmp) - { - $result = $objecttmp->validate($user); - if ($result <= 0) - { - $error++; - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - break; - } - - $id = $objecttmp->id; // For builddoc action - $object = $objecttmp; - - // Builddoc - $donotredirect = 1; - $upload_dir = $conf->facture->dir_output; - $permissioncreate=$user->rights->facture->creer; - - // Call action to build doc - $savobject = $object; - $object = $objecttmp; - include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - $object = $savobject; - } - - $massaction = $action = 'confirm_createbills'; - } - - if (! $error) - { - $db->commit(); - setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - - // Make a redirect to avoid to bill twice if we make a refresh or back - $param=''; - if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); - if ($sall) $param.='&sall='.urlencode($sall); - if ($socid > 0) $param.='&socid='.urlencode($socid); - if ($viewstatut != '') $param.='&viewstatut='.urlencode($viewstatut); - if ($search_orderday) $param.='&search_orderday='.urlencode($search_orderday); - if ($search_ordermonth) $param.='&search_ordermonth='.urlencode($search_ordermonth); - if ($search_orderyear) $param.='&search_orderyear='.urlencode($search_orderyear); - if ($search_deliveryday) $param.='&search_deliveryday='.urlencode($search_deliveryday); - if ($search_deliverymonth) $param.='&search_deliverymonth='.urlencode($search_deliverymonth); - if ($search_deliveryyear) $param.='&search_deliveryyear='.urlencode($search_deliveryyear); - if ($search_ref) $param.='&search_ref='.urlencode($search_ref); - if ($search_company) $param.='&search_company='.urlencode($search_company); - if ($search_ref_customer) $param.='&search_ref_customer='.urlencode($search_ref_customer); - if ($search_user > 0) $param.='&search_user='.urlencode($search_user); - if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); - if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht); - if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); - if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); - if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); - if ($show_files) $param.='&show_files=' .urlencode($show_files); - if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); - if ($billed != '') $param.='&billed='.urlencode($billed); - - header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); - exit; - } - else - { - $db->rollback(); - $action='create'; - $_GET["origin"]=$_POST["origin"]; - $_GET["originid"]=$_POST["originid"]; - setEventMessages("Error", null, 'errors'); - $error++; - } + $orders = GETPOST('toselect','array'); + $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); + $validate_invoices = GETPOST('valdate_invoices', 'int'); + + $TFact = array(); + $TFactThird = array(); + + $nb_bills_created = 0; + + $db->begin(); + + foreach($orders as $id_order) + { + $cmd = new Commande($db); + if ($cmd->fetch($id_order) <= 0) continue; + + $objecttmp = new Facture($db); + if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. + else { + // Load extrafields of order + $cmd->fetch_optionals(); + + $objecttmp->socid = $cmd->socid; + $objecttmp->type = Facture::TYPE_STANDARD; + $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; + $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; + $objecttmp->fk_project = $cmd->fk_project; + + $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + if (empty($datefacture)) + { + $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); + } + + $objecttmp->date = $datefacture; + $objecttmp->origin = 'commande'; + $objecttmp->origin_id = $id_order; + + $objecttmp->array_options = $cmd->array_options; // Copy extrafields + + $res = $objecttmp->create($user); + + if($res > 0) $nb_bills_created++; + } + + if ($objecttmp->id > 0) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; + $sql.= "fk_source"; + $sql.= ", sourcetype"; + $sql.= ", fk_target"; + $sql.= ", targettype"; + $sql.= ") VALUES ("; + $sql.= $id_order; + $sql.= ", '".$objecttmp->origin."'"; + $sql.= ", ".$objecttmp->id; + $sql.= ", '".$objecttmp->element."'"; + $sql.= ")"; + + if (! $db->query($sql)) + { + $error++; + } + + if (! $error) + { + $lines = $cmd->lines; + if (empty($lines) && method_exists($cmd, 'fetch_lines')) + { + $cmd->fetch_lines(); + $lines = $cmd->lines; + } + + $fk_parent_line=0; + $num=count($lines); + + for ($i=0;$i<$num;$i++) + { + $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); + if ($lines[$i]->subprice < 0) + { + // Negative line, we create a discount line + $discount = new DiscountAbsolute($db); + $discount->fk_soc=$objecttmp->socid; + $discount->amount_ht=abs($lines[$i]->total_ht); + $discount->amount_tva=abs($lines[$i]->total_tva); + $discount->amount_ttc=abs($lines[$i]->total_ttc); + $discount->tva_tx=$lines[$i]->tva_tx; + $discount->fk_user=$user->id; + $discount->description=$desc; + $discountid=$discount->create($user); + if ($discountid > 0) + { + $result=$objecttmp->insert_discount($discountid); + //$result=$discount->link_to_invoice($lineid,$id); + } + else + { + setEventMessages($discount->error, $discount->errors, 'errors'); + $error++; + break; + } + } + else + { + // Positive line + $product_type=($lines[$i]->product_type?$lines[$i]->product_type:0); + // Date start + $date_start=false; + if ($lines[$i]->date_debut_prevue) $date_start=$lines[$i]->date_debut_prevue; + if ($lines[$i]->date_debut_reel) $date_start=$lines[$i]->date_debut_reel; + if ($lines[$i]->date_start) $date_start=$lines[$i]->date_start; + //Date end + $date_end=false; + if ($lines[$i]->date_fin_prevue) $date_end=$lines[$i]->date_fin_prevue; + if ($lines[$i]->date_fin_reel) $date_end=$lines[$i]->date_fin_reel; + if ($lines[$i]->date_end) $date_end=$lines[$i]->date_end; + // Reset fk_parent_line for no child products and special product + if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) + { + $fk_parent_line = 0; + } + + // Extrafields + if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { + $lines[$i]->fetch_optionals($lines[$i]->rowid); + $array_options = $lines[$i]->array_options; + } + + $result = $objecttmp->addline( + $desc, + $lines[$i]->subprice, + $lines[$i]->qty, + $lines[$i]->tva_tx, + $lines[$i]->localtax1_tx, + $lines[$i]->localtax2_tx, + $lines[$i]->fk_product, + $lines[$i]->remise_percent, + $date_start, + $date_end, + 0, + $lines[$i]->info_bits, + $lines[$i]->fk_remise_except, + 'HT', + 0, + $product_type, + $ii, + $lines[$i]->special_code, + $objecttmp->origin, + $lines[$i]->rowid, + $fk_parent_line, + $lines[$i]->fk_fournprice, + $lines[$i]->pa_ht, + $lines[$i]->label, + $array_options + ); + if ($result > 0) + { + $lineid=$result; + } + else + { + $lineid=0; + $error++; + break; + } + // Defined the new fk_parent_line + if ($result > 0 && $lines[$i]->product_type == 9) + { + $fk_parent_line = $result; + } + } + } + } + } + + //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. + + if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; + else $TFact[$objecttmp->id] = $objecttmp; + } + + // Build doc with all invoices + $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; + $toselect = array(); + + if (! $error && $validate_invoices) + { + $massaction = $action = 'builddoc'; + + foreach($TAllFact as &$objecttmp) + { + $result = $objecttmp->validate($user); + if ($result <= 0) + { + $error++; + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + break; + } + + $id = $objecttmp->id; // For builddoc action + $object = $objecttmp; + + // Builddoc + $donotredirect = 1; + $upload_dir = $conf->facture->dir_output; + $permissioncreate=$user->rights->facture->creer; + + // Call action to build doc + $savobject = $object; + $object = $objecttmp; + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + $object = $savobject; + } + + $massaction = $action = 'confirm_createbills'; + } + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); + + // Make a redirect to avoid to bill twice if we make a refresh or back + $param=''; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.urlencode($limit); + if ($sall) $param.='&sall='.urlencode($sall); + if ($socid > 0) $param.='&socid='.urlencode($socid); + if ($viewstatut != '') $param.='&viewstatut='.urlencode($viewstatut); + if ($search_orderday) $param.='&search_orderday='.urlencode($search_orderday); + if ($search_ordermonth) $param.='&search_ordermonth='.urlencode($search_ordermonth); + if ($search_orderyear) $param.='&search_orderyear='.urlencode($search_orderyear); + if ($search_deliveryday) $param.='&search_deliveryday='.urlencode($search_deliveryday); + if ($search_deliverymonth) $param.='&search_deliverymonth='.urlencode($search_deliverymonth); + if ($search_deliveryyear) $param.='&search_deliveryyear='.urlencode($search_deliveryyear); + if ($search_ref) $param.='&search_ref='.urlencode($search_ref); + if ($search_company) $param.='&search_company='.urlencode($search_company); + if ($search_ref_customer) $param.='&search_ref_customer='.urlencode($search_ref_customer); + if ($search_user > 0) $param.='&search_user='.urlencode($search_user); + if ($search_sale > 0) $param.='&search_sale='.urlencode($search_sale); + if ($search_total_ht != '') $param.='&search_total_ht='.urlencode($search_total_ht); + if ($search_total_vat != '') $param.='&search_total_vat='.urlencode($search_total_vat); + if ($search_total_ttc != '') $param.='&search_total_ttc='.urlencode($search_total_ttc); + if ($search_project_ref >= 0) $param.="&search_project_ref=".urlencode($search_project_ref); + if ($show_files) $param.='&show_files=' .urlencode($show_files); + if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); + if ($billed != '') $param.='&billed='.urlencode($billed); + + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); + exit; + } + else + { + $db->rollback(); + $action='create'; + $_GET["origin"]=$_POST["origin"]; + $_GET["originid"]=$_POST["originid"]; + setEventMessages("Error", null, 'errors'); + $error++; + } } if (!$error && $massaction == 'cancelorders') { - - $db->begin(); - - $nbok = 0; - - - $orders = GETPOST('toselect', 'array'); - foreach ($orders as $id_order) - { - - $cmd = new Commande($db); - if ($cmd->fetch($id_order) <= 0) - continue; - - if ($cmd->statut != Commande::STATUS_VALIDATED) - { - $langs->load('errors'); - setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); - $error++; - break; - } - else - $result = $cmd->cancel(); - - if ($result < 0) - { - setEventMessages($cmd->error, $cmd->errors, 'errors'); - $error++; - break; - } - else - $nbok++; - } - if (!$error) - { - if ($nbok > 1) - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } + + $db->begin(); + + $nbok = 0; + + + $orders = GETPOST('toselect', 'array'); + foreach ($orders as $id_order) + { + + $cmd = new Commande($db); + if ($cmd->fetch($id_order) <= 0) + continue; + + if ($cmd->statut != Commande::STATUS_VALIDATED) + { + $langs->load('errors'); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusValidToBeCanceled", $cmd->ref), null, 'errors'); + $error++; + break; + } + else + $result = $cmd->cancel(); + + if ($result < 0) + { + setEventMessages($cmd->error, $cmd->errors, 'errors'); + $error++; + break; + } + else + $nbok++; + } + if (!$error) + { + if ($nbok > 1) + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } } if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_search')) { - if (empty($diroutputmassaction)) - { - dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); - exit; - } - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - - $objecttmp=new $objectclass($db); - $listofobjectid=array(); - $listofobjectthirdparties=array(); - $listofobjectref=array(); - foreach($toselect as $toselectid) - { - $objecttmp=new $objectclass($db); // must create new instance because instance is saved into $listofobjectref array for future use - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - $listofobjectid[$toselectid]=$toselectid; - $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$toselectid]=$objecttmp->ref; - } - } - - $arrayofinclusion=array(); - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; - foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files - $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); - - // build list of files with full path - $files = array(); - foreach($listofobjectref as $basename) - { - $basename = dol_sanitizeFileName($basename); - foreach($listoffiles as $filefound) - { - if (strstr($filefound["name"],$basename)) - { - $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; - break; - } - } - } - - // Define output language (Here it is not used because we do only merging existing PDF) - $outputlangs = $langs; - $newlang=''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - - if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) - { - // Create output dir if not exists - dol_mkdir($diroutputmassaction); - - // Defined name of merged file - $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); - - // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); - } - if ($year) $filename.='_'.$year; - if ($month) $filename.='_'.$month; - - if (count($files)>0) - { - $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - - $input_files = ''; - foreach($files as $f) { - $input_files.=' '.escapeshellarg($f); - } - - $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); - exec($cmd); - - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); - } - } - else { - // Create empty PDF - $formatarray=pdf_getFormat(); - $page_largeur = $formatarray['width']; - $page_hauteur = $formatarray['height']; - $format = array($page_largeur,$page_hauteur); - - $pdf=pdf_getInstance($format); - - if (class_exists('TCPDF')) - { - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - } - $pdf->SetFont(pdf_getPDFFont($outputlangs)); - - if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - - // Add all others - foreach($files as $file) - { - // Charge un document PDF depuis un fichier. - $pagecount = $pdf->setSourceFile($file); - for ($i = 1; $i <= $pagecount; $i++) - { - $tplidx = $pdf->importPage($i); - $s = $pdf->getTemplatesize($tplidx); - $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); - $pdf->useTemplate($tplidx); - } - } - - // Create output dir if not exists - dol_mkdir($diroutputmassaction); - - // Defined name of merged file - $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); - $filename=preg_replace('/\s/','_',$filename); - - // Save merged file - if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) - { - if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); - else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); - } - if ($year) $filename.='_'.$year; - if ($month) $filename.='_'.$month; - if ($pagecount) - { - $now=dol_now(); - $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - $pdf->Output($file,'F'); - if (! empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); - - $langs->load("exports"); - setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); - } - } + if (empty($diroutputmassaction)) + { + dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); + exit; + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + $objecttmp=new $objectclass($db); + $listofobjectid=array(); + $listofobjectthirdparties=array(); + $listofobjectref=array(); + foreach($toselect as $toselectid) + { + $objecttmp=new $objectclass($db); // must create new instance because instance is saved into $listofobjectref array for future use + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $listofobjectid[$toselectid]=$toselectid; + $thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid; + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$toselectid]=$objecttmp->ref; + } + } + + $arrayofinclusion=array(); + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; + foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files + $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); + + // build list of files with full path + $files = array(); + foreach($listofobjectref as $basename) + { + $basename = dol_sanitizeFileName($basename); + foreach($listoffiles as $filefound) + { + if (strstr($filefound["name"],$basename)) + { + $files[] = $uploaddir.'/'.$basename.'/'.$filefound["name"]; + break; + } + } + } + + // Define output language (Here it is not used because we do only merging existing PDF) + $outputlangs = $langs; + $newlang=''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$objecttmp->thirdparty->default_lang; + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) + { + // Create output dir if not exists + dol_mkdir($diroutputmassaction); + + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + + if (count($files)>0) + { + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + + $input_files = ''; + foreach($files as $f) { + $input_files.=' '.escapeshellarg($f); + } + + $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); + exec($cmd); + + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } + else { + // Create empty PDF + $formatarray=pdf_getFormat(); + $page_largeur = $formatarray['width']; + $page_hauteur = $formatarray['height']; + $format = array($page_largeur,$page_hauteur); + + $pdf=pdf_getInstance($format); + + if (class_exists('TCPDF')) + { + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + } + $pdf->SetFont(pdf_getPDFFont($outputlangs)); + + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + + // Add all others + foreach($files as $file) + { + // Charge un document PDF depuis un fichier. + $pagecount = $pdf->setSourceFile($file); + for ($i = 1; $i <= $pagecount; $i++) + { + $tplidx = $pdf->importPage($i); + $s = $pdf->getTemplatesize($tplidx); + $pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L'); + $pdf->useTemplate($tplidx); + } + } + + // Create output dir if not exists + dol_mkdir($diroutputmassaction); + + // Defined name of merged file + $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file + if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) + { + if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); + else $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))); + } + if ($year) $filename.='_'.$year; + if ($month) $filename.='_'.$month; + if ($pagecount) + { + $now=dol_now(); + $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; + $pdf->Output($file,'F'); + if (! empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); + + $langs->load("exports"); + setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); + } + else + { + setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); + } + } } // Remove a file from massaction area if ($action == 'remove_file') { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $langs->load("other"); - $upload_dir = $diroutputmassaction; - $file = $upload_dir . '/' . GETPOST('file'); - $ret=dol_delete_file($file); - if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); - else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); - $action=''; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $langs->load("other"); + $upload_dir = $diroutputmassaction; + $file = $upload_dir . '/' . GETPOST('file'); + $ret=dol_delete_file($file); + if ($ret) setEventMessages($langs->trans("FileWasRemoved", GETPOST('file')), null, 'mesgs'); + else setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('file')), null, 'errors'); + $action=''; } // Validate records if (! $error && $massaction == 'validate' && $permtocreate) { - $objecttmp=new $objectclass($db); - - if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) - { - $langs->load("errors"); - setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); - $error++; - } - if ($objecttmp->element == 'invoice_supplier' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) - { - $langs->load("errors"); - setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); - $error++; - } - if (! $error) - { - $db->begin(); - - $nbok = 0; - foreach($toselect as $toselectid) - { - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - //if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); - //else - $result = $objecttmp->validate($user); - if ($result == 0) - { - $langs->load("errors"); - setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); - $error++; - break; - } - elseif ($result < 0) - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - else $nbok++; - } - else - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - } - - if (! $error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } - //var_dump($listofobjectthirdparties);exit; - } + $objecttmp=new $objectclass($db); + + if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) + { + $langs->load("errors"); + setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); + $error++; + } + if ($objecttmp->element == 'invoice_supplier' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) + { + $langs->load("errors"); + setEventMessages($langs->trans('ErrorMassValidationNotAllowedWhenStockIncreaseOnAction'), null, 'errors'); + $error++; + } + if (! $error) + { + $db->begin(); + + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + //if (in_array($objecttmp->element, array('societe','member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); + //else + $result = $objecttmp->validate($user); + if ($result == 0) + { + $langs->load("errors"); + setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); + $error++; + break; + } + elseif ($result < 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; + } } // Closed records if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { $db->begin(); - + $objecttmp = new $objectclass($db); $nbok = 0; foreach ($toselect as $toselectid) { @@ -1106,13 +1119,13 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo break; } } - + if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - $db->commit(); + else + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + $db->commit(); } else { $db->rollback(); @@ -1121,66 +1134,127 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { - $db->begin(); + $db->begin(); + + $objecttmp=new $objectclass($db); + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + // Refuse deletion for some objects/status + if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) + { + $langs->load("errors"); + $nbignored++; + $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; + continue; + } + + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) + { + $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; + $res = $db->query($sql); + + if (!$res) + { + setEventMessage('ErrorRecordParentingNotModified', 'errors'); + $error++; + } + } + + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); + else $result = $objecttmp->delete($user); + + if ($result <= 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } + //var_dump($listofobjectthirdparties);exit; +} - $objecttmp=new $objectclass($db); - $nbok = 0; - foreach($toselect as $toselectid) - { - $result=$objecttmp->fetch($toselectid); - if ($result > 0) - { - // Refuse deletion for some objects/status - if ($objectclass == 'Facture' && empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED) && $objecttmp->status != Facture::STATUS_DRAFT) - { - $langs->load("errors"); - $nbignored++; - $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; - continue; - } - - if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) - { - $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; - $res = $db->query($sql); - - if (!$res) - { - setEventMessage('ErrorRecordParentingNotModified', 'errors'); - $error++; - } - } - - if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); - else $result = $objecttmp->delete($user); - - if ($result <= 0) - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - else $nbok++; - } - else - { - setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); - $error++; - break; - } - } - - if (! $error) - { - if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); - else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); - $db->commit(); - } - else - { - $db->rollback(); - } - //var_dump($listofobjectthirdparties);exit; +// Generate document foreach object according to model linked to object +// @TODO : propose model selection +if (! $error && $massaction == 'generate_doc' && $permtoread) +{ + $db->begin(); + + $objecttmp=new $objectclass($db); + $nbok = 0; + foreach($toselect as $toselectid) + { + $result=$objecttmp->fetch($toselectid); + if ($result > 0) + { + $outputlangs = $langs; + $newlang=''; + + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty + if (! empty($newlang)) + { + $outputlangs = new Translate("",$conf); + $outputlangs->setDefaultLang($newlang); + } + + // To be sure vars is defined + if (empty($hidedetails)) $hidedetails=0; + if (empty($hidedesc)) $hidedesc=0; + if (empty($hideref)) $hideref=0; + if (empty($moreparams)) $moreparams=null; + + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + + if ($result <= 0) + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + else $nbok++; + } + else + { + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); + $error++; + break; + } + } + + if (! $error) + { + if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordGenerated", $nbok), null, 'mesgs'); + $db->commit(); + } + else + { + $db->rollback(); + } } $parameters['toselect']=$toselect; From c84b189a05474228beba41cff703211538fb43f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 10:40:25 +0100 Subject: [PATCH 04/20] Fix duplicate recording of event when using mass action send --- htdocs/core/actions_massactions.inc.php | 57 +++++++++++++++---------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 630c67e9979..9839c39cfe9 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -74,10 +74,11 @@ if (! $error && $massaction == 'confirm_presend') if (! $error) { $thirdparty=new Societe($db); + + $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - $objecttmp=new $objectclass($db); foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -85,12 +86,15 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; - $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; - $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; + if (empty($thirdpartyid)) $thirdpartyid=0; + + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; + $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } } } @@ -235,6 +239,12 @@ if (! $error && $massaction == 'confirm_presend') $fuser->fetch($objectobj->fk_user_author); $sendto = $fuser->email; } + elseif ($objectobj->element == 'holiday') + { + $fuser = new User($db); + $fuser->fetch($objectobj->fk_user); + $sendto = $fuser->email; + } else { $objectobj->fetch_thirdparty(); @@ -283,15 +293,14 @@ if (! $error && $massaction == 'confirm_presend') } } - // Object of thirdparty qualified + // Object of thirdparty qualified, we add it $listofqualifiedobj[$objectid]=$objectobj; $listofqualifiedref[$objectid]=$objectobj->ref; - //var_dump($listofqualifiedref); } - // Send email if there is at least one qualified record + // Send email if there is at least one qualified object for current thirdparty if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); @@ -337,25 +346,27 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) - $oneemailperrecipient=(GETPOST('oneemailperrecipient')=='on'?1:0); + // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) + $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); $looparray=array(); if (! $oneemailperrecipient) { $looparray = $listofqualifiedobj; foreach ($looparray as $key => $objecttmp) { - $looparray[$key]->thirdparty = $thirdparty; + $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object } } else { $objectforloop=new $objectclass($db); - $objectforloop->thirdparty = $thirdparty; + $objectforloop->thirdparty = $thirdparty; // Force thirdparty on object (even if object was not loaded) $looparray[0]=$objectforloop; } //var_dump($looparray);exit; + dol_syslog("We have set an array of ".count($looparray)." emails to send"); - foreach ($looparray as $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per record + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content $substitutionarray=getCommonSubstitutionArray($langs, 0, null, $objecttmp); @@ -422,9 +433,11 @@ if (! $error && $massaction == 'confirm_presend') $error=0; // Insert logs into agenda - foreach($listofqualifiedobj as $objid => $objectobj) + foreach($listofqualifiedobj as $objid2 => $objectobj2) { - dol_syslog("Try to insert email event into agenda for objid=".$objid." => objectobj=".get_class($objectobj)); + if (()! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; @@ -444,13 +457,13 @@ if (! $error && $massaction == 'confirm_presend') $actionmsg2=''; // Initialisation donnees - $objectobj->sendtoid = 0; - $objectobj->actionmsg = $actionmsg; // Long text - $objectobj->actionmsg2 = $actionmsg2; // Short text - $objectobj->fk_element = $objid; - $objectobj->elementtype = $objectobj->element; + $objectobj2->sendtoid = 0; + $objectobj2->actionmsg = $actionmsg; // Long text + $objectobj2->actionmsg2 = $actionmsg2; // Short text + $objectobj2->fk_element = $objid2; + $objectobj2->elementtype = $objectobj2->element; - $triggername = strtoupper(get_class($objectobj)) .'_SENTBYMAIL'; + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; if ($triggername == 'COMMANDE_SENTBYMAIL') $triggername = 'ORDER_SENTBYMAIL'; @@ -465,7 +478,7 @@ if (! $error && $massaction == 'confirm_presend') // Appel des triggers include_once DOL_DOCUMENT_ROOT . "/core/class/interfaces.class.php"; $interface=new Interfaces($db); - $result=$interface->run_triggers($triggername, $objectobj, $user, $langs, $conf); + $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers @@ -475,9 +488,9 @@ if (! $error && $massaction == 'confirm_presend') dol_syslog("Error in trigger ".$triggername.' '.$db->lasterror(), LOG_ERR); } } - - $nbsent++; } + + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else { @@ -544,7 +557,7 @@ if ($massaction == 'confirm_createbills') else { // Load extrafields of order $cmd->fetch_optionals(); - + $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; From 77e322b2503b001694715760ac365b205812b947 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 10:49:51 +0100 Subject: [PATCH 05/20] Fix bad var --- htdocs/core/actions_massactions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 9839c39cfe9..ba94300ae22 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -435,7 +435,7 @@ if (! $error && $massaction == 'confirm_presend') // Insert logs into agenda foreach($listofqualifiedobj as $objid2 => $objectobj2) { - if (()! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); From 43c0a2232ceaa785e97fd27d98362aea9c85fc27 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 10:51:34 +0100 Subject: [PATCH 06/20] Fix massaction --- htdocs/core/actions_massactions.inc.php | 250 ++++++++++++------------ 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index d01f0705817..0c0dba126c7 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -66,19 +66,19 @@ if (! $error && $massaction == 'confirm_presend') $nbignored = 0; $langs->load("mails"); include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $listofobjectid=array(); $listofobjectthirdparties=array(); $listofobjectref=array(); - + if (! $error) { $thirdparty=new Societe($db); - + $objecttmp=new $objectclass($db); if ($objecttmp->element == 'expensereport') $thirdparty=new User($db); if ($objecttmp->element == 'holiday') $thirdparty=new User($db); - + foreach($toselect as $toselectid) { $objecttmp=new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use @@ -86,19 +86,19 @@ if (! $error && $massaction == 'confirm_presend') if ($result > 0) { $listofobjectid[$toselectid]=$toselectid; - + $thirdpartyid=($objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid); if ($objecttmp->element == 'societe') $thirdpartyid=$objecttmp->id; if ($objecttmp->element == 'expensereport') $thirdpartyid=$objecttmp->fk_user_author; if ($objecttmp->element == 'holiday') $thirdpartyid=$objecttmp->fk_user; if (empty($thirdpartyid)) $thirdpartyid=0; - + $listofobjectthirdparties[$thirdpartyid]=$thirdpartyid; $listofobjectref[$thirdpartyid][$toselectid]=$objecttmp; } } } - + // Check mandatory parameters if (GETPOST('fromtype','alpha') === 'user' && empty($user->email)) { @@ -106,7 +106,7 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("NoSenderEmailDefined"), null, 'warnings'); $massaction='presend'; } - + $receiver=$_POST['receiver']; if (! is_array($receiver)) { @@ -119,14 +119,14 @@ if (! $error && $massaction == 'confirm_presend') setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Recipient")), null, 'warnings'); $massaction='presend'; } - + if (! GETPOST('subject','none')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); $massaction='presend'; } - + // Loop on each recipient/thirdparty if (! $error) { @@ -138,12 +138,12 @@ if (! $error && $massaction == 'confirm_presend') dol_print_error($db); exit; } - + $sendto=''; $sendtocc=''; $sendtobcc=''; $sendtoid = array(); - + // Define $sendto $tmparray=array(); if (trim($_POST['sendto'])) @@ -168,7 +168,7 @@ if (! $error && $massaction == 'confirm_presend') } } $sendto=implode(',',$tmparray); - + // Define $sendtocc $receivercc=$_POST['receivercc']; if (! is_array($receivercc)) @@ -198,13 +198,13 @@ if (! $error && $massaction == 'confirm_presend') } } $sendtocc=implode(',',$tmparray); - + //var_dump($listofobjectref);exit; $attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array()); $listofqualifiedobj=array(); $listofqualifiedref=array(); $thirdpartywithoutemail=array(); - + foreach($listofobjectref[$thirdpartyid] as $objectid => $objectobj) { //var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut); @@ -229,7 +229,7 @@ if (! $error && $massaction == 'confirm_presend') $resaction.='
'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction',$objectobj->ref).'

'; continue; // Payment done or started or canceled } - + // Test recipient if (empty($sendto)) // For the case, no recipient were set (multi thirdparties send) { @@ -251,7 +251,7 @@ if (! $error && $massaction == 'confirm_presend') $sendto = $objectobj->thirdparty->email; } } - + if (empty($sendto)) { //print "No recipient for thirdparty ".$objectobj->thirdparty->name; @@ -264,7 +264,7 @@ if (! $error && $massaction == 'confirm_presend') $thirdpartywithoutemail[$objectobj->thirdparty->id]=1; continue; } - + if ($_POST['addmaindocfile']) { // TODO Use future field $objectobj->fullpathdoc to know where is stored default file @@ -273,7 +273,7 @@ if (! $error && $massaction == 'confirm_presend') $filedir=$uploaddir . '/' . dol_sanitizeFileName($objectobj->ref); $file = $filedir . '/' . $filename; $mime = dol_mimetype($file); - + if (dol_is_file($file)) { // Create form object @@ -292,19 +292,19 @@ if (! $error && $massaction == 'confirm_presend') continue; } } - + // Object of thirdparty qualified, we add it $listofqualifiedobj[$objectid]=$objectobj; $listofqualifiedref[$objectid]=$objectobj->ref; - + //var_dump($listofqualifiedref); } - + // Send email if there is at least one qualified object for current thirdparty if (count($listofqualifiedobj) > 0) { $langs->load("commercial"); - + $fromtype = GETPOST('fromtype'); if ($fromtype === 'user') { $from = $user->getFullName($langs) .' <'.$user->email.'>'; @@ -332,11 +332,11 @@ if (! $error && $massaction == 'confirm_presend') else { $from = $_POST['fromname'] . ' <' . $_POST['frommail'] .'>'; } - + $replyto = $from; $subject = GETPOST('subject','none'); $message = GETPOST('message','none'); - + $sendtobcc = GETPOST('sendtoccc'); if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); if ($objectclass == 'Commande') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)); @@ -344,7 +344,7 @@ if (! $error && $massaction == 'confirm_presend') if ($objectclass == 'Supplier_Proposal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)); if ($objectclass == 'CommandeFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)); if ($objectclass == 'FactureFournisseur') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO) ? '' : (($sendtobcc?", ":"").$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)); - + // $listofqualifiedobj is array with key = object id and value is instance of qualified objects, for the current thirdparty (but thirdparty property is not loaded yet) // $looparray will be an array with number of email to send for the current thirdparty (so 1 or n if n object for same thirdparty) $oneemailperrecipient=(GETPOST('oneemailperrecipient','alpha')=='on'?1:0); @@ -365,7 +365,7 @@ if (! $error && $massaction == 'confirm_presend') } //var_dump($looparray);exit; dol_syslog("We have set an array of ".count($looparray)." emails to send"); - + foreach ($looparray as $objectid => $objecttmp) // $objecttmp is a real object or an empty object if we choose to send one email per thirdparty instead of one per object { // Make substitution in email content @@ -374,25 +374,25 @@ if (! $error && $massaction == 'confirm_presend') $substitutionarray['__REF__'] = ($oneemailperrecipient ? join(', ',$listofqualifiedref) : $objecttmp->ref); $substitutionarray['__EMAIL__'] = $thirdparty->email; $substitutionarray['__CHECK_READ__'] = ''; - + $parameters=array('mode'=>'formemail'); - + if ( ! empty( $listofobjectthirdparties ) ) { $parameters['listofobjectthirdparties'] = $listofobjectthirdparties; } if ( ! empty( $listofobjectref ) ) { $parameters['listofobjectref'] = $listofobjectref; } - + complete_substitutions_array($substitutionarray, $langs, $objecttmp, $parameters); - + $subject=make_substitutions($subject, $substitutionarray); $message=make_substitutions($message, $substitutionarray); - + $filepath = $attachedfiles['paths']; $filename = $attachedfiles['names']; $mimetype = $attachedfiles['mimes']; - + // Define the trackid when emails sent from the mass action if ($oneemailperrecipient) { @@ -410,12 +410,12 @@ if (! $error && $massaction == 'confirm_presend') if (get_class($objecttmp)=='Supplier_Proposal') $trackid='spr'; if (get_class($objecttmp)=='CommandeFournisseur') $trackid='sor'; if (get_class($objecttmp)=='FactureFournisseur') $trackid='sin'; - + $trackid.=$objecttmp->id; } //var_dump($filepath); //var_dump($trackid);exit; - + // Send mail (substitutionarray must be done just before this) require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid); @@ -429,23 +429,23 @@ if (! $error && $massaction == 'confirm_presend') if ($result) { $resaction.=$langs->trans('MailSuccessfulySent',$mailfile->getValidAddress($from,2),$mailfile->getValidAddress($sendto,2)).'
'; // Must not contain " - + $error=0; - + // Insert logs into agenda foreach($listofqualifiedobj as $objid2 => $objectobj2) { - if ((! $oneemailperrecipient) && $objid2 != $objid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level - + if ((! $oneemailperrecipient) && $objid2 != $objectid) continue; // We discard this pass to avoid duplicate with other pass in looparray at higher level + dol_syslog("Try to insert email event into agenda for objid=".$objid2." => objectobj=".get_class($objectobj2)); - + /*if ($objectclass == 'Propale') $actiontypecode='AC_PROP'; if ($objectclass == 'Commande') $actiontypecode='AC_COM'; if ($objectclass == 'Facture') $actiontypecode='AC_FAC'; if ($objectclass == 'Supplier_Proposal') $actiontypecode='AC_SUP_PRO'; if ($objectclass == 'CommandeFournisseur') $actiontypecode='AC_SUP_ORD'; if ($objectclass == 'FactureFournisseur') $actiontypecode='AC_SUP_INV';*/ - + $actionmsg=$langs->transnoentities('MailSentBy').' '.$from.' '.$langs->transnoentities('To').' '.$sendto; if ($message) { @@ -455,14 +455,14 @@ if (! $error && $massaction == 'confirm_presend') $actionmsg = dol_concatdesc($actionmsg, $message); } $actionmsg2=''; - + // Initialisation donnees $objectobj2->sendtoid = 0; $objectobj2->actionmsg = $actionmsg; // Long text $objectobj2->actionmsg2 = $actionmsg2; // Short text $objectobj2->fk_element = $objid2; $objectobj2->elementtype = $objectobj2->element; - + $triggername = strtoupper(get_class($objectobj2)) .'_SENTBYMAIL'; if ($triggername == 'SOCIETE_SENTBYMAIL') $triggername = 'COMPANY_SENTBYMAIL'; if ($triggername == 'CONTRAT_SENTBYMAIL') $triggername = 'CONTRACT_SENTBYMAIL'; @@ -472,7 +472,7 @@ if (! $error && $massaction == 'confirm_presend') if ($triggername == 'COMMANDEFOURNISSEUR_SENTBYMAIL') $triggername = 'ORDER_SUPPLIER_SENTBYMAIL'; if ($triggername == 'FACTUREFOURNISSEUR_SENTBYMAIL') $triggername = 'BILL_SUPPLIER_SENTBYMAIL'; if ($triggername == 'SUPPLIERPROPOSAL_SENTBYMAIL') $triggername = 'PROPOSAL_SUPPLIER_SENTBYMAIL'; - + if (! empty($triggername)) { // Appel des triggers @@ -481,7 +481,7 @@ if (! $error && $massaction == 'confirm_presend') $result=$interface->run_triggers($triggername, $objectobj2, $user, $langs, $conf); if ($result < 0) { $error++; $errors=$interface->errors; } // Fin appel triggers - + if ($error) { setEventMessages($db->lasterror(), $errors, 'errors'); @@ -489,7 +489,7 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $nbsent++; // Nb of email sent (may be lower than number of record selected if we group thirdparties) } else @@ -509,13 +509,13 @@ if (! $error && $massaction == 'confirm_presend') } } } - + $resaction.=($resaction?'
':$resaction); $resaction.=''.$langs->trans("ResultOfMailSending").':
'."\n"; $resaction.=$langs->trans("NbSelected").': '.count($toselect)."\n
"; $resaction.=$langs->trans("NbIgnored").': '.($nbignored?$nbignored:0)."\n
"; $resaction.=$langs->trans("NbSent").': '.($nbsent?$nbsent:0)."\n
"; - + if ($nbsent) { $action=''; // Do not show form post if there was at least one successfull sent @@ -528,7 +528,7 @@ if (! $error && $massaction == 'confirm_presend') //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file setEventMessages($resaction, null, 'warnings'); } - + $action='list'; $massaction=''; } @@ -539,48 +539,48 @@ if ($massaction == 'confirm_createbills') $orders = GETPOST('toselect','array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); $validate_invoices = GETPOST('valdate_invoices', 'int'); - + $TFact = array(); $TFactThird = array(); - + $nb_bills_created = 0; - + $db->begin(); - + foreach($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + $objecttmp = new Facture($db); if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { // Load extrafields of order $cmd->fetch_optionals(); - + $objecttmp->socid = $cmd->socid; $objecttmp->type = Facture::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; $objecttmp->fk_project = $cmd->fk_project; - + $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); if (empty($datefacture)) { $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); } - + $objecttmp->date = $datefacture; $objecttmp->origin = 'commande'; $objecttmp->origin_id = $id_order; - + $objecttmp->array_options = $cmd->array_options; // Copy extrafields - + $res = $objecttmp->create($user); - + if($res > 0) $nb_bills_created++; } - + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; @@ -594,12 +594,12 @@ if ($massaction == 'confirm_createbills') $sql.= ", ".$objecttmp->id; $sql.= ", '".$objecttmp->element."'"; $sql.= ")"; - + if (! $db->query($sql)) { $error++; } - + if (! $error) { $lines = $cmd->lines; @@ -608,10 +608,10 @@ if ($massaction == 'confirm_createbills') $cmd->fetch_lines(); $lines = $cmd->lines; } - + $fk_parent_line=0; $num=count($lines); - + for ($i=0;$i<$num;$i++) { $desc=($lines[$i]->desc?$lines[$i]->desc:$lines[$i]->libelle); @@ -658,13 +658,13 @@ if ($massaction == 'confirm_createbills') { $fk_parent_line = 0; } - + // Extrafields if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED) && method_exists($lines[$i], 'fetch_optionals')) { $lines[$i]->fetch_optionals($lines[$i]->rowid); $array_options = $lines[$i]->array_options; } - + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, @@ -711,21 +711,21 @@ if ($massaction == 'confirm_createbills') } } } - + //$cmd->classifyBilled($user); // Disabled. This behavior must be set or not using the workflow module. - + if(!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; else $TFact[$objecttmp->id] = $objecttmp; } - + // Build doc with all invoices $TAllFact = empty($createbills_onebythird) ? $TFact : $TFactThird; $toselect = array(); - + if (! $error && $validate_invoices) { $massaction = $action = 'builddoc'; - + foreach($TAllFact as &$objecttmp) { $result = $objecttmp->validate($user); @@ -735,30 +735,30 @@ if ($massaction == 'confirm_createbills') setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; } - + $id = $objecttmp->id; // For builddoc action $object = $objecttmp; - + // Builddoc $donotredirect = 1; $upload_dir = $conf->facture->dir_output; $permissioncreate=$user->rights->facture->creer; - + // Call action to build doc $savobject = $object; $object = $objecttmp; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; $object = $savobject; } - + $massaction = $action = 'confirm_createbills'; } - + if (! $error) { $db->commit(); setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - + // Make a redirect to avoid to bill twice if we make a refresh or back $param=''; if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.urlencode($contextpage); @@ -784,7 +784,7 @@ if ($massaction == 'confirm_createbills') if ($show_files) $param.='&show_files=' .urlencode($show_files); if ($optioncss != '') $param.='&optioncss='.urlencode($optioncss); if ($billed != '') $param.='&billed='.urlencode($billed); - + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); exit; } @@ -801,20 +801,20 @@ if ($massaction == 'confirm_createbills') if (!$error && $massaction == 'cancelorders') { - + $db->begin(); - + $nbok = 0; - - + + $orders = GETPOST('toselect', 'array'); foreach ($orders as $id_order) { - + $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) continue; - + if ($cmd->statut != Commande::STATUS_VALIDATED) { $langs->load('errors'); @@ -824,7 +824,7 @@ if (!$error && $massaction == 'cancelorders') } else $result = $cmd->cancel(); - + if ($result < 0) { setEventMessages($cmd->error, $cmd->errors, 'errors'); @@ -856,11 +856,11 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se dol_print_error(null, 'include of actions_massactions.inc.php is done but var $diroutputmassaction was not defined'); exit; } - + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - + $objecttmp=new $objectclass($db); $listofobjectid=array(); $listofobjectthirdparties=array(); @@ -877,12 +877,12 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $listofobjectref[$toselectid]=$objecttmp->ref; } } - + $arrayofinclusion=array(); foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'\.pdf$'; foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf),'/').'_[a-zA-Z0-9-_]+\.pdf$'; // To include PDF generated from ODX files $listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true); - + // build list of files with full path $files = array(); foreach($listofobjectref as $basename) @@ -897,7 +897,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } } } - + // Define output language (Here it is not used because we do only merging existing PDF) $outputlangs = $langs; $newlang=''; @@ -908,16 +908,16 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + if (!empty($conf->global->USE_PDFTK_FOR_PDF_CONCAT)) { // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -926,23 +926,23 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se } if ($year) $filename.='_'.$year; if ($month) $filename.='_'.$month; - + if (count($files)>0) { $now=dol_now(); $file=$diroutputmassaction.'/'.$filename.'_'.dol_print_date($now,'dayhourlog').'.pdf'; - + $input_files = ''; foreach($files as $f) { $input_files.=' '.escapeshellarg($f); } - + $cmd = 'pdftk '.escapeshellarg($input_files).' cat output '.escapeshellarg($file); exec($cmd); - + if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -957,18 +957,18 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $page_largeur = $formatarray['width']; $page_hauteur = $formatarray['height']; $format = array($page_largeur,$page_hauteur); - + $pdf=pdf_getInstance($format); - + if (class_exists('TCPDF')) { $pdf->setPrintHeader(false); $pdf->setPrintFooter(false); } $pdf->SetFont(pdf_getPDFFont($outputlangs)); - + if (! empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - + // Add all others foreach($files as $file) { @@ -982,14 +982,14 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->useTemplate($tplidx); } } - + // Create output dir if not exists dol_mkdir($diroutputmassaction); - + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); $filename=preg_replace('/\s/','_',$filename); - + // Save merged file if (in_array($objecttmp->element, array('facture', 'facture_fournisseur')) && $search_status == Facture::STATUS_VALIDATED) { @@ -1005,7 +1005,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se $pdf->Output($file,'F'); if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt',$filename.'_'.dol_print_date($now,'dayhourlog')), null, 'mesgs'); } @@ -1020,7 +1020,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se if ($action == 'remove_file') { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - + $langs->load("other"); $upload_dir = $diroutputmassaction; $file = $upload_dir . '/' . GETPOST('file'); @@ -1034,7 +1034,7 @@ if ($action == 'remove_file') if (! $error && $massaction == 'validate' && $permtocreate) { $objecttmp=new $objectclass($db); - + if ($objecttmp->element == 'invoice' && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_BILL)) { $langs->load("errors"); @@ -1050,7 +1050,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) if (! $error) { $db->begin(); - + $nbok = 0; foreach($toselect as $toselectid) { @@ -1082,7 +1082,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1099,7 +1099,7 @@ if (! $error && $massaction == 'validate' && $permtocreate) // Closed records if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclose) { $db->begin(); - + $objecttmp = new $objectclass($db); $nbok = 0; foreach ($toselect as $toselectid) { @@ -1119,7 +1119,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo break; } } - + if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); @@ -1135,7 +1135,7 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permtoclo if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permtodelete) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1151,22 +1151,22 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == $resaction.='
'.$langs->trans('ErrorOnlyDraftStatusCanBeDeletedInMassAction',$objecttmp->ref).'

'; continue; } - + if ($objectclass == "Task" && $objecttmp->hasChildren() > 0) { $sql = "UPDATE ".MAIN_DB_PREFIX."projet_task SET fk_task_parent = 0 WHERE fk_task_parent = ".$objecttmp->id; $res = $db->query($sql); - + if (!$res) { setEventMessage('ErrorRecordParentingNotModified', 'errors'); $error++; } } - + if (in_array($objecttmp->element, array('societe', 'member'))) $result = $objecttmp->delete($objecttmp->id, $user, 1); else $result = $objecttmp->delete($user); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1182,7 +1182,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); @@ -1201,7 +1201,7 @@ if (! $error && ($massaction == 'delete' || ($action == 'delete' && $confirm == if (! $error && $massaction == 'generate_doc' && $permtoread) { $db->begin(); - + $objecttmp=new $objectclass($db); $nbok = 0; foreach($toselect as $toselectid) @@ -1211,7 +1211,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) { $outputlangs = $langs; $newlang=''; - + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','aZ09')) $newlang=GETPOST('lang_id','aZ09'); if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->thirdparty->default_lang)) $newlang=$objecttmp->thirdparty->default_lang; // for proposal, order, invoice, ... if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($objecttmp->default_lang)) $newlang=$objecttmp->default_lang; // for thirdparty @@ -1220,15 +1220,15 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) $outputlangs = new Translate("",$conf); $outputlangs->setDefaultLang($newlang); } - + // To be sure vars is defined if (empty($hidedetails)) $hidedetails=0; if (empty($hidedesc)) $hidedesc=0; if (empty($hideref)) $hideref=0; if (empty($moreparams)) $moreparams=null; - + $result= $objecttmp->generateDocument($objecttmp->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); - + if ($result <= 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); @@ -1244,7 +1244,7 @@ if (! $error && $massaction == 'generate_doc' && $permtoread) break; } } - + if (! $error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); From 08a181bfbf7ed1105aae0d30452eb413f56b7e78 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 11:00:17 +0100 Subject: [PATCH 07/20] Fix substitution of REF_CLIENT and REF_SUPPLIER --- htdocs/core/lib/functions.lib.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index fffe95cbb0c..7187a765de4 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -5858,8 +5858,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = '__ID__'; $substitutionarray['__REF__'] = '__REF__'; - $substitutionarray['__REFCLIENT__'] = '__REFCLIENT__'; - $substitutionarray['__REFSUPPLIER__'] = '__REFSUPPLIER__'; + $substitutionarray['__REF_CLIENT__'] = '__REF_CLIENT__'; + $substitutionarray['__REF_SUPPLIER__'] = '__REF_SUPPLIER__'; $substitutionarray['__EXTRAFIELD_XXX__'] = '__EXTRAFIELD_XXX__'; $substitutionarray['__THIRDPARTY_ID__'] = '__THIRDPARTY_ID__'; @@ -5905,6 +5905,9 @@ function getCommonSubstitutionArray($outputlangs, $onlykey=0, $exclude=null, $ob { $substitutionarray['__ID__'] = $object->id; $substitutionarray['__REF__'] = $object->ref; + $substitutionarray['__REF_CLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); + $substitutionarray['__REF_SUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); + // For backward compatibility $substitutionarray['__REFCLIENT__'] = (isset($object->ref_client) ? $object->ref_client : (isset($object->ref_customer) ? $object->ref_customer : null)); $substitutionarray['__REFSUPPLIER__'] = (isset($object->ref_supplier) ? $object->ref_supplier : null); From e5d6c551dd6e0c101d2eb7877f1fd8a6fe2b8260 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 29 Jan 2019 11:27:53 +0100 Subject: [PATCH 08/20] fix translation --- htdocs/expedition/card.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 4f08da56365..ebc3b2995fe 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -205,8 +205,7 @@ if (empty($reshook)) $date_delivery = dol_mktime(GETPOST('date_deliveryhour','int'), GETPOST('date_deliverymin','int'), 0, GETPOST('date_deliverymonth','int'), GETPOST('date_deliveryday','int'), GETPOST('date_deliveryyear','int')); - // On va boucler sur chaque ligne du document d'origine pour completer objet expedition - // avec info diverses + qte a livrer + // We will loop on each line of the original document to complete the shipping object with various info and quantity to deliver $classname = ucfirst($object->origin); $objectsrc = new $classname($db); $objectsrc->fetch($object->origin_id); @@ -839,13 +838,13 @@ if (empty($reshook)) } else { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited exit(); } } elseif ($action == 'updateline' && $user->rights->expedition->creer && GETPOST('cancel','alpha') == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To redisplay the form being edited exit(); } From 835d22254383b73a84622cd35c3b7b2bd20d6667 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 29 Jan 2019 14:10:08 +0100 Subject: [PATCH 09/20] ADD: list of stripe's payout --- htdocs/stripe/payout.php | 231 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 231 insertions(+) create mode 100644 htdocs/stripe/payout.php diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php new file mode 100644 index 00000000000..e80b818ece3 --- /dev/null +++ b/htdocs/stripe/payout.php @@ -0,0 +1,231 @@ + + * Copyright (C) 2018 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 + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +// Put here all includes required by your class file + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; +require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php'; +//require_once DOL_DOCUMENT_ROOT.'/core/lib/stripe.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingjournal.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('compta', 'salaries', 'bills', 'hrm', 'stripe')); + +// Security check +$socid = GETPOST("socid","int"); +if ($user->societe_id) $socid=$user->societe_id; +//$result = restrictedArea($user, 'salaries', '', '', ''); + +$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; +$rowid = GETPOST("rowid",'alpha'); +$sortfield = GETPOST("sortfield",'alpha'); +$sortorder = GETPOST("sortorder",'alpha'); +$page = GETPOST("page",'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $conf->liste_limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + + + +/* + * View + */ + +$form = new Form($db); +$societestatic = new Societe($db); +$memberstatic = new Adherent($db); +$acc = new Account($db); +$stripe = new Stripe($db); + +llxHeader('', $langs->trans("StripePayoutList")); + +if (! empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox','alpha'))) +{ + $service = 'StripeTest'; + $servicestatus = '0'; + dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning'); +} +else +{ + $service = 'StripeLive'; + $servicestatus = '1'; +} + +$stripeacc = $stripe->getStripeAccount($service); +/*if (empty($stripeaccount)) +{ + print $langs->trans('ErrorStripeAccountNotDefined'); +}*/ + +if (! $rowid) { + + print '
'; + if ($optioncss != '') + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + $title=$langs->trans("StripePayoutList"); + $title.=($stripeaccount?' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')':' (Stripe connection with keys from Stripe module setup)'); + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', '', $limit); + + print '
'; + print '' . "\n"; + + print ''; + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + //print_liste_field_titre("StripeCustomerId",$_SERVER["PHP_SELF"],"","","","",$sortfield,$sortorder); + //print_liste_field_titre("CustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + //print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("DateOperation", $_SERVER["PHP_SELF"], "", "", "", 'align="center"', $sortfield, $sortorder); + print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "", "", "", 'align="left"', $sortfield, $sortorder); + print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Fee", $_SERVER["PHP_SELF"], "", "", "", 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", 'align="right"'); + print "\n"; + + print "\n"; + + if ($stripeacc) + { + $payout = \Stripe\Payout::all(array("limit" => $limit), array("stripe_account" => $stripeacc)); + } + else + { + $payout = \Stripe\Payout::all(array("limit" => $limit)); + } + + foreach ($payout->data as $payout) + { + //$charge = $payout; + //var_dump($payout); + + // The metadata FULLTAG is defined by the online payment page + /*$FULLTAG=$charge->metadata->FULLTAG; + + // Save into $tmparray all metadata + $tmparray = dolExplodeIntoArray($FULLTAG,'.','='); + // Load origin object according to metadata + if (! empty($tmparray['CUS'])) + { + $societestatic->fetch($tmparray['CUS']); + } + else + { + $societestatic->id = 0; + } + if (! empty($tmparray['MEM'])) + { + $memberstatic->fetch($tmparray['MEM']); + } + else + { + $memberstatic->id = 0; + }*/ + + $societestatic->fetch($charge->metadata->idcustomer); + $societestatic->id = $charge->metadata->idcustomer; + $societestatic->lastname = $obj->lastname; + $societestatic->firstname = $obj->firstname; + $societestatic->admin = $obj->admin; + $societestatic->login = $obj->login; + $societestatic->email = $obj->email; + $societestatic->societe_id = $obj->fk_soc; + + print ''; + + // Ref + if (!empty($stripeacc)) $connect=$stripeacc.'/'; + + $url='https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id; + if ($servicestatus) { + $url='https://dashboard.stripe.com/'.$connect.'/payouts/'.$payout->id; + } + + print "\n"; + + + // Stripe customer + //print "\n"; + // Link + /*print "\n";*/ + // Origine + //print "\n"; + // Date payment + print '\n"; + // Date payment + print '\n"; + // Type + print ''; + // Amount + print ""; + print ""; + // Status + print "'; + print "\n"; + } + print "
".img_picto($langs->trans('ShowInStripe'), 'object_globe')." " . $payout->id . "".$charge->customer.""; + if ($societestatic->id > 0) + { + print $societestatic->getNomUrl(1); + } + if ($memberstatic->id > 0) + { + print $memberstatic->getNomUrl(1); + } + print ""; + ////if ($charge->metadata->dol_type=="order"){ + // $object = new Commande($db); + // $object->fetch($charge->metadata->dol_id); + // print "".img_picto('', 'object_order')." ".$object->ref.""; + //} elseif ($charge->metadata->dol_type=="invoice"){ + // $object = new Facture($db); + // $object->fetch($charge->metadata->dol_id); + // print "".img_picto('', 'object_invoice')." ".$object->ref.""; + //} + //print "' . dol_print_date($payout->created, '%d/%m/%Y %H:%M') . "' . dol_print_date($payout->arrival_date, '%d/%m/%Y %H:%M') . "' . $payout->description . '" . price(($payout->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . "" . price(($payout->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($payout->currency)) . ""; + if ($payout->status=='paid') + {print img_picto($langs->trans("".$payout->status.""),'statut4');} + elseif ($payout->status=='pending') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='in_transit') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='failed') + {print img_picto($langs->trans("".$payout->status.""),'statut7');} + elseif ($payout->status=='canceled') + {print img_picto($langs->trans("".$payout->status.""),'statut8');} + print '
"; + print '
'; + print '
'; +} + +// End of page +llxFooter(); +$db->close(); From a3b648824ab58bbdae1619f142c1308c4aee948f Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 29 Jan 2019 14:12:35 +0100 Subject: [PATCH 10/20] ADD payout link --- htdocs/core/modules/modStripe.class.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/core/modules/modStripe.class.php b/htdocs/core/modules/modStripe.class.php index 9a1584da477..039f4a68fca 100644 --- a/htdocs/core/modules/modStripe.class.php +++ b/htdocs/core/modules/modStripe.class.php @@ -150,6 +150,18 @@ class modStripe extends DolibarrModules 'target' => '', 'user' => 0 ); + $this->menu[$r] = array( + 'fk_menu' => 'fk_mainmenu=bank,fk_leftmenu=stripe', + 'type' => 'left', + 'titre' => 'StripePayoutList', + 'url' => '/stripe/payout.php', + 'langs' => 'stripe', + 'position' => 103, + 'enabled' => '$conf->stripe->enabled && $conf->banque->enabled && $conf->global->MAIN_FEATURES_LEVEL >= 1', + 'perms' => '$user->rights->banque->lire', + 'target' => '', + 'user' => 0 + ); // Exports $r=1; From 85b402ab5753d503d4b34ad36e3e6e54bf309f03 Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Tue, 29 Jan 2019 14:14:42 +0100 Subject: [PATCH 11/20] Update payout.php --- htdocs/stripe/payout.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/stripe/payout.php b/htdocs/stripe/payout.php index e80b818ece3..db2d2f4f7d7 100644 --- a/htdocs/stripe/payout.php +++ b/htdocs/stripe/payout.php @@ -1,6 +1,5 @@ - * Copyright (C) 2018 Frédéric France +/* Copyright (C) 2018-2019 Thibault FOUCART * * 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 From c6755b3cf1196c812f6095ef0dafa943f61eae47 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 15:59:41 +0100 Subject: [PATCH 12/20] Fix formatting of number in quantity field --- htdocs/core/tpl/objectline_view.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 313a4ee4def..603412daf15 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -209,7 +209,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; // for example always visible on invoice but must be visible only if stock module on and stock decrease option is on invoice validation and status is not validated // must also not be output for most entities (proposal, intervention, ...) //if($line->qty > $line->stock) print img_picto($langs->trans("StockTooLow"),"warning", 'style="vertical-align: bottom;"')." "; - echo $line->qty; + echo price($line->qty, 0, '', 0, 0); // Yes, it is a quantity, not a price, but we just want the formating role of function price } else echo ' '; ?> From f4ecf843eeb33ef84f139aab8b4ef885087ceec4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 18:30:12 +0100 Subject: [PATCH 13/20] FIX Exclude not required field from log --- htdocs/blockedlog/class/blockedlog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index 2b4198eb08e..0d24b71b343 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -385,7 +385,7 @@ class BlockedLog $this->object_data=new stdClass(); // Add fields to exclude $arrayoffieldstoexclude = array( - 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','civility_id','contact','contact_id', + 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','last_main_doc','civility_id','contact','contact_id', 'table_element_line','ismultientitymanaged','isextrafieldmanaged', 'linkedObjectsIds','linkedObjects','fk_delivery_address', 'context', From 9ef93bcecac1fea04d72cc9961457cb79abe5d11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 18:40:47 +0100 Subject: [PATCH 14/20] FIX last_main_doc var not saved --- htdocs/core/class/commonobject.class.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 649b9d317b7..1eed6c82a11 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -310,6 +310,12 @@ abstract class CommonObject */ public $modelpdf; + /** + * @var string + * Contains relative path of last generated main file + */ + public $last_main_doc; + /** * @var int Bank account ID * @see SetBankAccount() @@ -4667,10 +4673,15 @@ abstract class CommonObject if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; if ($update_main_doc_field && ! empty($this->table_element)) { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; $sql.= ' WHERE rowid = '.$this->id; + $resql = $this->db->query($sql); if (! $resql) dol_print_error($this->db); + else + { + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } } } } @@ -4900,7 +4911,7 @@ abstract class CommonObject //var_dump('key '.$key.' '.$value.' type='.$extrafields->attributes[$this->table_element]['type'][$key].' '.$this->array_options["options_".$key]); } } - + // If field is a computed field, value must become result of compute foreach ($tab as $key => $value) { if (! empty($extrafields) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) From 3215870ae6fdcc57baef86fe7b84adca707f92ce Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 18:30:12 +0100 Subject: [PATCH 15/20] FIX Exclude not required field from log --- htdocs/blockedlog/class/blockedlog.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index b64524569c6..b723d6d19f8 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -385,7 +385,7 @@ class BlockedLog $this->object_data=new stdClass(); // Add fields to exclude $arrayoffieldstoexclude = array( - 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','civility_id','contact','contact_id', + 'table_element','fields','ref_previous','ref_next','origin','origin_id','oldcopy','picto','error','errors','modelpdf','last_main_doc','civility_id','contact','contact_id', 'table_element_line','ismultientitymanaged','isextrafieldmanaged', 'linkedObjectsIds','linkedObjects','fk_delivery_address', 'context', From 3d218cadb77a4aaed3b18459293344afb15eed9c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 29 Jan 2019 18:40:47 +0100 Subject: [PATCH 16/20] FIX last_main_doc var not saved Conflicts: htdocs/core/class/commonobject.class.php --- htdocs/core/class/commonobject.class.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index bc414ed722c..09df72c6543 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -311,6 +311,12 @@ abstract class CommonObject */ public $modelpdf; + /** + * @var string + * Contains relative path of last generated main file + */ + public $last_main_doc; + /** * @var int Bank account ID * @see SetBankAccount() @@ -4611,10 +4617,15 @@ abstract class CommonObject if (! empty($obj->update_main_doc_field)) $update_main_doc_field=1; if ($update_main_doc_field && ! empty($this->table_element)) { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; $sql.= ' WHERE rowid = '.$this->id; + $resql = $this->db->query($sql); if (! $resql) dol_print_error($this->db); + else + { + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } } } } From 1b675ba0b61f0273458e8992e31fb6ac928d7ef4 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 30 Jan 2019 09:51:29 +0100 Subject: [PATCH 17/20] FIX: FEC Compatibility for import in ledger --- htdocs/core/modules/modAccounting.class.php | 35 ++++++++++++++++----- htdocs/langs/en_US/accountancy.lang | 4 ++- 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c47e8d310f1..c2f9459c49b 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -262,15 +262,34 @@ class modAccounting extends DolibarrModules $this->import_icon[$r]=$this->picto; $this->import_entities_array[$r]=array(); // We define here only fields that use another icon that the one defined into import_icon $this->import_tables_array[$r]=array('b'=>MAIN_DB_PREFIX.'accounting_bookkeeping'); // List of tables to insert into (insert done in same order) - $this->import_fields_array[$r]=array('b.doc_date'=>"Docdate",'b.code_journal'=>'Codejournal','b.numero_compte'=>'AccountAccountingShort','b.label_operation'=>'LabelOperation','b.debit'=>"Debit",'b.credit'=>"Credit",'b.date_creation'=>"DateCreation"); - $this->import_fieldshidden_array[$r]=array('b.fk_user'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) - $this->import_convertvalue_array[$r]=array( - 't.fk_projet'=>array('rule'=>'fetchidfromref','classfile'=>'/projet/class/project.class.php','class'=>'Project','method'=>'fetch','element'=>'Project'), - 't.ref'=>array('rule'=>'getrefifauto') - ); - //$this->import_convertvalue_array[$r]=array('s.fk_soc'=>array('rule'=>'lastrowid',table='t'); + $this->import_fields_array[$r]=array( + 'b.doc_date'=>"Docdate", + 'b.piece_num'=>"TransactionNumShort", + 'b.code_journal'=>'Codejournal', + 'b.journal_label'=>'JournalLabel', + 'b.numero_compte'=>'AccountAccounting', + 'b.label_compte'=>'LabelAccount', + 'b.subledger_account'=>'SubledgerAccount', + 'b.subledger_label'=>'SubledgerAccountLabel', + 'b.label_operation'=>'LabelOperation', + 'b.debit'=>"Debit", + 'b.credit'=>"Credit" + ); + $this->import_fieldshidden_array[$r]=array('b.fk_user_author'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); - //$this->import_examplevalues_array[$r]=array('t.fk_projet'=>'MyProjectRef','t.ref'=>"auto or TK2010-1234",'t.label'=>"My task",'t.progress'=>"0 (not started) to 100 (finished)",'t.datec'=>'1972-10-10','t.note_private'=>"My private note",'t.note_public'=>"My public note"); + $this->import_examplevalues_array[$r]=array( + 'b.doc_date'=>'2019-01-01', + 'b.piece_num'=>'1', + 'b.code_journal'=>"VTE", + 'b.journal_label'=>"Journal des ventes", + 'b.numero_compte'=>"707", + 'b.label_compte'=>'Ventes', + 'b.subledger_account'=>'', + 'b.subledger_label'=>'', + 'b.label_operation'=>"Ventes services", + 'b.debit'=>"0,00", + 'b.credit'=>"100,00" + ); // Chart of accounts $r++; diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 144caf49dde..a118151355c 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -84,7 +84,8 @@ ChangeAndLoad=Change and load Addanaccount=Add an accounting account AccountAccounting=Accounting account AccountAccountingShort=Account -SubledgerAccount=Subledger Account +SubledgerAccount=Subledger account +SubledgerAccountLabel=Subledger account label ShowAccountingAccount=Show accounting account ShowAccountingJournal=Show accounting journal AccountAccountingSuggest=Accounting account suggested @@ -166,6 +167,7 @@ LabelOperation=Label operation Sens=Sens LetteringCode=Lettering code Codejournal=Journal +JournalLabel=Journal label NumPiece=Piece number TransactionNumShort=Num. transaction AccountingCategory=Personalized groups From 84ecfd96fb74a72226161f5cba7336669c37ea00 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Wed, 30 Jan 2019 11:22:01 +0100 Subject: [PATCH 18/20] Update example --- htdocs/core/modules/modAccounting.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAccounting.class.php b/htdocs/core/modules/modAccounting.class.php index c2f9459c49b..1ebb4b0f2d3 100644 --- a/htdocs/core/modules/modAccounting.class.php +++ b/htdocs/core/modules/modAccounting.class.php @@ -278,7 +278,7 @@ class modAccounting extends DolibarrModules $this->import_fieldshidden_array[$r]=array('b.fk_user_author'=>'user->id'); // aliastable.field => ('user->id' or 'lastrowid-'.tableparent) $this->import_regex_array[$r]=array('b.doc_date'=>'^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$'); $this->import_examplevalues_array[$r]=array( - 'b.doc_date'=>'2019-01-01', + 'b.doc_date'=>'formatted as \'.dol_print_date(dol_now(),\'%Y-%m-%d\')', 'b.piece_num'=>'1', 'b.code_journal'=>"VTE", 'b.journal_label'=>"Journal des ventes", From f955f3f4eea6613eceb8c19395bb3397f0df68a4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 30 Jan 2019 12:23:34 +0100 Subject: [PATCH 19/20] Fix report error only if return code < 0 --- htdocs/core/tpl/card_presend.tpl.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 0d1fd84923c..8f68cf0748f 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -91,7 +91,7 @@ if ($action == 'presend') if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument')) { $result = $object->generateDocument(GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result <= 0) { + if ($result < 0) { dol_print_error($db, $object->error, $object->errors); exit(); } From 340412ed00996b21dc23a84f9e7963cca62cda2f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 30 Jan 2019 14:07:50 +0100 Subject: [PATCH 20/20] FIX generation of document for supplie rinvoice --- htdocs/admin/supplier_invoice.php | 2 ++ htdocs/core/tpl/card_presend.tpl.php | 22 ++++++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 45d588fb031..1e93448e659 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -43,6 +43,8 @@ accessforbidden(); $type=GETPOST('type', 'alpha'); $value=GETPOST('value', 'alpha'); $action=GETPOST('action', 'alpha'); + +$label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir','alpha'); $specimenthirdparty=new Societe($db); diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 8f68cf0748f..58758daab09 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -48,12 +48,15 @@ if ($action == 'presend') $ref = dol_sanitizeFileName($object->ref); include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; - $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); - // + // Special case if ($object->element == 'invoice_supplier') { $fileparams = dol_most_recent_file($diroutput . '/' . get_exdir($object->id,2,0,0,$object,$object->element).$ref, preg_quote($ref,'/').'([^\-])+'); } + else + { + $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + } $file = $fileparams['fullname']; } @@ -86,7 +89,10 @@ if ($action == 'presend') } // Build document if it not exists - if (! in_array($object->element, array('societe', 'user', 'member'))) + $forcebuilddoc=true; + if (in_array($object->element, array('societe', 'user', 'member'))) $forcebuilddoc=false; + if ($object->element == 'invoice_supplier' && empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) $forcebuilddoc=false; + if ($forcebuilddoc) // If there is no default value for supplier invoice, we do not generate file, even if modelpdf was set by a manual generation { if ((! $file || ! is_readable($file)) && method_exists($object, 'generateDocument')) { @@ -95,7 +101,15 @@ if ($action == 'presend') dol_print_error($db, $object->error, $object->errors); exit(); } - $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + if ($object->element == 'invoice_supplier') + { + $fileparams = dol_most_recent_file($diroutput . '/' . get_exdir($object->id,2,0,0,$object,$object->element).$ref, preg_quote($ref,'/').'([^\-])+'); + } + else + { + $fileparams = dol_most_recent_file($diroutput . '/' . $ref, preg_quote($ref, '/').'[^\-]+'); + } + $file = $fileparams['fullname']; } }