From 4dce09cd27fab0fd41b109884929f7802f2db43d Mon Sep 17 00:00:00 2001 From: abb Date: Tue, 9 Feb 2016 14:36:57 +0100 Subject: [PATCH 01/16] include expense reports in linked objects section and provide template for them in this section Conflicts: htdocs/core/class/html.form.class.php --- htdocs/core/class/html.form.class.php | 7 +- htdocs/expensereport/tpl/index.html | 0 .../tpl/linkedobjectblock.tpl.php | 75 +++++++++++++++++++ htdocs/langs/en_US/expensereports.lang | 2 + htdocs/langs/eu_ES/expensereports.lang | 2 + htdocs/langs/fr_FR/expensereports.lang | 2 + 6 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 htdocs/expensereport/tpl/index.html create mode 100644 htdocs/expensereport/tpl/linkedobjectblock.tpl.php create mode 100644 htdocs/langs/en_US/expensereports.lang create mode 100644 htdocs/langs/eu_ES/expensereports.lang create mode 100644 htdocs/langs/fr_FR/expensereports.lang diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 2230aebdbb5..b815fa6031d 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5000,8 +5000,11 @@ class Form else if ($objecttype == 'order_supplier') { $tplpath = 'fourn/commande'; } - - global $linkedObjectBlock; + else if ($objecttype == 'expensereport') { + $tplpath = 'expensereport'; + } + + global $linkedObjectBlock; $linkedObjectBlock = $objects; // Output template part (modules that overwrite templates must declare this into descriptor) diff --git a/htdocs/expensereport/tpl/index.html b/htdocs/expensereport/tpl/index.html new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php new file mode 100644 index 00000000000..f2f26e625f7 --- /dev/null +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -0,0 +1,75 @@ + + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2014 Marcos García + * + * 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 . + * + */ +?> + + + +load("expensereports"); +echo '
'; +print_titre($langs->trans("RelatedExpenseReports")); +?> + + + + + + + + + $objectlink) +{ + $var=!$var; +?> + > + + + + + + + + + + + + + +
trans("Ref"); ?>trans("Date"); ?>trans("AmountHTShort"); ?>trans("Status"); ?>
getNomUrl(1); ?>date_debut,'day'); ?>rights->expensereport->lire) { + $total = $total + $objectlink->total_ht; + echo price($objectlink->total_ht); + } ?>getLibStatut(3); ?>">transnoentitiesnoconv("RemoveLink")); ?>
trans("TotalHT"); ?>rights->expensereport->lire) { + echo price($total); + } ?>
+ + \ No newline at end of file diff --git a/htdocs/langs/en_US/expensereports.lang b/htdocs/langs/en_US/expensereports.lang new file mode 100644 index 00000000000..b378b12060d --- /dev/null +++ b/htdocs/langs/en_US/expensereports.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - expensereports +RelatedExpenseReports=associated expense reports \ No newline at end of file diff --git a/htdocs/langs/eu_ES/expensereports.lang b/htdocs/langs/eu_ES/expensereports.lang new file mode 100644 index 00000000000..b378b12060d --- /dev/null +++ b/htdocs/langs/eu_ES/expensereports.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - expensereports +RelatedExpenseReports=associated expense reports \ No newline at end of file diff --git a/htdocs/langs/fr_FR/expensereports.lang b/htdocs/langs/fr_FR/expensereports.lang new file mode 100644 index 00000000000..e08723322e2 --- /dev/null +++ b/htdocs/langs/fr_FR/expensereports.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - expensereports +RelatedExpenseReports=Notes de frais associées \ No newline at end of file From 42eba7270d721b3d9357505c6a073a56fd9fbda4 Mon Sep 17 00:00:00 2001 From: abb Date: Thu, 3 Mar 2016 21:16:51 +0100 Subject: [PATCH 02/16] new:constant FICHINTER_WITHOUT_DURATION to handle interventions without duration in lines Conflicts: htdocs/fichinter/card.php --- htdocs/fichinter/card.php | 52 ++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 9ca25527b1c..71fec224137 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -5,8 +5,8 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2013 Florian Henry * Copyright (C) 2014-2015 Ferran Marcet - * Copyright (C) 2014-2015 Charlie Benke - * Copyright (C) 2015 Abbes Bahfir + * Copyright (C) 2014-2015 Charlie Benke + * Copyright (C) 2015-2016 Abbes Bahfir * * 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 @@ -478,12 +478,12 @@ if (empty($reshook)) $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'
'; $error++; } - if (!GETPOST('durationhour','int') && !GETPOST('durationmin','int')) + if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && !GETPOST('durationhour','int') && !GETPOST('durationmin','int')) { $mesg='
'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Duration")).'
'; $error++; } - if (GETPOST('durationhour','int') >= 24 && GETPOST('durationmin','int') > 0) + if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && GETPOST('durationhour','int') >= 24 && GETPOST('durationmin','int') > 0) { $mesg='
'.$langs->trans("ErrorValueTooHigh").'
'; $error++; @@ -494,7 +494,7 @@ if (empty($reshook)) $desc=GETPOST('np_desc'); $date_intervention = dol_mktime(GETPOST('dihour','int'), GETPOST('dimin','int'), 0, GETPOST('dimonth','int'), GETPOST('diday','int'), GETPOST('diyear','int')); - $duration = convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int')); + $duration = empty($conf->global->FICHINTER_WITHOUT_DURATION)?0:convertTime2Seconds(GETPOST('durationhour','int'), GETPOST('durationmin','int')); // Extrafields @@ -1457,7 +1457,7 @@ else if ($id > 0 || ! empty($ref)) print ''; print ''.$langs->trans('Description').''; print ''.$langs->trans('Date').''; - print ''.$langs->trans('Duration').''; + print ''.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').''; print ' '; print "\n"; } @@ -1479,7 +1479,7 @@ else if ($id > 0 || ! empty($ref)) print ''.dol_print_date($db->jdate($objp->date_intervention),'dayhour').''; // Duration - print ''.convertSecondToTime($objp->duree).''; + print ''.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?convertSecondToTime($objp->duree):'').''; print "\n"; @@ -1551,15 +1551,18 @@ else if ($id > 0 || ! empty($ref)) print ''; $form->select_date($db->jdate($objp->date_intervention),'di',1,1,0,"date_intervention"); print ''; + + // Duration + print ''; + if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { + $selectmode = 'select'; + if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) + $selectmode = 'text'; + $form->select_duration('duration', $objp->duree, $selectmode); + } + print ''; - // Duration - print ''; - $selectmode='select'; - if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text'; - $form->select_duration('duration',$objp->duree,0, $selectmode); - print ''; - - print ''; + print ''; print '
'; print '' . "\n"; @@ -1590,7 +1593,7 @@ else if ($id > 0 || ! empty($ref)) print ''; // ancre print $langs->trans('Description').''; print ''.$langs->trans('Date').''; - print ''.$langs->trans('Duration').''; + print ''.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').''; print ' '; print "\n"; @@ -1616,14 +1619,17 @@ else if ($id > 0 || ! empty($ref)) $form->select_date($timewithnohour,'di',1,1,0,"addinter"); print ''; - // Duration - print ''; - $selectmode='select'; - if (! empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) $selectmode='text'; - $form->select_duration('duration', (!GETPOST('durationhour','int') && !GETPOST('durationmin','int'))?3600:(60*60*GETPOST('durationhour','int')+60*GETPOST('durationmin','int')), 0, $selectmode); - print ''; + // Duration + print ''; + if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { + $selectmode = 'select'; + if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) + $selectmode = 'text'; + $form->select_duration('duration', (!GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) ? 3600 : (60 * 60 * GETPOST('durationhour', 'int') + 60 * GETPOST('durationmin', 'int')), 0, $selectmode); + } + print ''; - print ''; + print ''; print ''; //Line extrafield From d35f728fad377c80bf54c5d6715e15a8886ca22a Mon Sep 17 00:00:00 2001 From: abb Date: Fri, 11 Mar 2016 21:07:38 +0100 Subject: [PATCH 03/16] added handle to trigger FICHINTER_ADD_CONTACT in notify module --- htdocs/admin/notification.php | 3 +++ htdocs/core/class/notify.class.php | 15 ++++++++++++++- ...face_50_modNotification_Notification.class.php | 1 + htdocs/langs/en_US/other.lang | 2 ++ htdocs/langs/fr_FR/other.lang | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index a7699db4292..e8ac153bea7 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2015 Bahfir Abbes * * 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 @@ -169,6 +170,7 @@ if ($conf->societe->enabled) elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal'); elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill'); elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order'); + elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention'); print ''; print ''.$elementLabel.''; @@ -213,6 +215,7 @@ foreach($listofnotifiedevents as $notifiedevent) elseif ($notifiedevent['elementtype'] == 'propal') $elementLabel = $langs->trans('Proposal'); elseif ($notifiedevent['elementtype'] == 'facture') $elementLabel = $langs->trans('Bill'); elseif ($notifiedevent['elementtype'] == 'commande') $elementLabel = $langs->trans('Order'); + elseif ($notifiedevent['elementtype'] == 'ficheinter') $elementLabel = $langs->trans('Intervention'); print ''; print ''.$elementLabel.''; diff --git a/htdocs/core/class/notify.class.php b/htdocs/core/class/notify.class.php index 98a06174595..61446dca4b7 100644 --- a/htdocs/core/class/notify.class.php +++ b/htdocs/core/class/notify.class.php @@ -238,6 +238,7 @@ class Notify 'ORDER_VALIDATE', 'PROPAL_VALIDATE', 'FICHINTER_VALIDATE', + 'FICHINTER_ADD_CONTACT', 'ORDER_SUPPLIER_VALIDATE', 'ORDER_SUPPLIER_APPROVE', 'ORDER_SUPPLIER_REFUSE', @@ -315,6 +316,12 @@ class Notify $object_type = 'propal'; $mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref); break; + case 'FICHINTER_ADD_CONTACT': + $link='/fichinter/card.php?id='.$object->id; + $dir_output = $conf->facture->dir_output; + $object_type = 'ficheinter'; + $mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$object->ref); + break; case 'FICHINTER_VALIDATE': $link='/fichinter/card.php?id='.$object->id; $dir_output = $conf->facture->dir_output; @@ -427,7 +434,7 @@ class Notify if ($val == '' || ! preg_match('/^NOTIFICATION_FIXEDEMAIL_'.$notifcode.'_THRESHOLD_HIGHER_(.*)$/', $key, $reg)) continue; $threshold = (float) $reg[1]; - if ($object->total_ht <= $threshold) + if (!empty($object->total_ht) && $object->total_ht <= $threshold) { dol_syslog("A notification is requested for notifcode = ".$notifcode." but amount = ".$object->total_ht." so lower than threshold = ".$threshold.". We discard this notification"); continue; @@ -468,6 +475,12 @@ class Notify $object_type = 'propal'; $mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$newref); break; + case 'FICHINTER_ADD_CONTACT': + $link='/fichinter/card.php?id='.$object->id; + $dir_output = $conf->facture->dir_output; + $object_type = 'ficheinter'; + $mesg = $langs->transnoentitiesnoconv("EMailTextInterventionAddedContact",$newref); + break; case 'FICHINTER_VALIDATE': $link='/fichinter/card.php?id='.$object->id; $dir_output = $conf->facture->dir_output; diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index 70719006c5c..3206948e118 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -41,6 +41,7 @@ class InterfaceNotification extends DolibarrTriggers 'ORDER_VALIDATE', 'PROPAL_VALIDATE', 'FICHINTER_VALIDATE', + 'FICHINTER_ADD_CONTACT', 'ORDER_SUPPLIER_VALIDATE', 'ORDER_SUPPLIER_APPROVE', 'ORDER_SUPPLIER_REFUSE', diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index eb9628aa4c0..3000eecf33b 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -8,6 +8,7 @@ BirthdayDate=Birthday DateToBirth=Date of birth BirthdayAlertOn= birthday alert active BirthdayAlertOff= birthday alert inactive +Notify_FICHINTER_ADD_CONTACT=Added contact to Intervention Notify_FICHINTER_VALIDATE=Intervention validated Notify_FICHINTER_SENTBYMAIL=Intervention sent by mail Notify_ORDER_VALIDATE=Customer order validated @@ -164,6 +165,7 @@ NumberOfUnitsCustomerOrders=Number of units on customer orders on last 12 month NumberOfUnitsCustomerInvoices=Number of units on customer invoices on last 12 month NumberOfUnitsSupplierOrders=Number of units on supplier orders on last 12 month NumberOfUnitsSupplierInvoices=Number of units on supplier invoices on last 12 month +EMailTextInterventionAddedContact=A newintervention %s has been assigned to you. EMailTextInterventionValidated=The intervention %s has been validated. EMailTextInvoiceValidated=The invoice %s has been validated. EMailTextProposalValidated=The proposal %s has been validated. diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 2868420bc94..f2af45a7bb7 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -8,6 +8,7 @@ BirthdayDate=Date anniversaire DateToBirth=Date de naissance BirthdayAlertOn= alerte anniversaire active BirthdayAlertOff= alerte anniversaire inactive +Notify_FICHINTER_ADD_CONTACT=Ajout contact à Intervention Notify_FICHINTER_VALIDATE=Validation fiche intervention Notify_FICHINTER_SENTBYMAIL=Envoi fiche d'intervention par email Notify_ORDER_VALIDATE=Validation commande client @@ -164,6 +165,7 @@ NumberOfUnitsCustomerOrders=Nombre d'unités sur les commandes clients des 12 de NumberOfUnitsCustomerInvoices=Nombre d'unités sur les factures clients des 12 derniers mois NumberOfUnitsSupplierOrders=Nombre d'unités sur les commandes fournisseur des 12 derniers mois NumberOfUnitsSupplierInvoices=Nombre d'unités sur les factures fournisseurs des 12 derniers mois +EMailTextInterventionAddedContact=Une nouvelle intervention %s vous a été assignée. EMailTextInterventionValidated=La fiche intervention %s vous concernant a été validée. EMailTextInvoiceValidated=La facture %s vous concernant a été validée. EMailTextProposalValidated=La proposition commerciale %s vous concernant a été validée. From 437470c3d98611e75425e1f771b597c10aa05acf Mon Sep 17 00:00:00 2001 From: fappels Date: Mon, 14 Mar 2016 17:27:12 +0100 Subject: [PATCH 04/16] subprice should be unit price without tax --- htdocs/commande/class/commande.class.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 9eb31ebd608..2100f0695a7 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -2548,7 +2548,14 @@ class Commande extends CommonOrder // Anciens indicateurs: $price, $subprice, $remise (a ne plus utiliser) $price = $pu; - $subprice = $pu; + if ($price_base_type == 'TTC') + { + $subprice = $tabprice[5]; + } + else + { + $subprice = $pu; + } $remise = 0; if ($remise_percent > 0) { From c380faacce8efcbde1753dcc0c9d4eb528eae2ef Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 15 Mar 2016 08:58:53 +0100 Subject: [PATCH 05/16] Accountancy --- htdocs/accountancy/admin/export.php | 8 +- htdocs/accountancy/bookkeeping/list.php | 23 +- .../class/accountancyexport.class.php | 270 ++++++++++++++++++ .../accountancy/class/bookkeeping.class.php | 6 +- htdocs/accountancy/journal/sellsjournal.php | 1 + htdocs/accountancy/supplier/list.php | 4 +- 6 files changed, 297 insertions(+), 15 deletions(-) create mode 100644 htdocs/accountancy/class/accountancyexport.class.php diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 0b43e99b1d8..1a32c22e12f 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -30,6 +30,7 @@ require '../../main.inc.php'; // Class require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php'; $langs->load("compta"); $langs->load("bills"); @@ -195,12 +196,7 @@ if (! $conf->use_javascript_ajax) { print ""; } else { print ''; - $listmodelcsv = array ( - '1' => $langs->trans("Modelcsv_normal"), - '2' => $langs->trans("Modelcsv_CEGID"), - '3' => $langs->trans("Modelcsv_COALA"), - '4' => $langs->trans("Modelcsv_bob50") - ); + $listmodelcsv = AccountancyExport::getType(); print $form->selectarray("modelcsv", $listmodelcsv, $conf->global->ACCOUNTING_EXPORT_MODELCSV, 0); print ''; diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 515736580f8..b507c4dfffa 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -218,16 +218,31 @@ if ($action == 'delbookkeeping') { exit(); } } elseif ($action == 'export_csv') { - $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; - $journal = 'bookkepping'; - include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; + include DOL_DOCUMENT_ROOT . '/accountancy/class/accountancyexport.class.php'; $result = $object->fetchAll($sortorder, $sortfield, 0, 0, $filter); - if ($result < 0) { + if ($result < 0) + { setEventMessages($object->error, $object->errors, 'errors'); } + else + { + if (in_array($conf->global->ACCOUNTING_EXPORT_MODELCSV, array(5,6))) // TODO remove the conditional and keep the code in the "else" + { + $accountancyexport = new AccountancyExport($db); + $accountancyexport->export($object->lines); + if (!empty($accountancyexport->errors)) setEventMessages('', $accountancyexport->errors, 'errors'); + else exit; + } + } + + // TODO remove next 3 lines and foreach to implement the AccountancyExport method for each model + $sep = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $journal = 'bookkepping'; + include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; + foreach ( $object->lines as $line ) { if ($conf->global->ACCOUNTING_EXPORT_MODELCSV == 2) { diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php new file mode 100644 index 00000000000..acf490ae787 --- /dev/null +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -0,0 +1,270 @@ + + * Copyright (C) 2014 Juanjo Menent + * Copyright (C) 2015 Florian Henry + * Copyright (C) 2015 Raphaël Doursenaud + * Copyright (C) 2016 Pierre-Henry Favre + * + * 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/accountancy/class/accountancyexport.class.php + */ + +/** + * Class AccountancyExport + * + * Manage the different format accountancy export + */ +require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; + +class AccountancyExport +{ + /** + * @var Type of export + */ + public static $EXPORT_TYPE_NORMAL = 1; + public static $EXPORT_TYPE_CEGID = 2; + public static $EXPORT_TYPE_COALA = 3; + public static $EXPORT_TYPE_BOB50 = 4; + public static $EXPORT_TYPE_CIEL = 5; + public static $EXPORT_TYPE_QUADRATUS = 6; + + /** + * @var string[] Error codes (or messages) + */ + public $errors = array(); + + /** + * @var string Separator + */ + public $separator = ''; + + /** + * @var string End of line + */ + public $end_line = ''; + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct(DoliDB &$db) + { + global $conf; + + $this->db = &$db; + $this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV; + $this->end_line = "\n"; + return 1; + } + + /** + * Get all export type are available + * + * @return array of type + */ + public static function getType() + { + global $langs; + + return array ( + self::$EXPORT_TYPE_NORMAL => $langs->trans('Modelcsv_normal'), + self::$EXPORT_TYPE_CEGID => $langs->trans('Modelcsv_CEGID'), + self::$EXPORT_TYPE_COALA => $langs->trans('Modelcsv_COALA'), + self::$EXPORT_TYPE_BOB50 => $langs->trans('Modelcsv_bob50'), + self::$EXPORT_TYPE_CIEL => $langs->trans('Modelcsv_ciel'), + self::$EXPORT_TYPE_QUADRATUS => $langs->trans('Modelcsv_quadratus') + ); + } + + /** + * Download the export + * + * @return void + */ + public static function downloadFile() + { + global $conf; + $journal = 'bookkepping'; + include DOL_DOCUMENT_ROOT . '/accountancy/tpl/export_journal.tpl.php'; + } + + /** + * Function who chose which export to use with the default config + * + * @return void + */ + public function export(&$TData) + { + global $conf, $langs; + + switch ($conf->global->ACCOUNTING_EXPORT_MODELCSV) { + case self::$EXPORT_TYPE_NORMAL: + $this->exportNormal($TData); + break; + case self::$EXPORT_TYPE_CEGID: + $this->exportCegid($TData); + break; + case self::$EXPORT_TYPE_COALA: + $this->exportCoala($TData); + break; + case self::$EXPORT_TYPE_BOB50: + $this->exportBob50($TData); + break; + case self::$EXPORT_TYPE_CIEL: + $this->exportCiel($TData); + break; + case self::$EXPORT_TYPE_QUADRATUS: + $this->exportQuadratus($TData); + break; + default: + $this->errors[] = $langs->trans('accountancy_error_modelnotfound'); + break; + } + + if (empty($this->errors)) self::downloadFile(); + } + + /** + * Export format : Normal + * + * @return void + */ + public function exportNormal(&$TData) + { + + } + + /** + * Export format : CEGID + * + * @return void + */ + public function exportCegid(&$TData) + { + + } + + /** + * Export format : COALA + * + * @return void + */ + public function exportCoala(&$TData) + { + + } + + /** + * Export format : BOB50 + * + * @return void + */ + public function exportBob50(&$TData) + { + + } + + /** + * Export format : CIEL + * + * @return void + */ + public function exportCiel(&$TData) + { + global $conf; + + $i=1; + $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be yyyymmdd + foreach ($TData as $data) + { + $code_compta = $data->numero_compte; + if (!empty($data->code_tiers)) $code_compta = $data->code_tiers; + + $Tab = array(); + $Tab['num_ecriture'] = str_pad($i, 5); + $Tab['code_journal'] = str_pad($data->code_journal, 2); + $Tab['date_ecriture'] = $date_ecriture; + $Tab['date_ope'] = dol_print_date($data->doc_date, $conf->global->ACCOUNTING_EXPORT_DATE); + $Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 12), 12); + $Tab['num_compte'] = str_pad(self::trunc($code_compta, 11), 11); + $Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref.$data->label_compte, 25), 25); + $Tab['montant'] = str_pad(abs($data->montant), 13, ' ', STR_PAD_LEFT); + $Tab['type_montant'] = str_pad($data->sens, 1); + $Tab['vide'] = str_repeat(' ', 18); + $Tab['intitule_compte'] = str_pad(self::trunc($data->label_compte, 34), 34); + $Tab['end'] = 'O2003'; + + $Tab['end_line'] = $this->end_line; + + print implode($Tab); + $i++; + } + } + + /** + * Export format : Quadratus + * + * @return void + */ + public function exportQuadratus(&$TData) + { + global $conf; + + $date_ecriture = dol_print_date(time(), $conf->global->ACCOUNTING_EXPORT_DATE); // format must be ddmmyy + foreach ($TData as $data) + { + $code_compta = $data->numero_compte; + if (!empty($data->code_tiers)) $code_compta = $data->code_tiers; + + $Tab = array(); + $Tab['type_ligne'] = 'M'; + $Tab['num_compte'] = str_pad(self::trunc($code_compta, 8), 8); + $Tab['code_journal'] = str_pad(self::trunc($data->code_journal, 2), 2); + $Tab['folio'] = '000'; + $Tab['date_ecriture'] = $date_ecriture; + $Tab['filler'] = ' '; + $Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref.' '.$data->label_compte, 20), 20); + $Tab['sens'] = $data->sens; // C or D + $Tab['signe_montant'] = '+'; + $Tab['montant'] = str_pad(abs($data->montant)*100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount + $Tab['contrepartie'] = str_repeat(' ', 8); + if (!empty($data->date_echeance)) $Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); + else $Tab['date_echeance'] = '000000'; + $Tab['lettrage'] = str_repeat(' ', 5); + $Tab['num_piece'] = str_pad(self::trunc($data->piece_num, 5), 5); + $Tab['filler2'] = str_repeat(' ', 20); + $Tab['num_piece2'] = str_pad(self::trunc($data->piece_num, 8), 8); + $Tab['devis'] = str_pad($conf->currency, 3); + $Tab['code_journal2'] = str_pad(self::trunc($data->code_journal, 3), 3); + $Tab['filler3'] = str_repeat(' ', 3); + $Tab['libelle_ecriture2'] = str_pad(self::trunc($data->doc_ref.' '.$data->label_compte, 32), 32); + $Tab['num_piece3'] = str_pad(self::trunc($data->piece_num, 10), 10); + $Tab['filler4'] = str_repeat(' ', 73); + + $Tab['end_line'] = $this->end_line; + + print implode($Tab); + } + } + + public static function trunc($str, $size) + { + return dol_trunc($str, $size, 'right', 'UTF-8', 1); + } + +} diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index f4b478b681e..4a0ebbe8988 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -170,7 +170,7 @@ class BookKeeping extends CommonObject $this->piece_num = 0; // first check if line not yet in bookkeeping - $sql = "SELECT count(*)"; + $sql = "SELECT count(*) as nb"; $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; $sql .= " WHERE doc_type = '" . $this->doc_type . "'"; $sql .= " AND fk_docdet = " . $this->fk_docdet; @@ -180,8 +180,8 @@ class BookKeeping extends CommonObject $resql = $this->db->query($sql); if ($resql) { - $row = $this->db->fetch_array($resql); - if ($row[0] == 0) { + $row = $this->db->fetch_object($resql); + if ($row->nb == 0) { // Determine piece_num $sqlnum = "SELECT piece_num"; diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 8ffb4690dba..670875ec52b 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT . '/accountancy/class/bookkeeping.class.php'; require_once DOL_DOCUMENT_ROOT . '/accountancy/class/accountingaccount.class.php'; // Langs +$langs->load("commercial"); $langs->load("compta"); $langs->load("bills"); $langs->load("other"); diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index f1b82c9be21..8685cb7d5d4 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -254,11 +254,11 @@ if ($result) { print ''; print ''; - print ''; + print '%'; print ''; print ''; print ''; - print '%'; + print '%'; print ' '; print ' '; print ''; From 6fd218c9aab7cca42496f1b63ee162c327f18bd6 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 15 Mar 2016 09:01:02 +0100 Subject: [PATCH 06/16] accoutancy --- .../class/accountancyexport.class.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index acf490ae787..27398465859 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -106,7 +106,7 @@ class AccountancyExport /** * Function who chose which export to use with the default config * - * @return void + * @param unknown $TData */ public function export(&$TData) { @@ -142,6 +142,8 @@ class AccountancyExport /** * Export format : Normal * + * @param unknown $TData + * * @return void */ public function exportNormal(&$TData) @@ -152,6 +154,8 @@ class AccountancyExport /** * Export format : CEGID * + * @param unknown $TData + * * @return void */ public function exportCegid(&$TData) @@ -162,6 +166,8 @@ class AccountancyExport /** * Export format : COALA * + * @param unknown $TData + * * @return void */ public function exportCoala(&$TData) @@ -172,6 +178,8 @@ class AccountancyExport /** * Export format : BOB50 * + * @param unknown $TData + * * @return void */ public function exportBob50(&$TData) @@ -182,6 +190,8 @@ class AccountancyExport /** * Export format : CIEL * + * @param unknown $TData + * * @return void */ public function exportCiel(&$TData) @@ -219,6 +229,8 @@ class AccountancyExport /** * Export format : Quadratus * + * @param unknown $TData + * * @return void */ public function exportQuadratus(&$TData) @@ -262,6 +274,11 @@ class AccountancyExport } } + /** + * + * @param unknown $str + * @param unknown $size + */ public static function trunc($str, $size) { return dol_trunc($str, $size, 'right', 'UTF-8', 1); From 72b9b9876f9e8d1c8e0e5a79d3f8a70e56129e69 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Tue, 15 Mar 2016 10:15:45 +0100 Subject: [PATCH 07/16] travis --- .../class/accountancyexport.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 27398465859..8b03b552073 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -106,7 +106,7 @@ class AccountancyExport /** * Function who chose which export to use with the default config * - * @param unknown $TData + * @param unknown $TData data */ public function export(&$TData) { @@ -142,7 +142,7 @@ class AccountancyExport /** * Export format : Normal * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -154,7 +154,7 @@ class AccountancyExport /** * Export format : CEGID * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -166,7 +166,7 @@ class AccountancyExport /** * Export format : COALA * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -178,7 +178,7 @@ class AccountancyExport /** * Export format : BOB50 * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -190,7 +190,7 @@ class AccountancyExport /** * Export format : CIEL * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -229,7 +229,7 @@ class AccountancyExport /** * Export format : Quadratus * - * @param unknown $TData + * @param unknown $TData data * * @return void */ @@ -276,8 +276,8 @@ class AccountancyExport /** * - * @param unknown $str - * @param unknown $size + * @param unknown $str data + * @param unknown $size data */ public static function trunc($str, $size) { From 0f652516154a9e86330593b972afe4ec7eb01e83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 15 Mar 2016 19:38:01 +0100 Subject: [PATCH 08/16] Missing class fielddeliverydelay --- htdocs/comm/propal.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 40a654fef0b..c500c29d159 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1394,7 +1394,7 @@ if ($action == 'create') print ''; // Delivery delay - print '' . $langs->trans('AvailabilityPeriod') . ''; + print '' . $langs->trans('AvailabilityPeriod') . ''; $form->selectAvailabilityDelay('', 'availability_id', '', 1); print ''; @@ -1869,7 +1869,7 @@ if ($action == 'create') print ''; // Delivery delay - print ''; + print ''; print ''; + // STARTTLS + $var=!$var; + print ''; + // Separator $var=!$var; print ''; @@ -579,6 +607,20 @@ else else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; + // STARTTLS + $var=!$var; + print ''; + // Separator $var=!$var; print ''; From 969893a5b1adf8ccb47f32a8966ccc1a18cf6432 Mon Sep 17 00:00:00 2001 From: jtisseau Date: Wed, 16 Mar 2016 02:23:06 +0100 Subject: [PATCH 11/16] Adds multilanguage translations for MAIN_MAIL_EMAIL_STARTTLS Adds the translations for all languages having the MAIN_MAIL_EMAIL_TLS const defined. It's just a copy of this last one changing the "(SSL)" by "(STARTTLS)". --- htdocs/langs/bg_BG/admin.lang | 1 + htdocs/langs/bn_BD/admin.lang | 1 + htdocs/langs/bs_BA/admin.lang | 1 + htdocs/langs/ca_ES/admin.lang | 1 + htdocs/langs/cs_CZ/admin.lang | 1 + htdocs/langs/da_DK/admin.lang | 1 + htdocs/langs/de_DE/admin.lang | 1 + htdocs/langs/el_GR/admin.lang | 1 + htdocs/langs/en_US/admin.lang | 1 + htdocs/langs/es_ES/admin.lang | 1 + htdocs/langs/et_EE/admin.lang | 1 + htdocs/langs/eu_ES/admin.lang | 1 + htdocs/langs/fa_IR/admin.lang | 1 + htdocs/langs/fi_FI/admin.lang | 1 + htdocs/langs/fr_FR/admin.lang | 1 + htdocs/langs/he_IL/admin.lang | 1 + htdocs/langs/hr_HR/admin.lang | 1 + htdocs/langs/hu_HU/admin.lang | 1 + htdocs/langs/id_ID/admin.lang | 1 + htdocs/langs/is_IS/admin.lang | 1 + htdocs/langs/it_IT/admin.lang | 1 + htdocs/langs/ka_GE/admin.lang | 1 + htdocs/langs/kn_IN/admin.lang | 1 + htdocs/langs/ko_KR/admin.lang | 1 + htdocs/langs/lo_LA/admin.lang | 1 + htdocs/langs/lt_LT/admin.lang | 1 + htdocs/langs/lv_LV/admin.lang | 1 + htdocs/langs/mk_MK/admin.lang | 1 + htdocs/langs/nb_NO/admin.lang | 1 + htdocs/langs/nl_NL/admin.lang | 1 + htdocs/langs/pl_PL/admin.lang | 1 + htdocs/langs/pt_BR/admin.lang | 1 + htdocs/langs/pt_PT/admin.lang | 1 + htdocs/langs/ro_RO/admin.lang | 1 + htdocs/langs/ru_RU/admin.lang | 1 + htdocs/langs/sk_SK/admin.lang | 1 + htdocs/langs/sl_SI/admin.lang | 1 + htdocs/langs/sq_AL/admin.lang | 1 + htdocs/langs/sr_RS/admin.lang | 1 + htdocs/langs/sv_SE/admin.lang | 1 + htdocs/langs/sw_SW/admin.lang | 1 + htdocs/langs/th_TH/admin.lang | 1 + htdocs/langs/tr_TR/admin.lang | 1 + htdocs/langs/uk_UA/admin.lang | 1 + htdocs/langs/uz_UZ/admin.lang | 1 + htdocs/langs/vi_VN/admin.lang | 1 + htdocs/langs/zh_CN/admin.lang | 1 + 47 files changed, 47 insertions(+) diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 9b1d7e2ab12..578eadd41c4 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Метод за изпращане на имейли MAIN_MAIL_SMTPS_ID=SMTP ID, ако разпознаване, изискван MAIN_MAIL_SMTPS_PW=SMTP парола, ако разпознаване, изискван MAIN_MAIL_EMAIL_TLS= Използване на TLS (SSL) криптиране +MAIN_MAIL_EMAIL_STARTTLS= Използване на TLS (STARTTLS) криптиране MAIN_DISABLE_ALL_SMS=Изключване на всички SMS sendings (за тестови цели или демонстрации) MAIN_SMS_SENDMODE=Метод за изпращане на SMS MAIN_MAIL_SMS_FROM=Номер по подразбиране на телефона за изпращане на SMS diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 4baec526e4b..d185c7d6668 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 3dc8b373900..d4a67dfcc37 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Mètode d'enviament d'e-mails MAIN_MAIL_SMTPS_ID=ID d'autenticació SMTP si es requereix autenticació SMTP MAIN_MAIL_SMTPS_PW=Contrasenya autentificació SMTP si es requereix autenticació SMTP MAIN_MAIL_EMAIL_TLS= Ús d'encriptació TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Ús d'encriptació TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Desactivar globalment tot enviament de SMS (per mode de proves o demo) MAIN_SMS_SENDMODE=Mètode d'enviament de SMS MAIN_MAIL_SMS_FROM=Número de telèfon per defecte per als enviaments SMS diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index 7a0ef99ecf3..ac4fc6713ae 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metoda odesílání e-mailů MAIN_MAIL_SMTPS_ID=SMTP ID je-li vyžadováno ověření MAIN_MAIL_SMTPS_PW=SMTP heslo je-li vyžadováno ověření MAIN_MAIL_EMAIL_TLS= Použít TLS (SSL) šifrování +MAIN_MAIL_EMAIL_STARTTLS= Použít TLS (STARTTLS) šifrování MAIN_DISABLE_ALL_SMS=Zakázat všechny odesílané SMS (pro testovací účely apod.) MAIN_SMS_SENDMODE=Použitá metoda pro odesílání SMS MAIN_MAIL_SMS_FROM=Výchozí telefonní číslo odesílatele SMS diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index e9bf96d4aaf..8852107ced4 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode til at bruge til at sende e-mails MAIN_MAIL_SMTPS_ID=SMTP ID hvis påkrævet MAIN_MAIL_SMTPS_PW=SMTP Password hvis påkrævet MAIN_MAIL_EMAIL_TLS= Brug TLS (SSL) kryptering +MAIN_MAIL_EMAIL_STARTTLS= Brug TLS (STARTTLS) kryptering MAIN_DISABLE_ALL_SMS=Deaktiver alle SMS sendings (til testformål eller demoer) MAIN_SMS_SENDMODE=Metode til at bruge til at sende SMS MAIN_MAIL_SMS_FROM=Standard afsenderens telefonnummer til afsendelse af SMS'er diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 5e503bd41f0..182678c0678 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Methode zum Senden von E-Mails MAIN_MAIL_SMTPS_ID=SMTP ID, wenn Authentifizierung erforderlich MAIN_MAIL_SMTPS_PW=SMTP Passwort, wenn Authentifizierung erforderlich MAIN_MAIL_EMAIL_TLS= TLS (SSL)-Verschlüsselung verwenden +MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS)-Verschlüsselung verwenden MAIN_DISABLE_ALL_SMS=Alle SMS-Funktionen abschalten (für Test- oder Demozwecke) MAIN_SMS_SENDMODE=Methode zum Senden von SMS MAIN_MAIL_SMS_FROM=Standard Versendetelefonnummer der SMS-Funktion diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index 6b74139bacf..92503501c34 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Μέθοδος που χρησιμοποιείτε για α MAIN_MAIL_SMTPS_ID=SMTP ID αν απαιτείται πιστοποίηση MAIN_MAIL_SMTPS_PW=Κωδικός SMTP αν απαιτείται πιστοποίηση MAIN_MAIL_EMAIL_TLS= Χρησιμοποιήστε TLS (SSL) κωδικοποίηση +MAIN_MAIL_EMAIL_STARTTLS= Χρησιμοποιήστε TLS (STARTTLS) κωδικοποίηση MAIN_DISABLE_ALL_SMS=Απενεργοποίηση όλων των αποστολών SMS (για λόγους δοκιμής ή demos) MAIN_SMS_SENDMODE=Μέθοδος που θέλετε να χρησιμοποιηθεί για την αποστολή SMS MAIN_MAIL_SMS_FROM=Προεπιλεγμένος αριθμός τηλεφώνου αποστολέα για την αποστολή SMS diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 536e8a3c771..9860b3506da 100755 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 3223320d657..bda13ddca61 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Método de envío de e-mails MAIN_MAIL_SMTPS_ID=ID de autentificación SMTP si se requiere autenticación SMTP MAIN_MAIL_SMTPS_PW=Contraseña autentificación SMTP si se requiere autentificación SMTP MAIN_MAIL_EMAIL_TLS= Uso de encriptación TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Uso de encriptación TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Desactivar globalmente todo envío de SMS (para modo de pruebas o demo) MAIN_SMS_SENDMODE=Método de envío de SMS MAIN_MAIL_SMS_FROM=Número de teléfono por defecto para los envíos SMS diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index f894270eab1..a93e7a30915 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=E-kirjade saatmiseks kasutatav meetod MAIN_MAIL_SMTPS_ID=SMTP kasutaja, kui autentimine on nõutud MAIN_MAIL_SMTPS_PW=SMTP parool, kui autentimine on nõutud MAIN_MAIL_EMAIL_TLS= Kasuta TLS (SSL) krüpteerimist +MAIN_MAIL_EMAIL_STARTTLS= Kasuta TLS (STARTTLS) krüpteerimist MAIN_DISABLE_ALL_SMS=Keela SMSide saatmine (testimise või demo paigaldused) MAIN_SMS_SENDMODE=SMSi saatmiseks kasutatav meetod MAIN_MAIL_SMS_FROM=Vaikimisi määratud saatja telefoninumber SMSide saatmiseks diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index 69ea02cbf58..4d729c3a3d6 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID-a autentifikazio behar bada MAIN_MAIL_SMTPS_PW=SMTP parahitza autentifikazioa behar bada MAIN_MAIL_EMAIL_TLS= TLS (SSL) enkriptazioa erabili +MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS) enkriptazioa erabili MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=SMS-ak bidaltzeko erabiliko den modua MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index 04439b56c1a..16411716680 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=روش استفاده برای ارسال ایمیل MAIN_MAIL_SMTPS_ID=SMTP ID اگر احراز هویت مورد نیاز MAIN_MAIL_SMTPS_PW=SMTP رمز عبور در صورت احراز هویت مورد نیاز MAIN_MAIL_EMAIL_TLS= استفاده از TLS (SSL) رمزگذاری +MAIN_MAIL_EMAIL_STARTTLS= استفاده از TLS (STARTTLS) رمزگذاری MAIN_DISABLE_ALL_SMS=غیر فعال کردن همه sendings SMS (برای تست و یا دموی) MAIN_SMS_SENDMODE=روش استفاده برای ارسال SMS MAIN_MAIL_SMS_FROM=شماره تلفن پیش فرض فرستنده برای ارسال SMS diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index b5162e3dd27..0bda0fcfb58 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Menetelmä käyttää lähettäessään Sähköpostit MAIN_MAIL_SMTPS_ID=SMTP tunnus, jos vaaditaan MAIN_MAIL_SMTPS_PW=SMTP Salasana jos vaaditaan MAIN_MAIL_EMAIL_TLS= TLS (SSL) salaa +MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS) salaa MAIN_DISABLE_ALL_SMS=Poista kaikki SMS-lähetysten (testitarkoituksiin tai demot) MAIN_SMS_SENDMODE=Menetelmä käyttää lähettää tekstiviestejä MAIN_MAIL_SMS_FROM=Default lähettäjän puhelinnumeroon tekstiviestien lähetykseen diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 79af1f11a46..efd145ac4b7 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Méthode d'envoi des emails MAIN_MAIL_SMTPS_ID=Identifiant d'authentification SMTP si authentification SMTP requise MAIN_MAIL_SMTPS_PW=Mot de passe d'authentification SMTP si authentification SMTP requise MAIN_MAIL_EMAIL_TLS= Utilisation du chiffrement TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Utilisation du chiffrement TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Désactiver globalement tout envoi de SMS (pour mode test ou démos) MAIN_SMS_SENDMODE=Méthode d'envoi des SMS MAIN_MAIL_SMS_FROM=Numéro de téléphone par défaut pour l'envoi des SMS diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 1b80178604b..119c664c418 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=שיטה להשתמש כדי לשלוח מיילים MAIN_MAIL_SMTPS_ID=SMTP מזהה אם נדרש אימות MAIN_MAIL_SMTPS_PW=SMTP סיסמא אם נדרש אימות MAIN_MAIL_EMAIL_TLS= השתמש ב-TLS (SSL) להצפין +MAIN_MAIL_EMAIL_STARTTLS= השתמש ב-TLS (STARTTLS) להצפין MAIN_DISABLE_ALL_SMS=הפוך את כל sendings SMS (למטרות בדיקה או הדגמות) MAIN_SMS_SENDMODE=שיטה להשתמש כדי לשלוח SMS MAIN_MAIL_SMS_FROM=השולח ברירת מחדל מספר הטלפון לשליחת הודעות טקסט diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index e9ea05f18c8..88b2f8af9af 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index dbfa734d24e..07b974e3009 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Módszer használata küldjön e-mailt MAIN_MAIL_SMTPS_ID=SMTP hitelesítés szükséges, ha ID MAIN_MAIL_SMTPS_PW=SMTP jelszó hitelesítés szükséges, ha MAIN_MAIL_EMAIL_TLS= Használja a TLS (SSL) titkosítja +MAIN_MAIL_EMAIL_STARTTLS= Használja a TLS (STARTTLS) titkosítja MAIN_DISABLE_ALL_SMS=Tiltsa le az összes SMS-küldések (vizsgálati célokra, vagy demo) MAIN_SMS_SENDMODE=Módszer használatát, hogy küldjön SMS- MAIN_MAIL_SMS_FROM=Alapértelmezett küldő telefonszámát az SMS-küldés diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index 6d776477bae..b068f1a5d8e 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode Pengiriman EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Metode Pengiriman SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index 37a80482244..d5bb6741b87 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Aðferð til að nota til að senda tölvupóst MAIN_MAIL_SMTPS_ID=SMTP ID ef sannprófun sem krafist MAIN_MAIL_SMTPS_PW=SMTP lykilorð ef sannprófun sem krafist MAIN_MAIL_EMAIL_TLS= Nota TLS (SSL) dulkóða +MAIN_MAIL_EMAIL_STARTTLS= Nota TLS (STARTTLS) dulkóða MAIN_DISABLE_ALL_SMS=Slökkva öll SMS sendings (vegna rannsókna eða kynningum) MAIN_SMS_SENDMODE=Aðferð til að nota til að senda SMS MAIN_MAIL_SMS_FROM=Sjálfgefin sendanda símanúmer fyrir SMS senda diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index b22c15bcb67..9c96879ae54 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metodo da utilizzare per l'invio di email MAIN_MAIL_SMTPS_ID=Id per l'autenticazione SMTP, se necessario MAIN_MAIL_SMTPS_PW=Password per l'autenticazione SMTP, se necessaria MAIN_MAIL_EMAIL_TLS= Usa cifratura TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Usa cifratura TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Disabilitare tutti gli invii SMS (per scopi di test o demo) MAIN_SMS_SENDMODE=Metodo da utilizzare per inviare SMS MAIN_MAIL_SMS_FROM=Numero del chiamante predefinito per l'invio di SMS diff --git a/htdocs/langs/ka_GE/admin.lang b/htdocs/langs/ka_GE/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/ka_GE/admin.lang +++ b/htdocs/langs/ka_GE/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/kn_IN/admin.lang b/htdocs/langs/kn_IN/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/kn_IN/admin.lang +++ b/htdocs/langs/kn_IN/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index 08e2d715e21..5f1a9010ad0 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index e550446a5b7..d088510e243 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index e7e06c220eb..86ce69f5f81 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=El. pašto siuntimui naudoti metodą MAIN_MAIL_SMTPS_ID=SMTP ID, jei reikalingas autentiškumo patvirtinimas MAIN_MAIL_SMTPS_PW=SMTP slaptažodis, jei reikalingas autentiškumo patvirtinimas MAIN_MAIL_EMAIL_TLS= Užšifravimui naudoti TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Užšifravimui naudoti TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Išjungti visus SMS siuntimus (bandymo ar demo tikslais) MAIN_SMS_SENDMODE=SMS siuntimui naudoti metodą MAIN_MAIL_SMS_FROM=SMS siuntimui naudojamas siuntėjo telefono numeris pagal nutylėjimą diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index f34c9d71991..0f7568c8640 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode ko izmantot sūtot e-pastus MAIN_MAIL_SMTPS_ID=SMTP ID ja autentificēšana nepieciešama MAIN_MAIL_SMTPS_PW=SMTP parole ja autentificēšanās nepieciešama MAIN_MAIL_EMAIL_TLS= Izmantot TLS (SSL) šifrēšanu +MAIN_MAIL_EMAIL_STARTTLS= Izmantot TLS (STARTTLS) šifrēšanu MAIN_DISABLE_ALL_SMS=Atslēgt visas SMS sūtīšanas (izmēģinājuma nolūkā vai demo) MAIN_SMS_SENDMODE=Izmantojamā metode SMS sūtīšanai MAIN_MAIL_SMS_FROM=Noklusētais sūtītāja tālruņa numurs SMS sūtīšanai diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index fc8913e3e9a..496cdde1e81 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metode for å sende e-post MAIN_MAIL_SMTPS_ID=SMTP-ID hvis godkjenning kreves MAIN_MAIL_SMTPS_PW=SMTP-passord hvis godkjenning kreves MAIN_MAIL_EMAIL_TLS= Bruk TLS (SSL) kryptering +MAIN_MAIL_EMAIL_STARTTLS= Bruk TLS (STARTTLS) kryptering MAIN_DISABLE_ALL_SMS=Deaktiver alle SMS sendings (for testformål eller demoer) MAIN_SMS_SENDMODE=Metode for å sende SMS MAIN_MAIL_SMS_FROM=Standard avsender telefonnummer for sending av SMS diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index e37f6bd3914..e52c2b5ba1a 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Te gebruiken methode om e-mails te verzenden MAIN_MAIL_SMTPS_ID=SMTP-gebruikersnaam indien verificatie vereist MAIN_MAIL_SMTPS_PW=SMTP-wachtwoord indien verificatie vereist MAIN_MAIL_EMAIL_TLS= Gebruik TLS (SSL) encryptie +MAIN_MAIL_EMAIL_STARTTLS= Gebruik TLS (STARTTLS) encryptie MAIN_DISABLE_ALL_SMS=Schakel alle SMS verzendingen (voor test doeleinden of demo) MAIN_SMS_SENDMODE=Methode te gebruiken om SMS te verzenden MAIN_MAIL_SMS_FROM=Standaard afzender telefoonnummer voor Sms versturen diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index 85b9d49ba3c..871bdfbf9b7 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metoda używana do wysłania E-maili MAIN_MAIL_SMTPS_ID=Identyfikator SMTP, jeżeli wymaga uwierzytelniania MAIN_MAIL_SMTPS_PW=Hasło SMTP , jeżeli wymagane uwierzytelniania MAIN_MAIL_EMAIL_TLS= Użyj szyfrowania TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Użyj szyfrowania TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Wyłącz wysyłanie wszystkich SMS (do celów badawczych lub testowych) MAIN_SMS_SENDMODE=Metoda służy do wysyłania wiadomości SMS MAIN_MAIL_SMS_FROM=Nadawca domyślny numer telefonu wysyłaniu SMS-ów diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 048d5f8be49..bbc5e8084a0 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -235,6 +235,7 @@ MAIN_MAIL_SENDMODE=Método usado para envio de E-Mails MAIN_MAIL_SMTPS_ID=SMTP ID se requerer autentificação MAIN_MAIL_SMTPS_PW=SMTP Senha se requerer autentificação MAIN_MAIL_EMAIL_TLS=Usar TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS=Usar TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Desabilitar todos envios de SMS (Para testes ou demo) MAIN_SMS_SENDMODE=Método usado para enviar SMS MAIN_MAIL_SMS_FROM=Envio default para número telefonico por SMS diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index 77296c82eab..118321ede94 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Método de envío de e-mails MAIN_MAIL_SMTPS_ID=ID SMTP para autenticação SMTP MAIN_MAIL_SMTPS_PW=Password SMTP para autenticação SMTP MAIN_MAIL_EMAIL_TLS= Utilizar TLS (SSL) criptografia +MAIN_MAIL_EMAIL_STARTTLS= Utilizar TLS (STARTTLS) criptografia MAIN_DISABLE_ALL_SMS=Desative todos os envios de SMS (para fins de teste ou demonstrações) MAIN_SMS_SENDMODE=Método a ser usado para enviar SMS MAIN_MAIL_SMS_FROM=Número de telefone padrão do remetente para envio de SMS diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index 6ad10fce78e..b3ac0f2f227 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metoda de a folosi pentru a trimite email-uri MAIN_MAIL_SMTPS_ID=SMTP ID-ul de autentificare necesare în cazul în MAIN_MAIL_SMTPS_PW=SMTP parola, dacă se cere autentificare MAIN_MAIL_EMAIL_TLS= Utilizaţi criptare TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS= Utilizaţi criptare TLS (STARTTLS) MAIN_DISABLE_ALL_SMS=Dezactivaţi toate trimiteri SMS (în scopuri de testare sau demo-uri) MAIN_SMS_SENDMODE=Metoda de utilizare pentru trimiterea SMS-urilor MAIN_MAIL_SMS_FROM=Numărul de telefon expeditor implicit pentru trimiterea de SMS diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 7b6b1c271f6..5388e16ba7c 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Метод, используемый для передачи MAIN_MAIL_SMTPS_ID=SMTP ID, если требуется проверка подлинности MAIN_MAIL_SMTPS_PW=SMTP пароль, если требуется проверка подлинности MAIN_MAIL_EMAIL_TLS= Использовать TLS (SSL) шифрует +MAIN_MAIL_EMAIL_STARTTLS= Использовать TLS (STARTTLS) шифрует MAIN_DISABLE_ALL_SMS=Отключить все посылки SMS (для тестовых целей или демо) MAIN_SMS_SENDMODE=Метод, используемый для передачи SMS MAIN_MAIL_SMS_FROM=По умолчанию отправителю номер телефона для отправки смс diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index 4ebf090c666..4f3ce1e6060 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Použitá metóda pri odosielaní e-mailov MAIN_MAIL_SMTPS_ID=SMTP ID ak sa vyžaduje overenie MAIN_MAIL_SMTPS_PW=Heslo SMTP Ak sa vyžaduje overenie MAIN_MAIL_EMAIL_TLS= Použiť TLS (SSL) šifrovanie +MAIN_MAIL_EMAIL_STARTTLS= Použiť TLS (STARTTLS) šifrovanie MAIN_DISABLE_ALL_SMS=Zakázať všetky SMS sendings (len na skúšobné účely alebo ukážky) MAIN_SMS_SENDMODE=Použitá metóda pri odosielaní SMS MAIN_MAIL_SMS_FROM=Predvolené odosielateľa telefónne číslo pre posielanie SMS diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 2c265f17b15..2edeeb01597 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Načini za pošiljanje e-pošte MAIN_MAIL_SMTPS_ID=SMTP ID, če je zahtevano preverjanje pristnosti MAIN_MAIL_SMTPS_PW=SMTP geslo, če je zahtevano preverjanje pristnosti MAIN_MAIL_EMAIL_TLS= Uporabi TLS (SSL) šifriranje +MAIN_MAIL_EMAIL_STARTTLS= Uporabi TLS (STARTTLS) šifriranje MAIN_DISABLE_ALL_SMS=Onemogoči vsa pošiljanja SMS (za namen testiranja ali demonstracij) MAIN_SMS_SENDMODE=Uporabljen način pošiljanja SMS MAIN_MAIL_SMS_FROM=Privzeta pošiljateljeva telefonska številka za pošiljanje SMS diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/sr_RS/admin.lang b/htdocs/langs/sr_RS/admin.lang index cdcb95252f3..7a9682bcbdb 100644 --- a/htdocs/langs/sr_RS/admin.lang +++ b/htdocs/langs/sr_RS/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index f5425f3fef0..3b41886bd6e 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Metod för att skicka e-post MAIN_MAIL_SMTPS_ID=SMTP-ID om autentisering krävs MAIN_MAIL_SMTPS_PW=SMTP-lösenord om autentisering krävs MAIN_MAIL_EMAIL_TLS= Använd TLS (SSL) krypterar +MAIN_MAIL_EMAIL_STARTTLS= Använd TLS (STARTTLS) krypterar MAIN_DISABLE_ALL_SMS=Inaktivera alla SMS sändningarna (för teständamål eller demos) MAIN_SMS_SENDMODE=Metod som ska användas för att skicka SMS MAIN_MAIL_SMS_FROM=Standard avsändaren telefonnummer för SMS-sändning diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index 9d895d55391..44ac7ae0cd9 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=วิธีการที่จะใช้ในการ MAIN_MAIL_SMTPS_ID=ID SMTP หากตร​​วจสอบที่จำเป็น MAIN_MAIL_SMTPS_PW=รหัสผ่าน SMTP หากตร​​วจสอบที่จำเป็น MAIN_MAIL_EMAIL_TLS= ใช้ TLS (SSL) เข้ารหัส +MAIN_MAIL_EMAIL_STARTTLS= ใช้ TLS (STARTTLS) เข้ารหัส MAIN_DISABLE_ALL_SMS=ปิดการใช้งานตอบรับ SMS ทั้งหมด (สำหรับวัตถุประสงค์ในการทดสอบหรือการสาธิต) MAIN_SMS_SENDMODE=วิธีการที่จะใช้ในการส่ง SMS MAIN_MAIL_SMS_FROM=เริ่มต้นหมายเลขโทรศัพท์ของผู้ส่งสำหรับการส่ง SMS diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 71ac557548a..6c878ae1575 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=E-posta göndermek için kullanılan yöntem MAIN_MAIL_SMTPS_ID=Doğrulama gerektirdiğinde SMTP Kimliği MAIN_MAIL_SMTPS_PW=Doğrulama gerektirdiğinde SMTP Parolası MAIN_MAIL_EMAIL_TLS= TLS (SSL) şifreleme kullanın +MAIN_MAIL_EMAIL_STARTTLS= TLS (STARTTLS) şifreleme kullanın MAIN_DISABLE_ALL_SMS=Bütün SMS gönderimlerini devre dışı bırak (test ya da demo amaçlı) MAIN_SMS_SENDMODE=SMS göndermek için kullanılacak yöntem MAIN_MAIL_SMS_FROM=SMS gönderimi için varsayılan gönderici telefon numarası diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index 89150c3ce67..6f888f9a9e1 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index deca56bf2c1..50a2373fd3b 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Method to use to send EMails MAIN_MAIL_SMTPS_ID=SMTP ID if authentication required MAIN_MAIL_SMTPS_PW=SMTP Password if authentication required MAIN_MAIL_EMAIL_TLS= Use TLS (SSL) encrypt +MAIN_MAIL_EMAIL_STARTTLS= Use TLS (STARTTLS) encrypt MAIN_DISABLE_ALL_SMS=Disable all SMS sendings (for test purposes or demos) MAIN_SMS_SENDMODE=Method to use to send SMS MAIN_MAIL_SMS_FROM=Default sender phone number for Sms sending diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index d9ecfa61d98..50a9889d2e7 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=Phương pháp sử dụng để gửi email MAIN_MAIL_SMTPS_ID=SMTP ID nếu có yêu cầu xác thực MAIN_MAIL_SMTPS_PW=Mật khẩu SMTP nếu có yêu cầu xác thực MAIN_MAIL_EMAIL_TLS= Sử dụng TLS (SSL) mã hóa +MAIN_MAIL_EMAIL_STARTTLS= Sử dụng TLS (STARTTLS) mã hóa MAIN_DISABLE_ALL_SMS=Vô hiệu hoá tất cả sendings SMS (cho mục đích thử nghiệm hoặc trình diễn) MAIN_SMS_SENDMODE=Phương pháp sử dụng để gửi SMS MAIN_MAIL_SMS_FROM=Số điện thoại mặc định cho việc gửi SMS gửi diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index 37dd21abeca..2fb96f11c39 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -272,6 +272,7 @@ MAIN_MAIL_SENDMODE=电邮发送方法 MAIN_MAIL_SMTPS_ID=SMTP ID,如果要求验证 MAIN_MAIL_SMTPS_PW=SMTP 密码,如果要求验证 MAIN_MAIL_EMAIL_TLS= 使用 TLS(SSL)加密 +MAIN_MAIL_EMAIL_STARTTLS= 使用 TLS(STARTTLS)加密 MAIN_DISABLE_ALL_SMS=禁用所有短信发送(用于测试目的或演示) MAIN_SMS_SENDMODE=短信发送方法 MAIN_MAIL_SMS_FROM=发送短信的默认发件人号码 From 7528af556921976ca87c6386d22fd1d11105b293 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Mar 2016 11:18:23 +0100 Subject: [PATCH 12/16] warning moved into info --- htdocs/admin/translation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 4ebd64a2f5b..d3252a4fc9b 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -118,7 +118,7 @@ print "
\n"; print $langs->trans("CurrentUserLanguage").': '.$langs->defaultlang.'
'; print '
'; -print img_warning().' '.$langs->trans("SomeTranslationAreUncomplete").'
'; +print img_info().' '.$langs->trans("SomeTranslationAreUncomplete").'
'; $urlwikitranslatordoc='http://wiki.dolibarr.org/index.php/Translator_documentation'; print $langs->trans("SeeAlso").': '.$urlwikitranslatordoc.'
'; @@ -134,7 +134,7 @@ print ''; print '
'; print $langs->trans('AvailabilityPeriod'); if (! empty($conf->commande->enabled)) From d7b0e412712a680ec15588909c5c7c5e3e1e9438 Mon Sep 17 00:00:00 2001 From: jtisseau Date: Wed, 16 Mar 2016 01:54:45 +0100 Subject: [PATCH 09/16] Added the STARTTLS connection mode Adds the STARTTLS connection mode in function _server_authenticate. It's use by Microsoft Hotmail and Exchange servers. I use the MAIN_MAIL_EMAIL_STARTTLS const introduced in admins/mails.php retrieved from the $conf object which is not used anywhere else in the file so it may not be the right way to do it. Maybe this value should be passed in constructor but it would then imply more changes around multiple files calling smtps class. --- htdocs/core/class/smtps.class.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index cfefa223a7d..93ffb57930e 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -3,6 +3,7 @@ * Copyright (C) Walter Torres [with a *lot* of help!] * Copyright (C) 2005-2015 Laurent Destailleur * Copyright (C) 2006-2011 Regis Houssin + * Copyright (C) 2016 Jonathan TISSEAU * * 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 @@ -387,6 +388,8 @@ class SMTPs */ function _server_authenticate() { + global $conf; + // Send the RFC2554 specified EHLO. // This improvment as provided by 'SirSir' to // accomodate both SMTP AND ESMTP capable servers @@ -395,6 +398,24 @@ class SMTPs $host=preg_replace('@ssl://@i','',$host); // Remove prefix if ( $_retVal = $this->socket_send_str('EHLO ' . $host, '250') ) { + if (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)) + { + if (!$_retVal = $this->socket_send_str('STARTTLS', 220)) + { + $this->_setErr(131, 'STARTTLS connection is not supported.'); + return $_retVal; + } + if (!stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) + { + $this->_setErr(132, 'STARTTLS connection failed.'); + return $_retVal; + } + if (!$_retVal = $this->socket_send_str('EHLO '.$host, '250')) + { + $this->_setErr(126, '"' . $host . '" does not support authenticated connections.'); + return $_retVal; + } + } // Send Authentication to Server // Check for errors along the way $this->socket_send_str('AUTH LOGIN', '334'); From a98e19a1439683805b5f247c5ffde5d474695424 Mon Sep 17 00:00:00 2001 From: jtisseau Date: Wed, 16 Mar 2016 02:09:55 +0100 Subject: [PATCH 10/16] Adds a STARTTLS option Adds a STARTTLS authentification option. This is used by Microsoft Hotmail and Exchange. This commit includes a new constant named MAIN_MAIL_EMAIL_STARTTLS, a view and edit view for it and the edit action needed to modify value in DB. It also updates the js function initFields to make it behave like the standard TLS option and adds two jQuery function respectively to set TSL off when STARTTLS is selected and to set STARTTLS off when TLS is selected. Unselecting one of those won"t select the other. --- htdocs/admin/mails.php | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 733569d8071..52324dc1678 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2016 Jonathan TISSEAU * * 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 @@ -71,6 +72,7 @@ if ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID", GETPOST("MAIN_MAIL_SMTPS_ID"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW", GETPOST("MAIN_MAIL_SMTPS_PW"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS", GETPOST("MAIN_MAIL_EMAIL_TLS"),'chaine',0,'',$conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS", GETPOST("MAIN_MAIL_EMAIL_STARTTLS"),'chaine',0,'',$conf->entity); // Content parameters dolibarr_set_const($db, "MAIN_MAIL_EMAIL_FROM", GETPOST("MAIN_MAIL_EMAIL_FROM"), 'chaine',0,'',$conf->entity); dolibarr_set_const($db, "MAIN_MAIL_ERRORS_TO", GETPOST("MAIN_MAIL_ERRORS_TO"), 'chaine',0,'',$conf->entity); @@ -274,6 +276,8 @@ if ($action == 'edit') jQuery(".drag").hide(); jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); jQuery("#MAIN_MAIL_EMAIL_TLS").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0); + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").prop("disabled", true); '; if ($linuxlike) { @@ -300,6 +304,8 @@ if ($action == 'edit') jQuery(".drag").show(); jQuery("#MAIN_MAIL_EMAIL_TLS").val('.$conf->global->MAIN_MAIL_EMAIL_TLS.'); jQuery("#MAIN_MAIL_EMAIL_TLS").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS.'); + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER").show(); @@ -312,6 +318,14 @@ if ($action == 'edit') jQuery("#MAIN_MAIL_SENDMODE").change(function() { initfields(); }); + jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { + if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val() == 1) + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").val(0); + }); + jQuery("#MAIN_MAIL_EMAIL_STARTTLS").change(function() { + if (jQuery("#MAIN_MAIL_EMAIL_TLS").val() == 1) + jQuery("#MAIN_MAIL_EMAIL_TLS").val(0); + }); })'; print ''."\n"; } @@ -475,6 +489,20 @@ if ($action == 'edit') else print yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (! empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'smtps')) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS',(! empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS)?$conf->global->MAIN_MAIL_EMAIL_STARTTLS:0),1); + } + else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
 
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'smtps') + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS); + } + else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } + else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
 
'; print ''; -print ''; +print ''; print ''; print ''; if (! empty($conf->multicompany->enabled) && !$user->entity) print ''; From 62695038886af15014362da692d9e6d84dc2e372 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Mar 2016 11:23:00 +0100 Subject: [PATCH 13/16] Add es_EC and es_PA language --- htdocs/langs/es_EC/main.lang | 21 +++++++++++++++++++++ htdocs/langs/es_PA/main.lang | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 htdocs/langs/es_EC/main.lang create mode 100644 htdocs/langs/es_PA/main.lang diff --git a/htdocs/langs/es_EC/main.lang b/htdocs/langs/es_EC/main.lang new file mode 100644 index 00000000000..1602d6a7ffa --- /dev/null +++ b/htdocs/langs/es_EC/main.lang @@ -0,0 +1,21 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +FONTFORPDF=helvetica +FONTSIZEFORPDF=10 +SeparatorDecimal=, +SeparatorThousand=None +FormatDateShort=%d/%m/%Y +FormatDateShortInput=%d/%m/%Y +FormatDateShortJava=dd/MM/yyyy +FormatDateShortJavaInput=dd/MM/yyyy +FormatDateShortJQuery=dd/mm/yy +FormatDateShortJQueryInput=dd/mm/yy +FormatHourShortJQuery=HH:MI +FormatHourShort=%H:%M +FormatHourShortDuration=%H:%M +FormatDateTextShort=%d %b %Y +FormatDateText=%d %B %Y +FormatDateHourShort=%d/%m/%Y %H:%M +FormatDateHourSecShort=%d/%m/%Y %H:%M:%S +FormatDateHourTextShort=%d %b %Y %H:%M +FormatDateHourText=%d %B %Y %H:%M diff --git a/htdocs/langs/es_PA/main.lang b/htdocs/langs/es_PA/main.lang new file mode 100644 index 00000000000..1602d6a7ffa --- /dev/null +++ b/htdocs/langs/es_PA/main.lang @@ -0,0 +1,21 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +FONTFORPDF=helvetica +FONTSIZEFORPDF=10 +SeparatorDecimal=, +SeparatorThousand=None +FormatDateShort=%d/%m/%Y +FormatDateShortInput=%d/%m/%Y +FormatDateShortJava=dd/MM/yyyy +FormatDateShortJavaInput=dd/MM/yyyy +FormatDateShortJQuery=dd/mm/yy +FormatDateShortJQueryInput=dd/mm/yy +FormatHourShortJQuery=HH:MI +FormatHourShort=%H:%M +FormatHourShortDuration=%H:%M +FormatDateTextShort=%d %b %Y +FormatDateText=%d %B %Y +FormatDateHourShort=%d/%m/%Y %H:%M +FormatDateHourSecShort=%d/%m/%Y %H:%M:%S +FormatDateHourTextShort=%d %b %Y %H:%M +FormatDateHourText=%d %B %Y %H:%M From eb3ffb30c56dbcedfb1509a04519045a77521972 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 16 Mar 2016 11:29:56 +0100 Subject: [PATCH 14/16] Add mongolian language --- htdocs/langs/mn_MN/main.lang | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 htdocs/langs/mn_MN/main.lang diff --git a/htdocs/langs/mn_MN/main.lang b/htdocs/langs/mn_MN/main.lang new file mode 100644 index 00000000000..34bf859ace5 --- /dev/null +++ b/htdocs/langs/mn_MN/main.lang @@ -0,0 +1,21 @@ +# Dolibarr language file - Source file is en_US - main +DIRECTION=ltr +FONTFORPDF=helvetica +FONTSIZEFORPDF=10 +SeparatorDecimal=. +SeparatorThousand=None +FormatDateShort=%Y.%m.%d +FormatDateShortInput=%Y.%m.%d +FormatDateShortJava=yyyy.MM.dd +FormatDateShortJavaInput=yyyy.MM.dd +FormatDateShortJQuery=yy.mm.dd +FormatDateShortJQueryInput=yy.mm.dd +FormatHourShortJQuery=HH:MI +FormatHourShort=%H:%M +FormatHourShortDuration=%H:%M +FormatDateTextShort=%d %b %Y +FormatDateText=%d %B %Y +FormatDateHourShort=%d/%m/%Y %H:%M +FormatDateHourSecShort=%d/%m/%Y %H:%M:%S +FormatDateHourTextShort=%d %b %Y %H:%M +FormatDateHourText=%d %B %Y %H:%M From dfcd72399a858f6830cca0f0349c37de0892a73a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Mar 2016 11:37:07 +0100 Subject: [PATCH 15/16] Missing translation --- htdocs/langs/en_US/bills.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index 970f42d8a2e..04b7a6ecb33 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -231,6 +231,7 @@ CustomerBillsUnpaid=Unpaid customer invoices NonPercuRecuperable=Non-recoverable SetConditions=Set payment terms SetMode=Set payment mode +SetRevenuStamp=Set revenue stamp Billed=Billed RecurringInvoices=Recurring invoices RepeatableInvoice=Template invoice From cd687f57d68a87d5462e41dd8f99db091e34c566 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Mar 2016 21:58:51 +0100 Subject: [PATCH 16/16] NEW Can change type of extrafields for some combinations. --- htdocs/core/actions_extrafields.inc.php | 21 ++++- htdocs/core/tpl/admin_extrafields_add.tpl.php | 23 +++-- .../core/tpl/admin_extrafields_edit.tpl.php | 92 ++++++++++++++----- 3 files changed, 98 insertions(+), 38 deletions(-) diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index f31e2c184d8..6a162123ce0 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -41,10 +41,16 @@ if ($action == 'add') { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); + $mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")); $action = 'create'; } - + if (GETPOST('type')=='varchar' && $extrasize <= 0) + { + $error++; + $langs->load("errors"); + $mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Size")); + $action = 'edit'; + } if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring) { $error++; @@ -203,8 +209,15 @@ if ($action == 'update') { $error++; $langs->load("errors"); - $mesg[]=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); - $action = 'create'; + $mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Type")); + $action = 'edit'; + } + if (GETPOST('type')=='varchar' && $extrasize <= 0) + { + $error++; + $langs->load("errors"); + $mesg[]=$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Size")); + $action = 'edit'; } if (GETPOST('type')=='varchar' && $extrasize > $maxsizestring) { diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 2b485f69fb9..25b86cdc0bf 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -30,6 +30,7 @@ jQuery(document).ready(function() { function init_typeoffields(type) { + console.log("select new type "+type); var size = jQuery("#size"); var unique = jQuery("#unique"); var required = jQuery("#required"); @@ -92,23 +93,21 @@ - - diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index b79fa539d2e..f12f90d6206 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -22,20 +22,45 @@ jQuery(document).ready(function() { function init_typeoffields(type) { + console.log("select new type "+type); var size = jQuery("#size"); var unique = jQuery("#unique"); var required = jQuery("#required"); - if (type == 'date') { size.prop('disabled', true); } - else if (type == 'datetime') { size.prop('disabled', true); } - else if (type == 'double') { size.removeAttr('disabled'); } - else if (type == 'int') { size.removeAttr('disabled'); } - else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); } - else if (type == 'varchar') { size.removeAttr('disabled'); } - else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true);} - else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true);} + var default_value = jQuery("#default_value"); + + + if (type == 'date') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } + else if (type == 'datetime') { size.val('').prop('disabled', true); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + else if (type == 'double') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + else if (type == 'int') { size.removeAttr('disabled'); unique.removeAttr('disabled'); jQuery("#value_choice").hide(); jQuery("#helpchkbxlst").hide();} + else if (type == 'text') { size.removeAttr('disabled'); unique.prop('disabled', true).removeAttr('checked'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } + else if (type == 'varchar') { size.removeAttr('disabled'); unique.removeAttr('disabled','disabled'); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide(); } + else if (type == 'boolean') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} + else if (type == 'price') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpchkbxlst").hide();} + else if (type == 'select') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'link') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").show();} + else if (type == 'sellist') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").show();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'radio') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'checkbox') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").show();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} + else if (type == 'chkbxlst') { size.val('').prop('disabled', true); unique.prop('disabled', true); jQuery("#value_choice").show();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").show();jQuery("#helplink").hide();} + else if (type == 'separate') { size.val('').prop('disabled', true); unique.prop('disabled', true); required.val('').prop('disabled', true); default_value.val('').prop('disabled', true); jQuery("#value_choice").hide();jQuery("#helpselect").hide();jQuery("#helpsellist").hide();jQuery("#helpchkbxlst").hide();jQuery("#helplink").hide();} else size.val('').prop('disabled', true); } init_typeoffields(jQuery("#type").val()); + jQuery("#type").change(function() { + init_typeoffields($(this).val()); + }); }); @@ -85,33 +110,56 @@ elseif (($type== 'sellist') || ($type == 'chkbxlst') || ($type == 'link') ) - -
'.$langs->trans("Language").''.$langs->trans("Language").' (en_US, es_MX, ...)'.$langs->trans("Key").''.$langs->trans("Value").''.$langs->trans("Entity").'
trans("Position"); ?>
trans("Value"); ?> - - -
- - -textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> -textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> -textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> -textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> -
+ + +
+ + + textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> +
trans("DefaultValue"); ?>">
trans("AttributeCode"); ?>
trans("Type"); ?> - - +array('varchar', 'phone', 'mail', 'select'), + 'mail'=>array('varchar', 'phone', 'mail', 'select'), + 'phone'=>array('varchar', 'phone', 'mail', 'select'), + 'select'=>array('varchar', 'phone', 'mail', 'select') +); +if (in_array($type, array_keys($typewecanchangeinto))) +{ + $newarray=array(); + print ''; +} +else +{ + print $type2label[$type]; + print ''; +} +?>
trans("Size"); ?>
trans("Position"); ?>
trans("Value"); ?> - - -
- -textwithpicto('', $langs->trans("ExtrafieldParamHelp".$type),1,0)?>
+ + +
+ + + textwithpicto('', $langs->trans("ExtrafieldParamHelpselect"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpsellist"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelpchkbxlst"),1,0)?> + textwithpicto('', $langs->trans("ExtrafieldParamHelplink"),1,0)?> +
trans("Unique"); ?>>