From 5aa27a126aa8cd795a3c67e7f82c9bb68ff4bffd Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 28 Aug 2019 13:45:02 +0200 Subject: [PATCH 1/9] Fix trigger create on widthdraw is missing --- .../prelevement/class/bonprelevement.class.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 7a5a190c465..5c2204dc216 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -775,12 +775,13 @@ class BonPrelevement extends CommonObject * @param string $mode real=do action, simu=test only * @param string $format FRST, RCUR or ALL * @param string $executiondate Date to execute the transfer + * @param int $notrigger Disable triggers * @return int <0 if KO, nbre of invoice withdrawed if OK */ - function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='') + function Create($banque=0, $agence=0, $mode='real', $format='ALL',$executiondate='', $notrigger = 0) { // phpcs:enable - global $conf,$langs; + global $conf, $langs, $user; dol_syslog(__METHOD__."::Bank=".$banque." Office=".$agence." mode=".$mode." format=".$format, LOG_DEBUG); @@ -1091,6 +1092,7 @@ class BonPrelevement extends CommonObject } $this->factures = $factures_prev_id; + $this->factures_prev = $factures_prev; // Generation of SEPA file $this->filename $this->generate($format,$executiondate); @@ -1114,6 +1116,14 @@ class BonPrelevement extends CommonObject dol_syslog(__METHOD__."::Error update total: ".$this->db->error(), LOG_ERR); } + if (! $error && ! $notrigger) + { + // Call trigger + $result=$this->call_trigger('BON_PRELEVEMENT_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } + if (!$error) { $this->db->commit(); From f7fe3d2842993a7232f722adeafe301711a207c7 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Wed, 4 Sep 2019 16:30:55 +0200 Subject: [PATCH 2/9] Fix set var in context attribute instead of object attribute --- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 5c2204dc216..a7a17c3f18a 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1092,7 +1092,7 @@ class BonPrelevement extends CommonObject } $this->factures = $factures_prev_id; - $this->factures_prev = $factures_prev; + $this->context['factures_prev'] = $factures_prev; // Generation of SEPA file $this->filename $this->generate($format,$executiondate); From 34be514326e1f5e8a358b0ca55460be77abd246b Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 29 Sep 2019 20:56:24 +0200 Subject: [PATCH 3/9] Custom receipt tab in TakePOS --- htdocs/langs/en_US/cashdesk.lang | 2 + htdocs/takepos/admin/receipt.php | 153 +++++++++++++++++++++++++++++++ htdocs/takepos/admin/setup.php | 48 ++-------- htdocs/takepos/receipt.php | 46 ++++++++-- 4 files changed, 199 insertions(+), 50 deletions(-) create mode 100644 htdocs/takepos/admin/receipt.php diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 33ea50dfb0f..0516de208fc 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -75,3 +75,5 @@ DirectPayment=Direct payment DirectPaymentButton=Direct cash payment button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill +CustomReceipt=Custom Receipt +ReceiptName=Receipt Name diff --git a/htdocs/takepos/admin/receipt.php b/htdocs/takepos/admin/receipt.php new file mode 100644 index 00000000000..92333394edc --- /dev/null +++ b/htdocs/takepos/admin/receipt.php @@ -0,0 +1,153 @@ + + * Copyright (C) 2011-2017 Juanjo Menent + * Copyright (C) 2019 Andreu Bisquerra Gaya + * + * 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 . + */ + +/** + * \file htdocs/takepos/admin/terminal.php + * \ingroup takepos + * \brief Setup page for TakePos module + */ + +require '../../main.inc.php'; // Load $user and permissions +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; +require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php"; + +// Security check +if (!$user->admin) accessforbidden(); + +$langs->loadLangs(array("admin", "cashdesk", "commercial")); + +/* + * Actions + */ + +if (GETPOST('action', 'alpha') == 'set') +{ + $db->begin(); + + $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_RECEIPT_NAME", GETPOST('TAKEPOS_RECEIPT_NAME', 'alpha'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_SHOW_CUSTOMER", GETPOST('TAKEPOS_SHOW_CUSTOMER', 'alpha'), 'chaine', 0, '', $conf->entity); + + dol_syslog("admin/cashdesk: level ".GETPOST('level', 'alpha')); + + if (! $res > 0) $error++; + + if (! $error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } + else + { + $db->rollback(); + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} + + +/* + * View + */ + +$form=new Form($db); +$formproduct=new FormProduct($db); + +llxHeader('', $langs->trans("CashDeskSetup")); + +$linkback=''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup'); +$head = takepos_prepare_head(); +dol_fiche_head($head, 'receipt', 'TakePOS', -1); +print '
'; + + +// Mode +print '
'; +print ''; +print ''; + +print ''; +print ''; +print ''; +print "\n"; + +$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); +$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); +$htmltext = ''.$langs->trans("AvailableVariables").':
'; +foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; +$htmltext.='
'; + +print '\n"; + +print '\n"; + +print ''; + +// Customer information +print '\n"; + +print '
'.$langs->trans("Parameters").''.$langs->trans("Value").'
'; +print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; +print '
'; +$variablename='TAKEPOS_HEADER'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); +} +print "
'; +print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; +print '
'; +$variablename='TAKEPOS_FOOTER'; +if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) +{ + print ''; +} +else +{ + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); +} +print "
'; +print ''; +print '
'; +print $langs->trans('ShowCustomer'); +print ''; +print $form->selectyesno("TAKEPOS_SHOW_CUSTOMER", $conf->global->TAKEPOS_SHOW_CUSTOMER, 1); +print "
'; + +print '
'; + +print '
'; + +print "
\n"; + +print '
'; + +llxFooter(); +$db->close(); diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 23e6eb05c48..5d7d2057ca1 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -75,11 +75,10 @@ if (GETPOST('action', 'alpha') == 'set') $res = dolibarr_set_const($db, "TAKEPOS_ORDER_NOTES", GETPOST('TAKEPOS_ORDER_NOTES', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_PHONE_BASIC_LAYOUT", GETPOST('TAKEPOS_PHONE_BASIC_LAYOUT', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_AUTO_PRINT_TICKETS", GETPOST('TAKEPOS_AUTO_PRINT_TICKETS', 'int'), 'int', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "TAKEPOS_HEADER", GETPOST('TAKEPOS_HEADER', 'alpha'), 'chaine', 0, '', $conf->entity); - $res = dolibarr_set_const($db, "TAKEPOS_FOOTER", GETPOST('TAKEPOS_FOOTER', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_NUMPAD", GETPOST('TAKEPOS_NUMPAD', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_NUM_TERMINALS", GETPOST('TAKEPOS_NUM_TERMINALS', 'alpha'), 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_DIRECT_PAYMENT", GETPOST('TAKEPOS_DIRECT_PAYMENT', 'int'), 'int', 0, '', $conf->entity); + $res = dolibarr_set_const($db, "TAKEPOS_CUSTOM_RECEIPT", GETPOST('TAKEPOS_CUSTOM_RECEIPT', 'int'), 'int', 0, '', $conf->entity); $res = dolibarr_set_const($db, "TAKEPOS_EMAIL_TEMPLATE_INVOICE", GETPOST('TAKEPOS_EMAIL_TEMPLATE_INVOICE', 'alpha'), 'chaine', 0, '', $conf->entity); if ($conf->global->TAKEPOS_ORDER_NOTES==1) @@ -232,6 +231,13 @@ print ''; print $form->selectyesno("TAKEPOS_DIRECT_PAYMENT", $conf->global->TAKEPOS_DIRECT_PAYMENT, 1); print "\n"; +// Custom Receipt +print ''; +print $langs->trans('CustomReceipt'); +print ''; +print $form->selectyesno("TAKEPOS_CUSTOM RECEIPT", $conf->global->TAKEPOS_CUSTOM_RECEIPT, 1); +print "\n"; + // Email template for send invoice print ''; print $langs->trans('EmailTemplate'); @@ -256,44 +262,6 @@ if (is_array($formmail->lines_model)) print $form->selectarray('TAKEPOS_EMAIL_TEMPLATE_INVOICE', $arrayofmessagename, $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE, 'None', 1, 0, '', 0, 0, 0, '', '', 1); print "\n"; -$substitutionarray=pdf_getSubstitutionArray($langs, null, null, 2); -$substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation"); -$htmltext = ''.$langs->trans("AvailableVariables").':
'; -foreach($substitutionarray as $key => $val) $htmltext.=$key.'
'; -$htmltext.='
'; - -print ''; -print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Header"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; -print ''; -$variablename='TAKEPOS_HEADER'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ - print ''; -} -else -{ - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); -} -print "\n"; - -print ''; -print $form->textwithpicto($langs->trans("FreeLegalTextOnInvoices")." - ".$langs->trans("Footer"), $htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'
'; -print ''; -$variablename='TAKEPOS_FOOTER'; -if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) -{ - print ''; -} -else -{ - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor=new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); -} -print "\n"; - print ''; print '
'; diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 5905592607c..90d5fb9059c 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -28,7 +28,7 @@ require '../main.inc.php'; // Load $user and permissions include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -$langs->loadLangs(array("main", "cashdesk")); +$langs->loadLangs(array("main", "cashdesk", "companies")); $place = (GETPOST('place', 'int') > 0 ? GETPOST('place', 'int') : 0); // $place is id of table for Ba or Restaurant @@ -54,6 +54,14 @@ if ($place > 0) $object=new Facture($db); $object->fetch($facid); +// Call to external receipt modules if exist +$hookmanager->initHooks(array('takeposfrontend'), $facid); +$reshook=$hookmanager->executeHooks('TakeposReceipt', $parameters, $object); +if (!empty($hookmanager->resPrint)) { + print $hookmanager->resPrint; + exit; +} + // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path. ?> @@ -77,19 +85,34 @@ $object->fetch($facid);

global->TAKEPOS_HEADER)) +if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) { - $newfreetext=make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray); - echo $newfreetext; + $substitutionarray=getCommonSubstitutionArray($langs); + if (! empty($conf->global->TAKEPOS_HEADER)) + { + $newfreetext=make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray); + echo $newfreetext; + } } ?>

trans('Date')." ".dol_print_date($object->date, 'day').'
'; -if ($mysoc->country_code == 'ES') print "Factura simplificada "; +if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) print $conf->global->TAKEPOS_RECEIPT_NAME." "; print $object->ref; +if ($conf->global->TAKEPOS_CUSTOM_RECEIPT && $conf->global->TAKEPOS_SHOW_CUSTOMER) +{ + $soc = new Societe($db); + $soc->fetch($invoice->socid); + if ($invoice->socid != $conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}) + { + $soc = new Societe($db); + if ($invoice->socid > 0) $soc->fetch($invoice->socid); + else $soc->fetch($conf->global->{'CASHDESK_ID_THIRDPARTY'.$_SESSION["takeposterminal"]}); + print "
".$langs->trans("Customer").': '.$soc->name; + } +} ?>


@@ -160,11 +183,14 @@ print $object->ref;

global->TAKEPOS_FOOTER)) +if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) { - $newfreetext=make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); - echo $newfreetext; + $substitutionarray=getCommonSubstitutionArray($langs); + if (! empty($conf->global->TAKEPOS_FOOTER)){ + $newfreetext=make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); + echo $newfreetext; + + } } ?> From 741447d990f67b20b3293d56111d53612f5623bf Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Sun, 29 Sep 2019 21:30:06 +0200 Subject: [PATCH 4/9] Fix Travis errors --- htdocs/takepos/receipt.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 90d5fb9059c..35e3bd7f836 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -60,7 +60,7 @@ $reshook=$hookmanager->executeHooks('TakeposReceipt', $parameters, $object); if (!empty($hookmanager->resPrint)) { print $hookmanager->resPrint; exit; -} +} // IMPORTANT: This file is sended to 'Takepos Printing' application. Keep basic file. No external files as css, js... If you need images use absolute path. ?> @@ -189,7 +189,6 @@ if ($conf->global->TAKEPOS_CUSTOM_RECEIPT) if (! empty($conf->global->TAKEPOS_FOOTER)){ $newfreetext=make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); echo $newfreetext; - } } ?> From 4a305ec95c7e13990d238d7b8d0e821edb4de3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2019 15:59:05 +0200 Subject: [PATCH 5/9] Add hook beforeAgenda in comm/action/index.php --- htdocs/comm/action/index.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a2328dd9ca4..403c563c30b 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -174,6 +174,26 @@ if ($action =='delete_action') /* * View */ +$parameters = array( + 'socid' => $socid, + 'status' => $status, + 'year' => $year, + 'month' => $month, + 'day' => $day, + 'type' => $type, + 'maxprint' => $maxprint, + 'filter' => $filter, + 'filtert' => $filtert, + 'showbirthday' => $showbirthday, + 'canedit' => $canedit, + 'optioncss' => $optioncss, + 'actioncode' => $actioncode, + 'pid' => $pid, + 'resourceid' => $resourceid, + 'usergroup' => $usergroup, +); +$reshook = $hookmanager->executeHooks('beforeAgenda', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); From ac4d72bb74b17307445e283014b33911ce68da36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2019 18:12:56 +0200 Subject: [PATCH 6/9] typo --- htdocs/main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ce8b1d6027e..a4e9560053b 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1463,7 +1463,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if ($conf->browser->layout == 'phone') $enablebrowsernotif=false; if ($enablebrowsernotif) { - print ''."\n"; + print ''."\n"; print ''."\n"; } } From 506b1e8ecc77a4f1175009d22c9f1d59c751880d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2019 18:17:29 +0200 Subject: [PATCH 7/9] typo --- test/phpunit/CoreTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/CoreTest.php b/test/phpunit/CoreTest.php index 4720df9014c..eb6e90dc41a 100644 --- a/test/phpunit/CoreTest.php +++ b/test/phpunit/CoreTest.php @@ -374,7 +374,7 @@ class CoreTest extends PHPUnit\Framework\TestCase $result=testSqlAndScriptInject($test, 0); $this->assertGreaterThanOrEqual($expectedresult, $result, 'Error on testSqlAndScriptInject eee'); - $test=""; // Is locked by some brwoser like chrome because the default directive no-referrer-when-downgrade is sent when requesting the SRC and then refused because of browser protection on img src load without referrer. + $test=""; // Is locked by some browser like chrome because the default directive no-referrer-when-downgrade is sent when requesting the SRC and then refused because of browser protection on img src load without referrer. $test=""; // Same $test=''; From a5fce6cca8879166f9af29eda8821d4e57dabf57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 30 Sep 2019 18:25:54 +0200 Subject: [PATCH 8/9] Update CMailFile.class.php --- htdocs/core/class/CMailFile.class.php | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b9f428d9f43..da5e1ebc1a3 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -136,12 +136,25 @@ class CMailFile { global $conf, $dolibarr_main_data_root; + $this->subject = $subject; + $this->addr_to = $to; + $this->addr_from = $from; + $this->msg = $msg; + $this->filename_list = $filename_list; + $this->mimetype_list = $mimetype_list; + $this->mimefilename_list = $mimefilename_list; + $this->addr_cc = $addr_cc; + $this->addr_bcc = $addr_bcc; + $this->deliveryreceipt = $deliveryreceipt; + if (empty($replyto)) $replyto = $from; + $this->reply_to = $replyto; + $this->errors_to = $errors_to; + $this->trackid = $trackid; $this->sendcontext = $sendcontext; $this->filename_list = $filename_list; $this->mimetype_list = $mimetype_list; $this->mimefilename_list = $mimefilename_list; - if (empty($replyto)) $replyto=$from; // Define this->sendmode $this->sendmode = ''; @@ -262,16 +275,6 @@ class CMailFile $files_encoded = ""; // Define smtp_headers - $this->subject = $subject; - $this->addr_from = $from; - $this->reply_to = $replyto; - $this->errors_to = $errors_to; - $this->addr_to = $to; - $this->addr_cc = $addr_cc; - $this->addr_bcc = $addr_bcc; - $this->deliveryreceipt = $deliveryreceipt; - $this->trackid = $trackid; - $smtp_headers = $this->write_smtpheaders(); if (! empty($moreinheader)) $smtp_headers.=$moreinheader; // $moreinheader contains the \r\n From cff8f582e78f6f5ea0fd608a867a6342503435f0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 30 Sep 2019 18:47:18 +0200 Subject: [PATCH 9/9] Update bonprelevement.class.php --- htdocs/compta/prelevement/class/bonprelevement.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 5014923e12b..7fca836a651 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1119,7 +1119,7 @@ class BonPrelevement extends CommonObject if (! $error && ! $notrigger) { // Call trigger - $result=$this->call_trigger('BON_PRELEVEMENT_CREATE', $user); + $result=$this->call_trigger('DIRECT_DEBIT_ORDER_CREATE', $user); if ($result < 0) $error++; // End call triggers }