From 39737c7c4b0fae01790ed313eae10d2bdb8d9310 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Dec 2019 13:19:14 +0100 Subject: [PATCH 1/3] Fix opacity on text with a href links inside Fix var not defined --- htdocs/cashdesk/class/Facturation.class.php | 1 + htdocs/categories/admin/categorie.php | 1 + htdocs/compta/facture/card.php | 49 +++++++++++---------- htdocs/main.inc.php | 1 + htdocs/stripe/lib/stripe.lib.php | 3 ++ htdocs/supplier_proposal/card.php | 2 + htdocs/theme/eldy/global.inc.php | 3 ++ htdocs/theme/md/style.css.php | 3 ++ htdocs/user/class/user.class.php | 1 + 9 files changed, 40 insertions(+), 24 deletions(-) diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 782280e6d2b..e66ed20939d 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -114,6 +114,7 @@ class Facturation $localtaxarray = getLocalTaxesFromRate($vatrowid, 0, $societe, $mysoc, 1); // Clean vat code + $reg = array(); $vat_src_code = ''; if (preg_match('/\((.*)\)/', $txtva, $reg)) { diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 7d47724ddd3..534d45abae0 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -39,6 +39,7 @@ $action=GETPOST('action', 'aZ09'); * Actions */ +$reg = array(); if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code=$reg[1]; diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 02cc7b04b86..2cacb885fa9 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2615,7 +2615,7 @@ if ($action == 'create') $element = $subelement = $origin; $regs = array(); if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) { - $element = $reg[1]; + $element = $regs[1]; $subelement = $regs[2]; } @@ -3726,21 +3726,21 @@ elseif ($id > 0 || !empty($ref)) if ($action == 'paid' && $resteapayer > 0) { // Code $i = 0; - $close [$i]['code'] = 'discount_vat'; // escompte + $close[$i]['code'] = 'discount_vat'; // escompte $i++; - $close [$i]['code'] = 'badcustomer'; + $close[$i]['code'] = 'badcustomer'; $i++; // Help $i = 0; - $close [$i]['label'] = $langs->trans("HelpEscompte").'

'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc"); + $close[$i]['label'] = $langs->trans("HelpEscompte").'

'.$langs->trans("ConfirmClassifyPaidPartiallyReasonDiscountVatDesc"); $i++; - $close [$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); + $close[$i]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); $i++; // Texte $i = 0; - $close [$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonDiscount", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); $i++; - $close [$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); + $close[$i]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $resteapayer, $langs->trans("Currency".$conf->currency)), $close[$i]['label'], 1); $i++; // arrayreasons[code]=reason foreach ($close as $key => $val) { @@ -3766,17 +3766,17 @@ elseif ($id > 0 || !empty($ref)) print '
'.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
'; } else { // Code - $close [1] ['code'] = 'badcustomer'; - $close [2] ['code'] = 'abandon'; + $close[1]['code'] = 'badcustomer'; + $close[2]['code'] = 'abandon'; // Help - $close [1] ['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); - $close [2] ['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); + $close[1]['label'] = $langs->trans("ConfirmClassifyPaidPartiallyReasonBadCustomerDesc"); + $close[2]['label'] = $langs->trans("ConfirmClassifyAbandonReasonOtherDesc"); // Texte - $close [1] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close [1] ['label'], 1); - $close [2] ['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close [2] ['label'], 1); + $close[1]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyPaidPartiallyReasonBadCustomer", $object->ref), $close[1]['label'], 1); + $close[2]['reason'] = $form->textwithpicto($langs->transnoentities("ConfirmClassifyAbandonReasonOther"), $close[2]['label'], 1); // arrayreasons - $arrayreasons [$close [1] ['code']] = $close [1] ['reason']; - $arrayreasons [$close [2] ['code']] = $close [2] ['reason']; + $arrayreasons[$close[1]['code']] = $close[1]['reason']; + $arrayreasons[$close[2]['code']] = $close[2]['reason']; // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"), array('type' => 'radio', 'name' => 'close_code', 'label' => $langs->trans("Reason"), 'values' => $arrayreasons), array('type' => 'text', 'name' => 'close_note', 'label' => $langs->trans("Comment"), 'value' => '', 'morecss' => 'minwidth300')); @@ -3880,25 +3880,25 @@ elseif ($id > 0 || !empty($ref)) print ''; // Type - print ''; // Relative and absolute discounts - print '
'.$langs->trans('Type').''; + print '
'.$langs->trans('Type').''; print $object->getLibType(); if ($object->module_source) { - print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')'; + print ' ('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')'; } if ($object->type == Facture::TYPE_REPLACEMENT) { $facreplaced = new Facture($db); $facreplaced->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; } if ($object->type == Facture::TYPE_CREDIT_NOTE && !empty($object->fk_facture_source)) { $facusing = new Facture($db); $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; } $facidavoir = $object->getListIdAvoirFromInvoice(); if (count($facidavoir) > 0) { - print ' ('.$langs->transnoentities("InvoiceHasAvoir"); + print ' ('.$langs->transnoentities("InvoiceHasAvoir"); $i = 0; foreach ($facidavoir as $id) { if ($i == 0) @@ -3914,14 +3914,14 @@ elseif ($id > 0 || !empty($ref)) if ($objectidnext > 0) { $facthatreplace = new Facture($db); $facthatreplace->fetch($objectidnext); - print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; + print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; } if ($object->type == Facture::TYPE_CREDIT_NOTE || $object->type == Facture::TYPE_DEPOSIT) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(0, $object->id); if ($result > 0) { - print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; + print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; } } @@ -3930,7 +3930,7 @@ elseif ($id > 0 || !empty($ref)) $tmptemplate = new FactureRec($db); $result = $tmptemplate->fetch($object->fk_fac_rec_source); if ($result > 0) { - print '. '.$langs->trans( + print '. '.$langs->trans( "GeneratedFromTemplate", ''.$tmptemplate->ref.'' ).''; @@ -3939,7 +3939,8 @@ elseif ($id > 0 || !empty($ref)) print '
'.$langs->trans('Discounts'); + print ''."\n"; + print '
'.$langs->trans('Discounts'); print ''; $thirdparty = $soc; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 7744e1ffd16..a4751f98e51 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2346,6 +2346,7 @@ function getHelpParamFor($helppagename, $langs) else { // If WIKI URL + $reg = array(); if (preg_match('/^es/i', $langs->defaultlang)) { $helpbaseurl = 'http://wiki.dolibarr.org/index.php/%s'; diff --git a/htdocs/stripe/lib/stripe.lib.php b/htdocs/stripe/lib/stripe.lib.php index 69a353a4733..23771b28c63 100644 --- a/htdocs/stripe/lib/stripe.lib.php +++ b/htdocs/stripe/lib/stripe.lib.php @@ -155,6 +155,9 @@ function html_print_stripe_footer($fromcompany, $langs) { $line1 .= ($line1 ? " - " : "").$langs->transnoentities("CapitalOf", $fromcompany->capital)." ".$langs->transnoentities("Currency".$conf->currency); } + + $reg = array(); + // Prof Id 1 if ($fromcompany->idprof1 && ($fromcompany->country_code != 'FR' || !$fromcompany->idprof2)) { diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 5889cf6d91a..b8f607cfc20 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -605,6 +605,7 @@ if (empty($reshook)) $idprod = 0; if (GETPOST('idprodfournprice', 'alpha') == -1 || GETPOST('idprodfournprice', 'alpha') == '') $idprod = -99; // Same behaviour than with combolist. When not select idprodfournprice is now -99 (to avoid conflict with next action that may return -1, -2, ...) + $reg = array(); if (preg_match('/^idprod_([0-9]+)$/', GETPOST('idprodfournprice', 'alpha'), $reg)) { $idprod = $reg[1]; @@ -842,6 +843,7 @@ if (empty($reshook)) } else { + $reg = array(); $vatratecleaned = $vat_rate; if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index d18c3806363..cfcbb7bd502 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -241,6 +241,9 @@ select.flat, form.flat select { .optiongrey, .opacitymedium { opacity: 0.4; } +.opacitymediumbycolor { + color: rgba(0, 0, 0, 0.4); +} .opacityhigh { opacity: 0.2; } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 625b69e9228..17433b71323 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -459,6 +459,9 @@ select.flat, form.flat select { .optiongrey, .opacitymedium { opacity: 0.5; } +.opacitymediumbycolor { + color: rgba(0, 0, 0, 0.4); +} .opacityhigh { opacity: 0.2; } diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index 3a4f6aee138..9bfe66d9dec 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -525,6 +525,7 @@ class User extends CommonObject // $obj->param is key or param $pagewithoutquerystring = $obj->page; $pagequeries = ''; + $reg = array(); if (preg_match('/^([^\?]+)\?(.*)$/', $pagewithoutquerystring, $reg)) // There is query param { $pagewithoutquerystring = $reg[1]; From b52deb94d49f0d85ab9309dac005493c49c69b82 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Dec 2019 13:25:58 +0100 Subject: [PATCH 2/3] CSS --- htdocs/theme/eldy/global.inc.php | 4 +++- htdocs/theme/md/style.css.php | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index cfcbb7bd502..9cd5a8efd3a 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3605,7 +3605,9 @@ label.radioprivate { .photowithmargin { margin-bottom: 2px; margin-top: 10px; - margin-right: 10px; +} +div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ + margin-right: 15px; } .photowithborder { border: 1px solid #f0f0f0; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 17433b71323..2df7fd86042 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -3722,6 +3722,9 @@ label.radioprivate { margin-bottom: 2px; margin-top: 2px; } +div.divphotoref > a > .photowithmargin { /* Margin right for photo not inside a div.photoref frame only */ + margin-right: 15px; +} .photowithborder { border: 1px solid #f0f0f0; } From a739a4dcc3cecf13a4918c0f01c392dd9e4d274b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Dec 2019 13:47:47 +0100 Subject: [PATCH 3/3] Fix zh_TW --- htdocs/langs/zh_TW/main.lang | 8 ++++---- htdocs/langs/zh_TW/multicurrency.lang | 20 +++++++++++++++++++ htdocs/langs/zh_TW/ticket.lang | 14 +++++++------- htdocs/langs/zh_TW/zapier.lang | 28 +++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 11 deletions(-) create mode 100644 htdocs/langs/zh_TW/multicurrency.lang create mode 100644 htdocs/langs/zh_TW/zapier.lang diff --git a/htdocs/langs/zh_TW/main.lang b/htdocs/langs/zh_TW/main.lang index d54c2c4995d..7e3e2ad9995 100644 --- a/htdocs/langs/zh_TW/main.lang +++ b/htdocs/langs/zh_TW/main.lang @@ -8,10 +8,10 @@ FONTFORPDF=msungstdlight FONTSIZEFORPDF=10 SeparatorDecimal=. SeparatorThousand=, -FormatDateShort=%m / %d /%Y -FormatDateShortInput=%m / %d /%Y -FormatDateShortJava=MM / dd / yyyy -FormatDateShortJavaInput=MM / dd / yyyy +FormatDateShort=%m/%d/%Y +FormatDateShortInput=%m/%d/%Y +FormatDateShortJava=MM/dd/yyyy +FormatDateShortJavaInput=MM/dd/yyyy FormatDateShortJQuery=mm/dd/yy FormatDateShortJQueryInput=mm/dd/yy FormatHourShortJQuery=HH:MI diff --git a/htdocs/langs/zh_TW/multicurrency.lang b/htdocs/langs/zh_TW/multicurrency.lang new file mode 100644 index 00000000000..fc1db29be55 --- /dev/null +++ b/htdocs/langs/zh_TW/multicurrency.lang @@ -0,0 +1,20 @@ +# Dolibarr language file - Source file is en_US - multicurrency +MultiCurrency=多國幣別 +ErrorAddRateFail=增加的利率錯誤 +ErrorAddCurrencyFail=增加的幣別錯誤 +ErrorDeleteCurrencyFail=刪除失敗的錯誤 +multicurrency_syncronize_error=同步錯誤:%s +MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=使用文件的日期尋找貨幣匯率,而不是使用最新的已知匯率 +multicurrency_useOriginTx=從另一個項目新增項目時,請保持原始項目的原始匯率(否則使用最新的已知匯率) +CurrencyLayerAccount=匯率應用程式介面 +CurrencyLayerAccount_help_to_synchronize=您必須在網站%s上新增一個帳戶才能使用此功能。
獲取您的API密鑰
如果您使用免費帳戶,則無法更改來源貨幣 (默認情況下為USD)。
如果您的主要貨幣不是美元,則應用程序將自動對其進行重新計算。

您每月只能進行1000次同步。 +multicurrency_appId=API密鑰 +multicurrency_appCurrencySource=來源貨幣 +multicurrency_alternateCurrencySource=備用來源貨幣 +CurrenciesUsed=已使用幣別 +CurrenciesUsed_help_to_add=增加您需要在提案訂單等上使用的不同貨幣和費率。 +rate=利率 +MulticurrencyReceived=已收,原來幣別 +MulticurrencyRemainderToTake=剩餘金額,原始貨幣 +MulticurrencyPaymentAmount=付款金額,原來幣別 +AmountToOthercurrency=金額(以接收帳戶的貨幣表示) diff --git a/htdocs/langs/zh_TW/ticket.lang b/htdocs/langs/zh_TW/ticket.lang index 0d9dc383561..fb4b6ab4a3c 100644 --- a/htdocs/langs/zh_TW/ticket.lang +++ b/htdocs/langs/zh_TW/ticket.lang @@ -28,14 +28,14 @@ Permission56004=管理服務單 Permission56005=查看所有合作方的服務單(對外部用戶無效,始終僅限於他們所依賴的合作方) TicketDictType=服務單-類型 -TicketDictCategory=Ticket - Groupes -TicketDictSeverity=Ticket - Severities -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketDictCategory=服務單-組別 +TicketDictSeverity=服務單-嚴重程度 +TicketTypeShortBUGSOFT=軟體故障 +TicketTypeShortBUGHARD=設備故障 +TicketTypeShortCOM=商業問題 -TicketTypeShortHELP=Request for functionnal help -TicketTypeShortISSUE=Issue, bug or problem +TicketTypeShortHELP=請求有用的幫助 +TicketTypeShortISSUE=錯誤或問題 TicketTypeShortREQUEST=Change or enhancement request TicketTypeShortPROJET=項目 TicketTypeShortOTHER=其他 diff --git a/htdocs/langs/zh_TW/zapier.lang b/htdocs/langs/zh_TW/zapier.lang new file mode 100644 index 00000000000..56342b2ccc6 --- /dev/null +++ b/htdocs/langs/zh_TW/zapier.lang @@ -0,0 +1,28 @@ +# Copyright (C) 2019 Frédéric FRANCE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Generic +# + +# Module label 'ModuleZapierForDolibarrName' +ModuleZapierForDolibarrName = Zapier for Dolibarr +# Module description 'ModuleZapierForDolibarrDesc' +ModuleZapierForDolibarrDesc = Zapier的Dolibarr模組 + +# +# Admin page +# +ZapierForDolibarrSetup = Zapier的設置