diff --git a/.github/workflows/exakat.yml b/.github/workflows/exakat.yml index 1d134ff2455..528626e0308 100644 --- a/.github/workflows/exakat.yml +++ b/.github/workflows/exakat.yml @@ -12,7 +12,7 @@ jobs: exakat: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Exakat uses: docker://exakat/exakat-ga with: diff --git a/.tx/config b/.tx/config index d4ca5e73180..ca169bfcc50 100644 --- a/.tx/config +++ b/.tx/config @@ -140,18 +140,6 @@ source_file = htdocs/langs/en_US/exports.lang source_lang = en_US type = MOZILLAPROPERTIES -[dolibarr.externalsite] -file_filter = htdocs/langs//externalsite.lang -source_file = htdocs/langs/en_US/externalsite.lang -source_lang = en_US -type = MOZILLAPROPERTIES - -[dolibarr.ftp] -file_filter = htdocs/langs//ftp.lang -source_file = htdocs/langs/en_US/ftp.lang -source_lang = en_US -type = MOZILLAPROPERTIES - [dolibarr.help] file_filter = htdocs/langs//help.lang source_file = htdocs/langs/en_US/help.lang diff --git a/COPYRIGHT b/COPYRIGHT index de293e3867e..45b3047a375 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -34,14 +34,15 @@ ParseDown 1.6 MIT License Yes PCLZip 2.8.4 LGPL-3+ Yes Library to zip/unzip files PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers PHPSpreadSheet 1.8.2 LGPL-2.1+ Yes Read/Write XLS files, read ODS files -php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP +php-iban 4.1 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests -PSR/Logs 1.0 Library for logs (used by DebugBar) +PSR/Logs 1.0 MIT License Yes Library for logs (used by DebugBar) PSR/simple-cache ? MIT License Yes Library for cache (used by PHPSpreadSheet) Restler 3.1.1 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer) Sabre 3.2.2 BSD Yes DAV support Swift Mailer 5.4.2-DEV MIT License Yes Comprehensive mailing tools for PHP +Symfony/var-dumper ??? MIT License Yes Library to make var dump (used by DebugBar) Stripe 7.67.0 MIT Licence Yes Library for Stripe module TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index f2137d84af9..02b95cfd043 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -168,10 +168,13 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) { $object->labelshort = GETPOST('labelshort', 'alpha'); $result = $object->update($user); + if ($result > 0) { $urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"] . "?id=" . $id); header("Location: " . $urltogo); exit(); + } elseif ($result == -2) { + setEventMessages($langs->trans("ErrorAccountNumberAlreadyExists", $object->account_number), null, 'errors'); } else { setEventMessages($object->error, null, 'errors'); } diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 44fbef7429e..895437ab58b 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -141,7 +141,7 @@ if ($action == 'update') { } } -if ($action == 'setdisableauxiliaryaccountoncustomerdeposit') { +if ($action == 'setACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT') { $setDisableAuxiliaryAccountOnCustomerDeposit = GETPOST('value', 'int'); $res = dolibarr_set_const($db, "ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT", $setDisableAuxiliaryAccountOnCustomerDeposit, 'yesno', 0, '', $conf->entity); if (!($res > 0)) { @@ -266,16 +266,15 @@ print $formaccounting->select_account(getDolGlobalString('ACCOUNTING_ACCOUNT_CUS print ''; print ''; - -if (!empty($conf->societe->enabled)) { +if (!empty($conf->societe->enabled) && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') && getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT') != '-1') { print ''; print '' . img_picto('', 'bill', 'class="pictofixedwidth"') . $langs->trans("UseAuxiliaryAccountOnCustomerDeposit") . ''; if (getDolGlobalInt('ACCOUNTING_ACCOUNT_CUSTOMER_USE_AUXILIARY_ON_DEPOSIT')) { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', 'warning'); print ''; } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 0210fa10e75..af569e08ae3 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -358,7 +358,7 @@ foreach ($list as $key) { print ''.$label.''; // Value print ''; - print ''; + print ''; print ''; print ''; diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 8cccef2d342..710443c9bad 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -347,8 +347,8 @@ class AccountingAccount extends CommonObject /** * Update record * - * @param User $user Use making update - * @return int <0 if KO, >0 if OK + * @param User $user User making update + * @return int <0 if KO (-2 = duplicate), >0 if OK */ public function update($user) { @@ -378,6 +378,12 @@ class AccountingAccount extends CommonObject $this->db->commit(); return 1; } else { + if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -2; + } + $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -592,16 +598,9 @@ class AccountingAccount extends CommonObject if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } + + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->tms); } @@ -733,7 +732,7 @@ class AccountingAccount extends CommonObject * @param FactureLigne|SupplierInvoiceLine $factureDet Facture Det * @param array $accountingAccount Array of Account account * @param string $type Customer / Supplier - * @return array Accounting accounts suggested + * @return array|int Accounting accounts suggested or < 0 if technical error. */ public function getAccountingCodeToBind(Societe $buyer, Societe $seller, Product $product, $facture, $factureDet, $accountingAccount = array(), $type = '') { diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 4f92b9766ea..0096ba9a285 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -634,7 +634,7 @@ if (empty($reshook)) { exit; } } else { - $errmesg = $object->error; + setEventMessages($object->error, null, 'errors'); } } diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 39b6eaa97d0..c860a19d588 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2777,24 +2777,10 @@ class Adherent extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_mod) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_mod); - $this->user_modification = $muser; - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_validation_id = $obj->fk_user_valid; + $this->user_modification_id = $obj->fk_user_mod; $this->date_creation = $this->db->jdate($obj->datec); $this->date_validation = $this->db->jdate($obj->datev); $this->date_modification = $this->db->jdate($obj->datem); diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index c6d321707dc..e48ce5f2382 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -46,26 +46,26 @@ $error = 0; */ $parameters = array(); -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); } if (($action == 'update' && !GETPOST("cancel", 'alpha')) || ($action == 'updateedit')) { - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NAME", GETPOST("nom", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ADDRESS", GETPOST("address", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_TOWN", GETPOST("town", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_ZIP", GETPOST("zipcode", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_STATE", GETPOST("state_id", 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_REGION", GETPOST("region_code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_COUNTRY", GETPOST('country_id', 'int'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_PHONE", GETPOST("tel", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_FAX", GETPOST("fax", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_MAIL", GETPOST("mail", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_WEB", GETPOST("web", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_CODE", GETPOST("code", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_INFO_ACCOUNTANT_NOTE", GETPOST("note", 'restricthtml'), 'chaine', 0, '', $conf->entity); if ($action != 'updateedit' && !$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); @@ -74,6 +74,7 @@ if (($action == 'update' && !GETPOST("cancel", 'alpha')) } } + /* * View */ @@ -117,7 +118,7 @@ print ''; print ''; print ''."\n"; -// Name +// Name of Accountant Company print ''."\n"; @@ -125,9 +126,11 @@ print ''."\n"; +// ZIP print ''."\n"; +// Town/City print ''."\n"; @@ -140,21 +143,25 @@ if ($user->admin) { } print ''."\n"; +// State print ''."\n"; +// Telephone print ''; print ''."\n"; +// Fax print ''; print ''."\n"; +// eMail print ''; diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index ee0fcd5d130..57c32d79318 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -55,6 +55,16 @@ if ($action == 'setbarcodeproducton') { $res = dolibarr_del_const($db, "BARCODE_PRODUCT_ADDON_NUM", $conf->entity); } +if ($action == 'setbarcodethirdpartyon') { + $barcodenumberingmodule = GETPOST('value', 'alpha'); + $res = dolibarr_set_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $barcodenumberingmodule, 'chaine', 0, '', $conf->entity); + if ($barcodenumberingmodule == 'mod_barcode_thirdparty_standard' && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $res = dolibarr_set_const($db, "BARCODE_STANDARD_THIRDPARTY_MASK", '020{000000000}', 'chaine', 0, '', $conf->entity); + } +} elseif ($action == 'setbarcodethirdpartyoff') { + $res = dolibarr_del_const($db, "BARCODE_THIRDPARTY_ADDON_NUM", $conf->entity); +} + if ($action == 'setcoder') { $coder = GETPOST('coder', 'alpha'); $code_id = GETPOST('code_id', 'int'); @@ -241,6 +251,66 @@ if ($conf->product->enabled) { print ''; } +// Select barcode numbering module +if ($conf->societe->enabled) { + print load_fiche_titre($langs->trans("BarCodeNumberManager")." (".$langs->trans("ThirdParty").")", '', ''); + + print '
'; + print '
'.$langs->trans("CompanyInfo").''.$langs->trans("Value").'
'; print 'global->MAIN_INFO_ACCOUNTANT_NAME) ? ' autofocus="autofocus"' : '').'>
'; print '
'; print '
'; print '
'; print img_picto('', 'state', 'class="pictofixedwidth"'); print $formcompany->select_state((GETPOSTISSET('state_id') ? GETPOST('state_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_STATE) ? $conf->global->MAIN_INFO_ACCOUNTANT_STATE : '')), (GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : (!empty($conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY) ? $conf->global->MAIN_INFO_ACCOUNTANT_COUNTRY : '')), 'state_id'); print '
'; print img_picto('', 'object_phoning', '', false, 0, 0, '', 'pictofixedwidth'); print '
'; print img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'pictofixedwidth'); print '
'; print img_picto('', 'object_email', '', false, 0, 0, '', 'pictofixedwidth'); print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + + $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); + + foreach ($dirbarcodenum as $dirroot) { + $dir = dol_buildpath($dirroot, 0); + + $handle = @opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) { + $file = substr($file, 0, dol_strlen($file) - 4); + + try { + dol_include_once($dirroot.$file.'.php'); + } catch (Exception $e) { + dol_syslog($e->getMessage(), LOG_ERR); + } + + $modBarCode = new $file(); + print ''; + print ''; + print '\n"; + + if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM) && $conf->global->BARCODE_THIRDPARTY_ADDON_NUM == "$file") { + print ''; + } else { + print ''; + } + print ''; + print "\n"; + } + } + closedir($handle); + } + } + print "
'.$langs->trans("Name").''.$langs->trans("Description").''.$langs->trans("Example").''.$langs->trans("Status").''.$langs->trans("ShortInfo").'
'.(isset($modBarCode->name) ? $modBarCode->name : $modBarCode->nom)."\n"; + print $modBarCode->info($langs); + print ''.$modBarCode->getExample($langs)."'; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + $s = $modBarCode->getToolTip($langs, null, -1); + print $form->textwithpicto('', $s, 1); + print '
\n"; + print ''; +} /* * CHOIX ENCODAGE diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 5ad497205ab..8678ba3aeb3 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -656,7 +656,7 @@ if ($mode == 'login') { print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') '; } if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) { - print '' . img_delete($langs->trans("Delete")) . ''; + print '' . img_delete($langs->trans("Delete")) . ''; if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) { print '   '; print ''; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index e01c3142cc0..6d461b525bc 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -54,10 +54,12 @@ if (!empty($conf->eventorganization->enabled)) { $langs->loadLangs($langsArray); +$toselect = GETPOST('toselect', 'array'); $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; $massaction = GETPOST('massaction', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $mode = GETPOST('mode', 'aZ09'); +$optioncss = GETPOST('optioncss', 'alpha'); $id = GETPOST('id', 'int'); $rowid = GETPOST('rowid', 'alpha'); @@ -77,6 +79,7 @@ $actl[1] = img_picto($langs->trans("Activated"), 'switch_on', 'class="size15x"') $listoffset = GETPOST('listoffset', 'alpha'); $listlimit = GETPOST('listlimit', 'alpha') > 0 ?GETPOST('listlimit', 'alpha') : 1000; +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index c91af2fcc36..d6487093e41 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -76,10 +76,15 @@ if ($action == 'add_currency') { $currency->code = $code; $currency->name = !empty($langs->cache_currencies[$code]['label']) ? $langs->cache_currencies[$code]['label'].' ('.$langs->getCurrencySymbol($code).')' : $code; + if (empty($currency->code) || $currency->code == '-1') { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Currency")), null, 'errors'); + $error++; + } if (empty($rate)) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, 'errors'); $error++; } + if (!$error) { if ($currency->create($user) > 0) { if ($currency->addRate($rate)) { @@ -296,7 +301,7 @@ print ''; print ''; print ''."\n"; -print ''."\n"; +print ''."\n"; print ''; print ''; @@ -304,17 +309,19 @@ print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; print ''; -print ''; +print ''; print ''; print ''; diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index a0d82d1d6bd..772055f0809 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Raphaël Doursenaud + * Copyright (C) 2022 Laurent Destailleur * * 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 @@ -43,23 +44,40 @@ if (!$user->admin) { } $action = GETPOST('action', 'aZ09'); +$provider = GETPOST('provider', 'aZ09'); +$label = GETPOST('label', 'aZ09'); + +$error = 0; /* * Actions */ -if ($action == 'update') { - $error = 0; +if ($action == 'add') { // $provider is OAUTH_XXX + if ($provider && $provider != '-1') { + $constname = strtoupper($provider).($label ? '-'.$label : '').'_ID'; - foreach ($list as $constname) { - $constvalue = GETPOST($constname[1], 'alpha'); - if (!dolibarr_set_const($db, $constname[1], $constvalue, 'chaine', 0, '', $conf->entity)) { + if (getDolGlobalString($constname)) { + setEventMessages($langs->trans("AOAuthEntryForThisProviderAndLabelAlreadyHasAKey"), null, 'errors'); $error++; + } else { + dolibarr_set_const($db, $constname, 'ToComplete', 'chaine', 0, '', $conf->entity); + setEventMessages($langs->trans("OAuthProviderAdded"), null); } - $constvalue = GETPOST($constname[2], 'alpha'); - if (!dolibarr_set_const($db, $constname[2], $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; + } +} +if ($action == 'update') { + foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.+_ID$/', $key)) { + $constvalue = str_replace('_ID', '', $key); + if (!dolibarr_set_const($db, $constvalue.'_ID', GETPOST($constvalue.'_ID'), 'chaine', 0, '', $conf->entity)) { + $error++; + } + // If we reset this provider, we also remove the secret + if (!dolibarr_set_const($db, $constvalue.'_SECRET', GETPOST($constvalue.'_ID') ? GETPOST($constvalue.'_SECRET') : '', 'chaine', 0, '', $conf->entity)) { + $error++; + } } } @@ -70,6 +88,7 @@ if ($action == 'update') { } } + /* * View */ @@ -83,24 +102,72 @@ print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup'); print '
'; print ''; -print ''; +print ''; $head = oauthadmin_prepare_head(); -print dol_get_fiche_head($head, 'services', '', -1, 'technic'); +print dol_get_fiche_head($head, 'services', '', -1, ''); print ''.$langs->trans("ListOfSupportedOauthProviders").'

'; + +print ''; +print ajax_combobox('provider'); +print ' '; +print ' '; +print ''; + +print '
'; +print '
'; + + +print '
'; +print ''; +print ''; + print '
'; print '
'.$form->textwithpicto($langs->trans("CurrenciesUsed"), $langs->transnoentitiesnoconv("CurrenciesUsed_help_to_add")).''.$langs->trans("Rate").''.$langs->trans("Rate").' / '.$langs->getCurrencySymbol($conf->currency).'
'.$form->selectCurrency('', 'code', 1).''.$form->selectCurrency('', 'code', 1, '1').''; print ' '; -print ''; +print ''; print '
'.$conf->currency.$form->textwithpicto(' ', $langs->trans("BaseCurrency")).''.$conf->currency; +print ' ('.$langs->getCurrencySymbol($conf->currency).')'; +print $form->textwithpicto(' ', $langs->trans("BaseCurrency")).'1
'; $i = 0; +//var_dump($list); +foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $provider = preg_replace('/_ID$/', '', $key); + $listinsetup[] = array($provider.'_NAME', $provider.'_ID', $provider.'_SECRET', 'OAUTH Provider '.str_replace('OAUTH_', '', $provider)); + } +} + // $list is defined into oauth.lib.php to the list of supporter OAuth providers. -foreach ($list as $key) { +foreach ($listinsetup as $key) { $supported = 0; - $keyforsupportedoauth2array = $key[0]; + $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME + $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); + if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { + $keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array); + } else { + $keyforprovider = ''; + } + $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; if (in_array($keyforsupportedoauth2array, array_keys($supportedoauth2array))) { $supported = 1; @@ -117,10 +184,15 @@ foreach ($list as $key) { print ''; print ''; print ''; @@ -140,13 +212,13 @@ foreach ($list as $key) { // Api Id print ''; - print ''; + print ''; print ''; // Api Secret print ''; - print ''; + print ''; print ''; } diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 73a9139f856..b2830f95743 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -129,7 +129,7 @@ print load_fiche_titre($langs->trans('ConfigOAuth'), $linkback, 'title_setup'); $head = oauthadmin_prepare_head(); -print dol_get_fiche_head($head, 'tokengeneration', '', -1, 'technic'); +print dol_get_fiche_head($head, 'tokengeneration', '', -1, ''); if (GETPOST('error')) { setEventMessages(GETPOST('error'), null, 'errors'); @@ -138,19 +138,32 @@ if (GETPOST('error')) { if ($mode == 'setup' && $user->admin) { print ''.$langs->trans("OAuthSetupForLogin")."

\n"; - foreach ($list as $key) { + //var_dump($list); + foreach ($conf->global as $key => $val) { + if (!empty($val) && preg_match('/^OAUTH_.*_ID$/', $key)) { + $provider = preg_replace('/_ID$/', '', $key); + $listinsetup[] = array($provider.'_NAME', $provider.'_ID', $provider.'_SECRET', 'OAUTH Provider '.str_replace('OAUTH_', '', $provider)); + } + } + + $oauthstateanticsrf = bin2hex(random_bytes(128/8)); + + // $list is defined into oauth.lib.php to the list of supporter OAuth providers. + foreach ($listinsetup as $key) { $supported = 0; - $keyforsupportedoauth2array = $key[0]; - - if (in_array($keyforsupportedoauth2array, array_keys($supportedoauth2array))) { - $supported = 1; - } - if (!$supported) { - continue; // show only supported + $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME + $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array); + if (preg_match('/^.*-/', $keyforsupportedoauth2array)) { + $keyforprovider = preg_replace('/^.*-/', '', $keyforsupportedoauth2array); + } else { + $keyforprovider = ''; } + $keyforsupportedoauth2array = preg_replace('/-.*$/', '', $keyforsupportedoauth2array); + $keyforsupportedoauth2array = 'OAUTH_'.$keyforsupportedoauth2array.'_NAME'; - $OAUTH_SERVICENAME = empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name']; + $OAUTH_SERVICENAME = (empty($supportedoauth2array[$keyforsupportedoauth2array]['name']) ? 'Unknown' : $supportedoauth2array[$keyforsupportedoauth2array]['name'].($keyforprovider ? '-'.$keyforprovider : '')); // Define $shortscope, $urltorenew, $urltodelete, $urltocheckperms // TODO Use array $supportedoauth2array @@ -158,6 +171,8 @@ if ($mode == 'setup' && $user->admin) { // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). // We pass this param list in to 'state' because we need it before and after the redirect. $shortscope = 'user,public_repo'; + + // Note: github does not accept csrf key inside the state parameter (only know values) $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://github.com/settings/applications/'; @@ -177,17 +192,18 @@ if ($mode == 'setup' && $user->admin) { $shortscope.=',gmail_full'; } - $oauthstateanticsrf = bin2hex(random_bytes(128/8)); - $_SESSION['oauthstateanticsrf'] = $shortscope.'-'.$oauthstateanticsrf; - $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'-'.$oauthstateanticsrf.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltocheckperms = 'https://security.google.com/settings/security/permissions'; } elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_TEST_NAME') { + $shortscope = 'none'; + $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; } elseif ($keyforsupportedoauth2array == 'OAUTH_STRIPE_LIVE_NAME') { + $shortscope = 'none'; + $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); $urltodelete = ''; $urltocheckperms = ''; @@ -196,7 +212,7 @@ if ($mode == 'setup' && $user->admin) { $urltodelete = ''; $urltocheckperms = ''; } - + $urltorenew .= '&keyforprovider='.$keyforprovider; // Show value of token $tokenobj = null; @@ -220,7 +236,6 @@ if ($mode == 'setup' && $user->admin) { if (is_object($tokenobj)) { $expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30)); } - if ($key[1] != '' && $key[2] != '') { if (is_object($tokenobj)) { $refreshtoken = $tokenobj->getRefreshToken(); @@ -249,6 +264,11 @@ if ($mode == 'setup' && $user->admin) { print ''; print ''; print ''; @@ -299,9 +319,11 @@ if ($mode == 'setup' && $user->admin) { //var_dump($key); print $langs->trans("Token").''; print ''; print ''; //var_dump($key); - print $langs->trans("TOKEN_REFRESH").''; + print $langs->trans("TOKEN_REFRESH"); + print ''; print ''; print ''; @@ -327,7 +350,8 @@ if ($mode == 'setup' && $user->admin) { print ''; print ''; //var_dump($key); - print $langs->trans("TOKEN_EXPIRED").''; + print $langs->trans("TOKEN_EXPIRED"); + print ''; print ''; @@ -337,7 +361,8 @@ if ($mode == 'setup' && $user->admin) { print ''; print ''; //var_dump($key); - print $langs->trans("TOKEN_EXPIRE_AT").''; + print $langs->trans("TOKEN_EXPIRE_AT"); + print ''; print ''; @@ -399,17 +424,18 @@ if ($mode == 'userconf' && $user->admin) { print ''; print ''; print "\n"; - $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; + $sql = "SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login"; + $sql .= " FROM ".MAIN_DB_PREFIX."printing as p, ".MAIN_DB_PREFIX."user as u WHERE p.userid = u.rowid"; $resql = $db->query($sql); - while ($row = $db->fetch_array($resql)) { + while ($obj = $db->fetch_object($resql)) { print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; print "\n"; } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 4968e75989a..1e667e7abb4 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -554,7 +554,7 @@ if ($mode == 'searchkey') { break; } print ''; } else { print '"; } // Defaut print ''; // Bank Account diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 1ad6f121848..7f1dc549054 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1444,7 +1444,7 @@ class Propal extends CommonObject // Clear fields $object->user_author = $user->id; - $object->user_valid = ''; + $object->user_valid = 0; $object->date = $now; $object->datep = $now; // deprecated $object->fin_validite = $object->date + ($object->duree_validite * 24 * 3600); @@ -2614,8 +2614,22 @@ class Propal extends CommonObject $newprivatenote = dol_concatdesc($this->note_private, $note); + if (empty($conf->global->PROPALE_KEEP_OLD_SIGNATURE_INFO)) { + $date_signature = $now; + $fk_user_signature = $user->id; + } else { + $this->info($this->id); + if (!isset($this->date_signature) || $this->date_signature == '') { + $date_signature = $now; + $fk_user_signature = $user->id; + } else { + $date_signature = $this->date_signature; + $fk_user_signature = $this->user_signature->id; + } + } + $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; - $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($now)."', fk_user_signature=".$user->id; + $sql .= " SET fk_statut = ".((int) $status).", note_private = '".$this->db->escape($newprivatenote)."', date_signature='".$this->db->idate($date_signature)."', fk_user_signature=".$fk_user_signature; $sql .= " WHERE rowid = ".((int) $this->id); $resql = $this->db->query($sql); @@ -2662,7 +2676,7 @@ class Propal extends CommonObject $this->oldcopy= clone $this; $this->statut = $status; $this->status = $status; - $this->date_signature = $now; + $this->date_signature = $date_signature; $this->note_private = $newprivatenote; } @@ -3258,7 +3272,7 @@ class Propal extends CommonObject public function info($id) { $sql = "SELECT c.rowid, "; - $sql .= " c.datec, c.date_valid as datev, c.date_signature, c.date_cloture as dateo,"; + $sql .= " c.datec, c.date_valid as datev, c.date_signature, c.date_cloture,"; $sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_signature, c.fk_user_cloture"; $sql .= " FROM ".MAIN_DB_PREFIX."propal as c"; $sql .= " WHERE c.rowid = ".((int) $id); @@ -3274,7 +3288,7 @@ class Propal extends CommonObject $this->date_creation = $this->db->jdate($obj->datec); $this->date_validation = $this->db->jdate($obj->datev); $this->date_signature = $this->db->jdate($obj->date_signature); - $this->date_cloture = $this->db->jdate($obj->dateo); + $this->date_cloture = $this->db->jdate($obj->date_cloture); $cuser = new User($this->db); $cuser->fetch($obj->fk_user_author); @@ -3673,6 +3687,9 @@ class Propal extends CommonObject if (!empty($this->total_ttc)) { $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); } + if (!empty($this->date)) { + $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); + } if (!empty($this->delivery_date)) { $label .= '
'.$langs->trans('DeliveryDate').': '.dol_print_date($this->delivery_date, 'dayhour'); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index b74d458ba3a..9a93e8a5047 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -507,7 +507,7 @@ class Commande extends CommonOrder $sql .= " SET ref = '".$this->db->escape($num)."',"; $sql .= " fk_statut = ".self::STATUS_VALIDATED.","; $sql .= " date_valid='".$this->db->idate($now)."',"; - $sql .= " fk_user_valid = ".((int) $user->id).","; + $sql .= " fk_user_valid = ".($user->id > 0 ? (int) $user->id : "null").","; $sql .= " fk_user_modif = ".((int) $user->id); $sql .= " WHERE rowid = ".((int) $this->id); @@ -1234,7 +1234,8 @@ class Commande extends CommonOrder // Clear fields $this->user_author_id = $user->id; - $this->user_valid = ''; + $this->user_valid = 0; // deprecated + $this->user_validation_id = 0; $this->date = dol_now(); $this->date_commande = dol_now(); $this->date_creation = ''; @@ -1882,8 +1883,11 @@ class Commande extends CommonOrder $this->status = $obj->fk_statut; $this->user_author_id = $obj->fk_user_author; - $this->user_valid = $obj->fk_user_valid; - $this->user_modification = $obj->fk_user_modif; + $this->user_creation_id = $obj->fk_user_author; + $this->user_validation_id = $obj->fk_user_valid; + $this->user_valid = $obj->fk_user_valid; // deprecated + $this->user_modification_id = $obj->fk_user_modif; + $this->user_modification = $obj->fk_user_modif; $this->total_ht = $obj->total_ht; $this->total_tva = $obj->total_tva; $this->total_localtax1 = $obj->total_localtax1; @@ -3348,7 +3352,7 @@ class Commande extends CommonOrder $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; $sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").","; - $sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").","; + $sql .= " fk_user_valid=".((isset($this->user_valid) && $this->user_valid > 0) ? $this->user_valid : "null").","; $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; $sql .= " deposit_percent=".(! empty($this->deposit_percent) ? strval($this->deposit_percent) : "null").","; @@ -3837,21 +3841,13 @@ class Commande extends CommonOrder $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; + $this->user_creation_id = $obj->fk_user_author; } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; + $this->user_validation_id = $obj->fk_user_valid; } - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; + $this->user_closing_id = $obj->fk_user_cloture; } $this->date_creation = $this->db->jdate($obj->datec); diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 13fdffcb3c9..7a7097ecb71 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -1707,19 +1707,20 @@ class Account extends CommonObject */ public function initAsSpecimen() { + // Example of IBAN FR7630001007941234567890185 $this->specimen = 1; $this->ref = 'MBA'; $this->label = 'My Big Company Bank account'; $this->bank = 'MyBank'; $this->courant = Account::TYPE_CURRENT; $this->clos = Account::STATUS_OPEN; - $this->code_banque = '123'; - $this->code_guichet = '456'; - $this->number = 'ABC12345'; - $this->cle_rib = '50'; + $this->code_banque = '30001'; + $this->code_guichet = '00794'; + $this->number = '12345678901'; + $this->cle_rib = '85'; $this->bic = 'AA12'; - $this->iban = 'FR999999999'; - $this->domiciliation = 'My bank address'; + $this->iban = 'FR7630001007941234567890185'; + $this->domiciliation = 'Banque de France'; $this->proprio = 'Owner'; $this->owner_address = 'Owner address'; $this->country_id = 1; diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 59c2b373d1a..029c5b5f223 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -84,7 +84,7 @@ if ($action == 'validate' && $user->rights->deplacement->creer) { } } } elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { - $result = $object->delete($id); + $result = $object->delete($user); if ($result >= 0) { header("Location: index.php"); exit; diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index c09943540bc..fb4f9eb17d4 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -1,4 +1,6 @@ * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin @@ -310,13 +312,15 @@ class Deplacement extends CommonObject /** * Delete record * - * @param int $id Id of record to delete + * @param User $user USer that Delete * @return int <0 if KO, >0 if OK */ - public function delete($id) + public function delete($user) { $this->db->begin(); + $id = $this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."deplacement WHERE rowid = ".((int) $id); dol_syslog(get_class($this)."::delete", LOG_DEBUG); @@ -469,7 +473,7 @@ class Deplacement extends CommonObject public function info($id) { $sql = 'SELECT c.rowid, c.datec, c.fk_user_author, c.fk_user_modif,'; - $sql .= ' c.tms'; + $sql .= ' c.tms as datem'; $sql .= ' FROM '.MAIN_DB_PREFIX.'deplacement as c'; $sql .= ' WHERE c.rowid = '.((int) $id); @@ -480,18 +484,11 @@ class Deplacement extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } + + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->tms); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); } else { diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index a886f8a49c8..28597b90247 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4182,7 +4182,7 @@ if ($action == 'create') { // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"), 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')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 310); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?facid='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes", 1, 340, 600); } // Confirmation du classement abandonne diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index 8cfdcf7e02b..d87317e2420 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -1488,7 +1488,7 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$i.''.$CrLf); fputs($this->file, ' '.$this->total.''.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf); + fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1604,7 +1604,7 @@ class BonPrelevement extends CommonObject fputs($this->file, ' '.$i.''.$CrLf); fputs($this->file, ' '.$this->total.''.$CrLf); fputs($this->file, ' '.$CrLf); - fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf); + fputs($this->file, ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); fputs($this->file, ' '.$CrLf); @@ -1854,16 +1854,16 @@ class BonPrelevement extends CommonObject $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; - $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ''))).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).''.$CrLf; $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => "")); if (trim($addressline1)) { - $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if (trim($addressline2)) { - $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_DEBITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_DEBITOR .= ' '.$CrLf; $XML_DEBITOR .= ' '.$CrLf; @@ -1908,14 +1908,14 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.round($row_somme, 2).''.$CrLf; $XML_CREDITOR .= ' '.$CrLf; /* - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$Rum.''.$CrLf; - $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf; - $XML_CREDITOR .= ' false'.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.$CrLf; - */ + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$Rum.''.$CrLf; + $XML_CREDITOR .= ' '.$DtOfSgntr.''.$CrLf; + $XML_CREDITOR .= ' false'.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + $XML_CREDITOR .= ' '.$CrLf; + */ //$XML_CREDITOR .= ' SLEV'.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; @@ -1923,16 +1923,16 @@ class BonPrelevement extends CommonObject $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; - $XML_CREDITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom)))).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))).''.$CrLf; $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$row_country_code.''.$CrLf; $addressline1 = strtr($row_address, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($row_zip.(($row_zip && $row_town) ? ' ' : ''.$row_town), array(CHR(13) => ", ", CHR(10) => "")); if (trim($addressline1)) { - $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if (trim($addressline2)) { - $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_CREDITOR .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_CREDITOR .= ' '.$CrLf; $XML_CREDITOR .= ' '.$CrLf; @@ -2096,16 +2096,16 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$dateTime_ETAD.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => "")); if ($addressline1) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if ($addressline2) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2120,11 +2120,11 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV @@ -2162,16 +2162,16 @@ class BonPrelevement extends CommonObject } $XML_SEPA_INFO .= ' '.dol_print_date($dateTime_ETAD, 'dayrfc').''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ''))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; $addressline1 = strtr($configuration->global->MAIN_INFO_SOCIETE_ADDRESS, array(CHR(13) => ", ", CHR(10) => "")); $addressline2 = strtr($configuration->global->MAIN_INFO_SOCIETE_ZIP.(($configuration->global->MAIN_INFO_SOCIETE_ZIP || ' '.$configuration->global->MAIN_INFO_SOCIETE_TOWN) ? ' ' : '').$configuration->global->MAIN_INFO_SOCIETE_TOWN, array(CHR(13) => ", ", CHR(10) => "")); if ($addressline1) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline1), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } if ($addressline2) { - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ''), 70, 'right', 'UTF-8', 1)).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_trunc(dol_string_nospecial(dol_string_unaccent($addressline2), ' '), 70, 'right', 'UTF-8', 1)).''.$CrLf; } $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2186,26 +2186,26 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; /* $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale)))).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($this->raison_sociale), ' '))).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$country[1].''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), '')).''.$CrLf; - $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), '')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ADDRESS), ' ')).''.$CrLf; + $XML_SEPA_INFO .= ' '.dolEscapeXML(dol_string_nospecial(dol_string_unaccent($conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN), ' ')).''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV /*$XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' SEPA'.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf; - $XML_SEPA_INFO .= ' '.$CrLf;*/ + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$this->emetteur_ics.''.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' SEPA'.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf; + $XML_SEPA_INFO .= ' '.$CrLf;*/ } } else { fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf); @@ -2343,59 +2343,59 @@ class BonPrelevement extends CommonObject } /* - if ($mode == 'direct_debit') { - $sql = "SELECT b.rowid, f.datedue as datefin"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; - $sql .= " WHERE f.entity IN (".getEntity('facture').")"; - $sql .= " AND f.total_ttc > 0"; - } else { - $sql = "SELECT b.rowid, f.datedue as datefin"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; - $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")"; - $sql .= " AND f.total_ttc > 0"; - } + if ($mode == 'direct_debit') { + $sql = "SELECT b.rowid, f.datedue as datefin"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= " WHERE f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.total_ttc > 0"; + } else { + $sql = "SELECT b.rowid, f.datedue as datefin"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql .= " WHERE f.entity IN (".getEntity('facture_fourn').")"; + $sql .= " AND f.total_ttc > 0"; + } - $resql = $this->db->query($sql); - if ($resql) { - $langs->load("banks"); - $now = dol_now(); + $resql = $this->db->query($sql); + if ($resql) { + $langs->load("banks"); + $now = dol_now(); - $response = new WorkboardResponse(); - if ($mode == 'direct_debit') { - $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("PendingDirectDebitToComplete"); - $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort"); - $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank'; - } else { - $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("PendingCreditTransferToComplete"); - $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort"); - $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank'; - } - $response->img = img_object('', "payment"); + $response = new WorkboardResponse(); + if ($mode == 'direct_debit') { + $response->warning_delay = $conf->prelevement->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("PendingDirectDebitToComplete"); + $response->labelShort = $langs->trans("PendingDirectDebitToCompleteShort"); + $response->url = DOL_URL_ROOT.'/compta/prelevement/index.php?leftmenu=checks&mainmenu=bank'; + } else { + $response->warning_delay = $conf->paymentbybanktransfer->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("PendingCreditTransferToComplete"); + $response->labelShort = $langs->trans("PendingCreditTransferToCompleteShort"); + $response->url = DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php?leftmenu=checks&mainmenu=bank'; + } + $response->img = img_object('', "payment"); - while ($obj = $this->db->fetch_object($resql)) { - $response->nbtodo++; + while ($obj = $this->db->fetch_object($resql)) { + $response->nbtodo++; - if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) { - $response->nbtodolate++; - } - } + if ($this->db->jdate($obj->datefin) < ($now - $conf->withdraw->warning_delay)) { + $response->nbtodolate++; + } + } - $response->nbtodo = 0; - $response->nbtodolate = 0; - // Return workboard only if quantity is not 0 - if ($response->nbtodo) { - return $response; - } else { - return 0; - } - } else { - dol_print_error($this->db); - $this->error = $this->db->error(); - return -1; - } - */ + $response->nbtodo = 0; + $response->nbtodolate = 0; + // Return workboard only if quantity is not 0 + if ($response->nbtodo) { + return $response; + } else { + return 0; + } + } else { + dol_print_error($this->db); + $this->error = $this->db->error(); + return -1; + } + */ return 0; } } diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 0f61ecada43..75689f509ea 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -1285,9 +1285,8 @@ if ($action == 'create') { // Print form confirm print $formconfirm; - /* - * Contrat - */ + + // Contract if (!empty($object->brouillon) && $user->rights->contrat->creer) { print '
'; print ''; diff --git a/htdocs/core/boxes/box_commandes.php b/htdocs/core/boxes/box_commandes.php index ae939afe25c..b5656c36292 100644 --- a/htdocs/core/boxes/box_commandes.php +++ b/htdocs/core/boxes/box_commandes.php @@ -139,6 +139,8 @@ class box_commandes extends ModeleBoxes $commandestatic->total_ht = $objp->total_ht; $commandestatic->total_tva = $objp->total_tva; $commandestatic->total_ttc = $objp->total_ttc; + $commandestatic->date = $date; + $commandestatic->date_modification = $datem; $societestatic->id = $objp->socid; $societestatic->name = $objp->name; @@ -179,8 +181,8 @@ class box_commandes extends ModeleBoxes } $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($date, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php index 22fafb4633c..0f1fe97dfee 100644 --- a/htdocs/core/boxes/box_customers_outstanding_bill_reached.php +++ b/htdocs/core/boxes/box_customers_outstanding_bill_reached.php @@ -155,9 +155,9 @@ class box_customers_outstanding_bill_reached extends ModeleBoxes } if ($num == 0 || $nboutstandingbillreachedcustomers == 0) { - $this->info_box_contents[$line][0] = array( - 'td' => 'class="center"', - 'text'=> ''.$langs->trans("None").'' + $this->info_box_contents[0][] = array( + 'td' => 'class="center"', + 'text'=> ''.$langs->trans("None").'' ); } diff --git a/htdocs/core/boxes/box_factures.php b/htdocs/core/boxes/box_factures.php index e1d2860b212..43087949e47 100644 --- a/htdocs/core/boxes/box_factures.php +++ b/htdocs/core/boxes/box_factures.php @@ -92,7 +92,7 @@ class box_factures extends ModeleBoxes $sql .= ", f.ref, f.type, f.total_ht"; $sql .= ", f.total_tva"; $sql .= ", f.total_ttc"; - $sql .= ", f.datef as df"; + $sql .= ", f.datef as date"; $sql .= ", f.paye, f.fk_statut as status, f.datec, f.tms"; $sql .= ", f.date_lim_reglement as datelimite"; $sql .= ", s.rowid as socid, s.nom as name, s.name_alias"; @@ -130,7 +130,7 @@ class box_factures extends ModeleBoxes while ($line < $num) { $objp = $this->db->fetch_object($result); $datelimite = $this->db->jdate($objp->datelimite); - $date = $this->db->jdate($objp->df); + $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); $facturestatic->id = $objp->facid; @@ -141,6 +141,7 @@ class box_factures extends ModeleBoxes $facturestatic->total_ttc = $objp->total_ttc; $facturestatic->statut = $objp->status; $facturestatic->status = $objp->status; + $facturestatic->date = $this->db->jdate($objp->date); $facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite); $facturestatic->alreadypaid = $objp->paye; @@ -185,8 +186,8 @@ class box_factures extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($date, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_factures_fourn.php b/htdocs/core/boxes/box_factures_fourn.php index 42a945b9289..5fc3bdafa38 100644 --- a/htdocs/core/boxes/box_factures_fourn.php +++ b/htdocs/core/boxes/box_factures_fourn.php @@ -95,7 +95,7 @@ class box_factures_fourn extends ModeleBoxes $sql .= ", f.total_tva"; $sql .= ", f.total_ttc"; $sql .= ", f.paye, f.fk_statut as status"; - $sql .= ', f.datef as df'; + $sql .= ', f.datef as date'; $sql .= ', f.datec as datec'; $sql .= ', f.date_lim_reglement as datelimite, f.tms, f.type'; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -129,7 +129,7 @@ class box_factures_fourn extends ModeleBoxes $objp = $this->db->fetch_object($result); $datelimite = $this->db->jdate($objp->datelimite); - $date = $this->db->jdate($objp->df); + $date = $this->db->jdate($objp->date); $datem = $this->db->jdate($objp->tms); $facturestatic->id = $objp->facid; @@ -137,6 +137,7 @@ class box_factures_fourn extends ModeleBoxes $facturestatic->total_ht = $objp->total_ht; $facturestatic->total_tva = $objp->total_tva; $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->date = $date; $facturestatic->date_echeance = $datelimite; $facturestatic->statut = $objp->status; $facturestatic->status = $objp->status; @@ -188,8 +189,8 @@ class box_factures_fourn extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($date, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_factures_fourn_imp.php b/htdocs/core/boxes/box_factures_fourn_imp.php index a421706e855..d8c9321411d 100644 --- a/htdocs/core/boxes/box_factures_fourn_imp.php +++ b/htdocs/core/boxes/box_factures_fourn_imp.php @@ -132,6 +132,7 @@ class box_factures_fourn_imp extends ModeleBoxes $facturestatic->total_tva = $objp->total_tva; $facturestatic->total_ttc = $objp->total_ttc; $facturestatic->date_echeance = $datelimite; + $facturestatic->date = $date; $facturestatic->statut = $objp->status; $facturestatic->status = $objp->status; @@ -175,7 +176,7 @@ class box_factures_fourn_imp extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimite, 'day', 'tzuserrel')).'"', 'text' => dol_print_date($datelimite, 'day', 'tzuserrel'), ); diff --git a/htdocs/core/boxes/box_factures_imp.php b/htdocs/core/boxes/box_factures_imp.php index 9a8e764f208..6d6893f8ae2 100644 --- a/htdocs/core/boxes/box_factures_imp.php +++ b/htdocs/core/boxes/box_factures_imp.php @@ -98,7 +98,7 @@ class box_factures_imp extends ModeleBoxes $sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6"; $sql .= ", f.ref, f.date_lim_reglement as datelimite"; $sql .= ", f.type"; - $sql .= ", f.datef as df"; + $sql .= ", f.datef as date"; $sql .= ", f.total_ht"; $sql .= ", f.total_tva"; $sql .= ", f.total_ttc"; @@ -156,6 +156,7 @@ class box_factures_imp extends ModeleBoxes $facturestatic->total_ttc = $objp->total_ttc; $facturestatic->statut = $objp->status; $facturestatic->status = $objp->status; + $facturestatic->date = $this->db->jdate($objp->date); $facturestatic->date_lim_reglement = $this->db->jdate($objp->datelimite); $facturestatic->alreadypaid = $objp->paye; @@ -200,7 +201,7 @@ class box_factures_imp extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimite, 'day', 'tzuserrel')).'"', 'text' => dol_print_date($datelimite, 'day', 'tzuserrel'), ); diff --git a/htdocs/core/boxes/box_ficheinter.php b/htdocs/core/boxes/box_ficheinter.php index e0bdaf709ce..b0f0e691471 100644 --- a/htdocs/core/boxes/box_ficheinter.php +++ b/htdocs/core/boxes/box_ficheinter.php @@ -115,6 +115,7 @@ class box_ficheinter extends ModeleBoxes while ($i < $num) { $objp = $this->db->fetch_object($resql); $datec = $this->db->jdate($objp->datec); + $datem = $this->db->jdate($objp->datem); $ficheinterstatic->statut = $objp->status; $ficheinterstatic->status = $objp->status; @@ -144,8 +145,8 @@ class box_ficheinter extends ModeleBoxes ); $this->info_box_contents[$i][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($datec, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$i][] = array( diff --git a/htdocs/core/boxes/box_fournisseurs.php b/htdocs/core/boxes/box_fournisseurs.php index 3cb1f570a30..2dceee98dda 100644 --- a/htdocs/core/boxes/box_fournisseurs.php +++ b/htdocs/core/boxes/box_fournisseurs.php @@ -134,7 +134,7 @@ class box_fournisseurs extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="center nowraponall"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($datem, "day", 'tzuserrel'), ); diff --git a/htdocs/core/boxes/box_last_modified_ticket.php b/htdocs/core/boxes/box_last_modified_ticket.php index fd8ecd95eaf..311f76e5011 100644 --- a/htdocs/core/boxes/box_last_modified_ticket.php +++ b/htdocs/core/boxes/box_last_modified_ticket.php @@ -85,7 +85,7 @@ class box_last_modified_ticket extends ModeleBoxes ); if ($user->rights->ticket->read) { - $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.date_read, t.date_close, t.origin_email "; + $sql = "SELECT t.rowid as id, t.ref, t.track_id, t.fk_soc, t.fk_user_create, t.fk_user_assign, t.subject, t.message, t.fk_statut, t.type_code, t.category_code, t.severity_code, t.datec, t.tms as datem, t.date_read, t.date_close, t.origin_email "; $sql .= ", type.label as type_label, category.label as category_label, severity.label as severity_label"; $sql .= ", s.nom as company_name, s.email as socemail, s.client, s.fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; @@ -113,6 +113,7 @@ class box_last_modified_ticket extends ModeleBoxes while ($i < $num) { $objp = $this->db->fetch_object($resql); $datec = $this->db->jdate($objp->datec); + $datem = $this->db->jdate($objp->datem); $ticket = new Ticket($this->db); $ticket->id = $objp->id; @@ -120,6 +121,10 @@ class box_last_modified_ticket extends ModeleBoxes $ticket->ref = $objp->ref; $ticket->fk_statut = $objp->fk_statut; $ticket->subject = $objp->subject; + $ticket->date_creation = $datec; + $ticket->date_modification = $datem; + $ticket->fk_statut = $objp->fk_statut; + $ticket->fk_statut = $objp->fk_statut; if ($objp->fk_soc > 0) { $thirdparty = new Societe($this->db); $thirdparty->id = $objp->fk_soc; @@ -161,8 +166,8 @@ class box_last_modified_ticket extends ModeleBoxes // Date creation $this->info_box_contents[$i][$r] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($datec, 'dayhour', 'tzuserrel') + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'dayhour', 'tzuserrel') ); $r++; diff --git a/htdocs/core/boxes/box_last_ticket.php b/htdocs/core/boxes/box_last_ticket.php index 41ac39c1239..f73566fe972 100644 --- a/htdocs/core/boxes/box_last_ticket.php +++ b/htdocs/core/boxes/box_last_ticket.php @@ -166,7 +166,7 @@ class box_last_ticket extends ModeleBoxes // Date creation $this->info_box_contents[$i][$r] = array( - 'td' => 'class="right"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateCreation").': '.dol_print_date($datec, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($datec, 'dayhour', 'tzuserrel'), ); $r++; diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 8ea14ebc8d5..afd0db27990 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -148,6 +148,7 @@ class box_produits extends ModeleBoxes $productstatic->accountancy_code_buy = $objp->accountancy_code_buy; $productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra; $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export; + $productstatic->date_modification = $datem; $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', @@ -190,7 +191,7 @@ class box_produits extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="center nowraponall"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); diff --git a/htdocs/core/boxes/box_propales.php b/htdocs/core/boxes/box_propales.php index 97b7bd5fd51..cdaf629ae3f 100644 --- a/htdocs/core/boxes/box_propales.php +++ b/htdocs/core/boxes/box_propales.php @@ -130,6 +130,7 @@ class box_propales extends ModeleBoxes $propalstatic->total_ttc = $objp->total_ttc; $propalstatic->statut = $objp->status; $propalstatic->status = $objp->status; + $propalstatic->date = $date; $societestatic->id = $objp->socid; $societestatic->name = $objp->name; @@ -165,8 +166,8 @@ class box_propales extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("Date").': '.dol_print_date($datem, 'day', 'tzuserrel')).'"', - 'text' => dol_print_date($date, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_prospect.php b/htdocs/core/boxes/box_prospect.php index 3bf69f91fe0..e9824339f1e 100644 --- a/htdocs/core/boxes/box_prospect.php +++ b/htdocs/core/boxes/box_prospect.php @@ -141,7 +141,7 @@ class box_prospect extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="center nowraponall"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($datem, "day", 'tzuserrel'), ); diff --git a/htdocs/core/boxes/box_services_contracts.php b/htdocs/core/boxes/box_services_contracts.php index c72a378a1a2..9a212d0a10e 100644 --- a/htdocs/core/boxes/box_services_contracts.php +++ b/htdocs/core/boxes/box_services_contracts.php @@ -200,7 +200,7 @@ class box_services_contracts extends ModeleBoxes ); $this->info_box_contents[$i][] = array( - 'td' => 'class="center nowraponall"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($datem, 'day', 'tzuserrel'), 'text2'=> $late, ); diff --git a/htdocs/core/boxes/box_services_expired.php b/htdocs/core/boxes/box_services_expired.php index 4353fb7eb02..e9cca792de1 100644 --- a/htdocs/core/boxes/box_services_expired.php +++ b/htdocs/core/boxes/box_services_expired.php @@ -151,7 +151,7 @@ class box_services_expired extends ModeleBoxes ); $this->info_box_contents[$i][] = array( - 'td' => 'class="center nowraponall"', + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateEndPlanned").': '.dol_print_date($dateline, 'dayhour', 'tzuserrel')).'"', 'text' => dol_print_date($dateline, 'day', 'tzuserrel'), 'text2'=> $late, ); diff --git a/htdocs/core/boxes/box_supplier_orders.php b/htdocs/core/boxes/box_supplier_orders.php index 89fd7850c5c..6ee0c5ef8a3 100644 --- a/htdocs/core/boxes/box_supplier_orders.php +++ b/htdocs/core/boxes/box_supplier_orders.php @@ -123,6 +123,9 @@ class box_supplier_orders extends ModeleBoxes $supplierorderstatic->id = $objp->rowid; $supplierorderstatic->ref = $objp->ref; $supplierorderstatic->statut = $objp->status; + $supplierorderstatic->status = $objp->status; + $supplierorderstatic->date = $date; + $supplierorderstatic->date_modification = $datem; $thirdpartystatic->id = $objp->socid; $thirdpartystatic->name = $objp->name; @@ -152,8 +155,8 @@ class box_supplier_orders extends ModeleBoxes ); $this->info_box_contents[$line][] = array( - 'td' => 'class="right"', - 'text' => dol_print_date($date, 'day', 'tzuserrel'), + 'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateModification").': '.dol_print_date($datem, 'dayhour', 'tzuserrel')).'"', + 'text' => dol_print_date($datem, 'day', 'tzuserrel'), ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php index 403c6c9fc6d..32151828b83 100644 --- a/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php +++ b/htdocs/core/boxes/box_supplier_orders_awaiting_reception.php @@ -172,7 +172,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes if ($num == 0) { $this->info_box_contents[$line][] = array( 'td' => 'class="center"', - 'text' => $langs->trans("NoSupplierOrder"), + 'text' => ''.$langs->trans("NoSupplierOrder").'', ); } @@ -187,7 +187,7 @@ class box_supplier_orders_awaiting_reception extends ModeleBoxes } else { $this->info_box_contents[0][] = array( 'td' => 'class="nohover opacitymedium left"', - 'text' => $langs->trans("ReadPermissionNotAllowed") + 'text' => ''.$langs->trans("ReadPermissionNotAllowed").'' ); } } diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8cca3e5defe..b33c2f79931 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -521,21 +521,53 @@ abstract class CommonObject public $date_modification; // Date last change (tms field) /** - * @var string User id of author - * @deprecated + * @var integer|string $date_cloture; + */ + public $date_cloture; // Date closing (tms field) + + /** + * @var User|int User author/creation + * @TODO Merge with user_creation */ public $user_author; /** - * @var string User id of validation - * @deprecated + * @var User|int User author/creation + * @TODO Remove type id */ - public $user_valid; + public $user_creation; + /** + * @var int User id author/creation + */ + public $user_creation_id; /** - * @var string User id of last modifier - * @deprecated + * @var User|int User of validation + * @TODO Merge with user_validation + */ + public $user_valid; + /** + * @var User|int User of validation + * @TODO Remove type id + */ + public $user_validation; + /** + * @var int User id of validation + */ + public $user_validation_id; + /** + * @var int User id closing object + */ + public $user_closing_id; + + /** + * @var User|int User last modifier + * @TODO Remove type id */ public $user_modification; + /** + * @var int User id last modifier + */ + public $user_modification_id; public $next_prev_filter; @@ -5537,6 +5569,9 @@ abstract class CommonObject if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { $setsharekey = true; } + if ($this->element == 'product' && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } if ($this->element == 'contrat' && !empty($conf->global->CONTRACT_ALLOW_EXTERNAL_DOWNLOAD)) { $setsharekey = true; } @@ -6872,15 +6907,15 @@ abstract class CommonObject if ((!isset($this->fields[$key]['default'])) || ($this->fields[$key]['notnull'] != 1)) { $out .= ''; } - foreach ($param['options'] as $key => $val) { - if ((string) $key == '') { + foreach ($param['options'] as $keyb => $valb) { + if ((string) $keyb == '') { continue; } - if (strpos($val, "|") !== false) list($val, $parent) = explode('|', $val); - $out .= ''; } $out .= ''; } elseif ($type == 'sellist') { @@ -7029,12 +7064,12 @@ abstract class CommonObject $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, $morecss, 0, '100%'); } elseif ($type == 'radio') { $out = ''; - foreach ($param['options'] as $keyopt => $val) { + foreach ($param['options'] as $keyopt => $valopt) { $out .= ''.$val.'
'; + $out .= '/>
'; } } elseif ($type == 'chkbxlst') { if (is_array($value)) { @@ -7376,8 +7411,10 @@ abstract class CommonObject } // Format output value differently according to properties of field - if ($key == 'ref' && method_exists($this, 'getNomUrl')) { - $value = $this->getNomUrl(1, '', 0, '', 1); + if (in_array($key, array('rowid', 'ref')) && method_exists($this, 'getNomUrl')) { + if ($key != 'rowid' || empty($this->fields['ref'])) { // If we want ref field or if we want ID and there is no ref field, we show the link. + $value = $this->getNomUrl(1, '', 0, '', 1); + } } elseif ($key == 'status' && method_exists($this, 'getLibStatut')) { $value = $this->getLibStatut(3); } elseif ($type == 'date') { @@ -8062,8 +8099,13 @@ abstract class CommonObject //if (GETPOST('action', 'restricthtml') == 'create') $out.='create'; // BUG #11554 : For public page, use red dot for required fields, instead of bold label $tpl_context = isset($params["tpl_context"]) ? $params["tpl_context"] : "none"; + if ($tpl_context != "public") { // Public page : red dot instead of fieldrequired characters + if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) { + $out .= ' fieldrequired'; + } + } + $out .= '">'; if ($tpl_context == "public") { // Public page : red dot instead of fieldrequired characters - $out .= '">'; if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) { $out .= $form->textwithpicto($labeltoshow, $helptoshow); } else { @@ -8073,10 +8115,6 @@ abstract class CommonObject $out .= ' *'; } } else { - if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) { - $out .= ' fieldrequired'; - } - $out .= '">'; if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) { $out .= $form->textwithpicto($labeltoshow, $helptoshow); } else { diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0a996018e97..1345d2116f6 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -51,7 +51,7 @@ class Conf public $use_javascript_ajax; //! To store if javascript/ajax is enabked public $disable_compute; - //! Used to store current currency (ISO code like 'USD', 'EUR', ...) + //! Used to store current currency (ISO code like 'USD', 'EUR', ...). To get the currency symbol: $langs->getCurrencySymbol($this->currency) public $currency; //! Used to store current css (from theme) diff --git a/htdocs/core/class/evalmath.class.php b/htdocs/core/class/evalmath.class.php index c42612afda8..5c659344465 100644 --- a/htdocs/core/class/evalmath.class.php +++ b/htdocs/core/class/evalmath.class.php @@ -372,7 +372,7 @@ class EvalMath /** * Evaluate postfix notation * - * @param string $tokens An array of expression to evaluate ('operators'). The operand are into ->stack. + * @param array $tokens Expression * @param array $vars Array * @return string Output */ diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 772c67ff282..101f5995e6c 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -415,7 +415,7 @@ class Fiscalyear extends CommonObject public function info($id) { $sql = "SELECT fy.rowid, fy.datec, fy.fk_user_author, fy.fk_user_modif,"; - $sql .= " fy.tms"; + $sql .= " fy.tms as datem"; $sql .= " FROM ".$this->db->prefix()."accounting_fiscalyear as fy"; $sql .= " WHERE fy.rowid = ".((int) $id); @@ -426,18 +426,10 @@ class Fiscalyear extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->tms); + $this->date_modification = $this->db->jdate($obj->datem); } $this->db->free($result); } else { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 88f7f7aaa9a..9568ec25828 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1257,9 +1257,10 @@ class Form * @param array $ajaxoptions Options for ajax_autocompleter * @param bool $multiple add [] in the name of element and add 'multiple' attribut (not working with ajax_autocompleter) * @param array $excludeids Exclude IDs from the select combo + * @param int $showcode Show code * @return string HTML string with select box for thirdparty. */ - public function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false, $excludeids = array()) + public function select_company($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $limit = 0, $morecss = 'minwidth100', $moreparam = '', $selected_input_value = '', $hidelabel = 1, $ajaxoptions = array(), $multiple = false, $excludeids = array(), $showcode = 0) { // phpcs:enable global $conf, $user, $langs; @@ -1284,7 +1285,7 @@ class Form } // mode 1 - $urloption = 'htmlname='.urlencode(str_replace('.', '_', $htmlname)).'&outjson=1&filter='.urlencode($filter).(empty($excludeids) ? '' : '&excludeids='.join(',', $excludeids)).($showtype ? '&showtype='.urlencode($showtype) : ''); + $urloption = 'htmlname='.urlencode(str_replace('.', '_', $htmlname)).'&outjson=1&filter='.urlencode($filter).(empty($excludeids) ? '' : '&excludeids='.join(',', $excludeids)).($showtype ? '&showtype='.urlencode($showtype) : '').($showcode ? '&showcode='.urlencode($showcode) : ''); $out .= ''; if (empty($hidelabel)) { @@ -1303,7 +1304,7 @@ class Form $out .= ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions); } else { // Immediate load of all database - $out .= $this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam, $multiple, $excludeids); + $out .= $this->select_thirdparty_list($selected, $htmlname, $filter, $showempty, $showtype, $forcecombo, $events, '', 0, $limit, $morecss, $moreparam, $multiple, $excludeids, $showcode); } return $out; @@ -1328,9 +1329,10 @@ class Form * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @param bool $multiple add [] in the name of element and add 'multiple' attribut * @param array $excludeids Exclude IDs from the select combo + * @param int $showcode Show code in list * @return string HTML string with */ - public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false, $excludeids = array()) + public function select_thirdparty_list($selected = '', $htmlname = 'socid', $filter = '', $showempty = '', $showtype = 0, $forcecombo = 0, $events = array(), $filterkey = '', $outputmode = 0, $limit = 0, $morecss = 'minwidth100', $moreparam = '', $multiple = false, $excludeids = array(), $showcode = 0) { // phpcs:enable global $conf, $user, $langs; @@ -1442,13 +1444,15 @@ class Form $out .= ''."\n"; } + $companytemp = new Societe($this->db); + $num = $this->db->num_rows($resql); $i = 0; if ($num) { while ($i < $num) { $obj = $this->db->fetch_object($resql); $label = ''; - if ($conf->global->SOCIETE_ADD_REF_IN_LIST) { + if ($showcode || !empty($conf->global->SOCIETE_ADD_REF_IN_LIST)) { if (($obj->client) && (!empty($obj->code_client))) { $label = $obj->code_client.' - '; } @@ -1468,7 +1472,17 @@ class Form $label .= ' - '.$obj->tva_intra.''; } + $labelhtml = $label; + if ($showtype) { + $companytemp->id = $obj->rowid; + $companytemp->client = $obj->client; + $companytemp->fournisseur = $obj->fournisseur; + $tmptype = $companytemp->getTypeUrl(1, '', 0, 'span'); + if ($tmptype) { + $labelhtml .= ' '.$tmptype; + } + if ($obj->client || $obj->fournisseur) { $label .= ' ('; } @@ -1487,20 +1501,22 @@ class Form } if (!empty($conf->global->COMPANY_SHOW_ADDRESS_SELECTLIST)) { - $label .= ($obj->address ? ' - '.$obj->address : '').($obj->zip ? ' - '.$obj->zip : '').($obj->town ? ' '.$obj->town : ''); + $s = ($obj->address ? ' - '.$obj->address : '').($obj->zip ? ' - '.$obj->zip : '').($obj->town ? ' '.$obj->town : ''); if (!empty($obj->country_code)) { - $label .= ', '.$langs->trans('Country'.$obj->country_code); + $s .= ', '.$langs->trans('Country'.$obj->country_code); } + $label .= $s; + $labelhtml .= $s; } if (empty($outputmode)) { if (in_array($obj->rowid, $selected)) { - $out .= ''; + $out .= ''; } else { - $out .= ''; + $out .= ''; } } else { - array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label)); + array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label, 'labelhtml'=>$labelhtml)); } $i++; @@ -4784,7 +4800,7 @@ class Form * @param int $outputmode 0=HTML select string, 1=Array * @param int $include [=0] Removed or 1=Keep only * @param string $morecss More CSS - * @return string + * @return string|array * @see select_categories() */ public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $markafterid = 0, $outputmode = 0, $include = 0, $morecss = '') @@ -4933,7 +4949,10 @@ class Form foreach ($formquestion as $key => $input) { if (is_array($input) && !empty($input)) { if ($input['type'] == 'hidden') { - $more .= ''."\n"; + $moreattr = (!empty($input['moreattr']) ? ' '.$input['moreattr'] : ''); + $morecss = (!empty($input['morecss']) ? ' '.$input['morecss'] : ''); + + $more .= ''."\n"; } } } @@ -5848,12 +5867,13 @@ class Form /** * Retourne la liste des devises, dans la langue de l'utilisateur * - * @param string $selected preselected currency code - * @param string $htmlname name of HTML select list - * @param string $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code + * @param string $selected preselected currency code + * @param string $htmlname name of HTML select list + * @param string $mode 0 = Add currency symbol into label, 1 = Add 3 letter iso code + * @param string $useempty '1'=Allow empty value * @return string */ - public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0) + public function selectCurrency($selected = '', $htmlname = 'currency_id', $mode = 0, $useempty = '') { global $conf, $langs, $user; @@ -5866,6 +5886,9 @@ class Form } $out .= '
'; @@ -563,7 +563,7 @@ function dol_print_object_info($object, $usetable = 0) } // User close - if (!empty($object->user_cloture) || !empty($object->user_closing)) { + if (!empty($object->user_cloture) || !empty($object->user_closing) || !empty($object->user_closing_id)) { if (isset($object->user_cloture) && !empty($object->user_cloture)) { $object->user_closing = $object->user_cloture; } @@ -584,7 +584,7 @@ function dol_print_object_info($object, $usetable = 0) } } else { $userstatic = new User($db); - $userstatic->fetch($object->user_closing); + $userstatic->fetch($object->user_closing_id ? $object->user_closing_id : $object->user_closing); if ($userstatic->id) { print $userstatic->getNomUrl(-1, '', 0, 0, 0); } else { @@ -614,7 +614,7 @@ function dol_print_object_info($object, $usetable = 0) } print dol_print_date($object->date_closing, 'dayhour', 'tzserver'); if ($deltadateforuser) { - print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_closing, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour").''; } if ($usetable) { print ''; @@ -624,7 +624,7 @@ function dol_print_object_info($object, $usetable = 0) } // User conciliate - if (!empty($object->user_rappro)) { + if (!empty($object->user_rappro) || !empty($object->user_rappro_id)) { if ($usetable) { print ''; @@ -691,7 +691,7 @@ function dol_print_object_info($object, $usetable = 0) } print dol_print_date($object->date_envoi, 'dayhour', 'tzserver'); if ($deltadateforuser) { - print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_envoi, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour").''; } if ($usetable) { print ''; diff --git a/htdocs/core/lib/oauth.lib.php b/htdocs/core/lib/oauth.lib.php index ab1b5a217b8..f99266db178 100644 --- a/htdocs/core/lib/oauth.lib.php +++ b/htdocs/core/lib/oauth.lib.php @@ -25,13 +25,13 @@ // Supported OAUTH (a provider is supported when a file xxx_oauthcallback.php is available into htdocs/core/modules/oauth) $supportedoauth2array = array( - 'OAUTH_GOOGLE_NAME'=>array('callbackfile' => 'google', 'picto' => 'google', 'urlforapp' => 'OAUTH_GOOGLE_DESC', 'name'=>'Google'), + 'OAUTH_GOOGLE_NAME'=>array('callbackfile' => 'google', 'picto' => 'google', 'urlforapp' => 'OAUTH_GOOGLE_DESC', 'name'=>'Google', 'urlforcredentials'=>'https://console.developers.google.com/'), ); if (!empty($conf->stripe->enabled)) { - $supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array('callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeTest'); - $supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array('callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeLive'); + $supportedoauth2array['OAUTH_STRIPE_TEST_NAME'] = array('callbackfile' => 'stripetest', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeTest', 'urlforcredentials'=>''); + $supportedoauth2array['OAUTH_STRIPE_LIVE_NAME'] = array('callbackfile' => 'stripelive', 'picto' => 'stripe', 'urlforapp' => '', 'name'=>'StripeLive', 'urlforcredentials'=>''); } -$supportedoauth2array['OAUTH_GITHUB_NAME'] = array('callbackfile' => 'github', 'picto' => 'github', 'urlforapp' => 'OAUTH_GITHUB_DESC', 'name'=>'GitHub'); +$supportedoauth2array['OAUTH_GITHUB_NAME'] = array('callbackfile' => 'github', 'picto' => 'github', 'urlforapp' => 'OAUTH_GITHUB_DESC', 'name'=>'GitHub', 'urlforcredentials'=>'https://github.com/settings/developers'); diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index e9de957e4a8..18bd7226400 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -213,6 +213,53 @@ function dolWebsiteReplacementOfLinks($website, $content, $removephppart = 0, $c return $content; } +/** + * Converts smiley string into the utf8 sequence. + * @param string $content Content to replace + * @return string Replacement of all smiley strings with their utf8 code + * @see dolWebsiteOutput() + */ +function dolReplaceSmileyCodeWithUTF8($content) +{ + $map = array( + ":face_with_tears_of_joy:" => "\xF0\x9F\x98\x82", + ":grinning_face_with_smiling_eyes:" => "\xF0\x9F\x98\x81", + ":smiling_face_with_open_mouth:" => "\xF0\x9F\x98\x83", + ":smiling_face_with_open_mouth_and_cold_sweat:" => "\xF0\x9F\x98\x85", + ":smiling_face_with_open_mouth_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x86", + ":winking_face:" => "\xF0\x9F\x98\x89", + ":smiling_face_with_smiling_eyes:" => "\xF0\x9F\x98\x8A", + ":face_savouring_delicious_food:" => "\xF0\x9F\x98\x8B", + ":relieved_face:" => "\xF0\x9F\x98\x8C", + ":smiling_face_with_heart_shaped_eyes:" => "\xF0\x9F\x98\x8D", + ":smiling_face_with_sunglasses:" => "\xF0\x9F\x98\x8E", + ":smirking_face:" => "\xF0\x9F\x98\x8F", + ":neutral_face:" => "\xF0\x9F\x98\x90", + ":expressionless_face:" => "\xF0\x9F\x98\x91", + ":unamused_face:" => "\xF0\x9F\x98\x92", + ":face_with_cold_sweat:" => "\xF0\x9F\x98\x93", + ":pensive_face:" => "\xF0\x9F\x98\x94", + ":confused_face:" => "\xF0\x9F\x98\x95", + ":confounded_face:" => "\xF0\x9F\x98\x96", + ":kissing_face:" => "\xF0\x9F\x98\x97", + ":face_throwing_a_kiss:" => "\xF0\x9F\x98\x98", + ":kissing_face_with_smiling_eyes:" => "\xF0\x9F\x98\x99", + ":kissing_face_with_closed_eyes:" => "\xF0\x9F\x98\x9A", + ":face_with_stuck_out_tongue:" => "\xF0\x9F\x98\x9B", + ":face_with_stuck_out_tongue_and_winking_eye:" => "\xF0\x9F\x98\x9C", + ":face_with_stuck_out_tongue_and_tightly_closed_eyes:" => "\xF0\x9F\x98\x9D", + ":disappointed_face:" => "\xF0\x9F\x98\x9E", + ":worried_face:" => "\xF0\x9F\x98\x9F", + ":angry_face:" => "\xF0\x9F\x98\xA0", + ":face_with_symbols_on_mouth:" => "\xF0\x9F\x98\xA1", + ); + foreach ($map as $key => $value) { + $content = str_replace($key, $value, $content); + } + return $content; +} + + /** * Render a string of an HTML content and output it. * Used to ouput the page when viewed from a server (Dolibarr or Apache). @@ -369,6 +416,8 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $content = str_replace('author_alias ? $event->author_alias : 'unknown'; //$tmpevent['category'] = ''; $tmpevent['desc'] = $event->description; - + $tmpevent['image'] = $GLOBALS['website']->virtualhost.'/medias/'.$event->image; $event = $tmpevent; } @@ -387,7 +387,9 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt $url = $event["url"]; $author = $event["author"]; $category = $event["category"]; - + if (!empty($event["image"])) { + $image = $event["image"]; + } /* No place inside a RSS $priority = $event["priority"]; $fulldayevent = $event["fulldayevent"]; @@ -404,6 +406,10 @@ function build_rssfile($format, $title, $desc, $events_array, $outputfile, $filt fwrite($fichier, "\n"); fwrite($fichier, "

'); + } + if ($description) { fwrite($fichier, $description); } diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 80ed0b345ba..627a13a7844 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -1452,8 +1452,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it // Search if cron entry already present $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob"; - $sql .= " WHERE module_name = '".$this->db->escape(empty($this->rights_class) ?strtolower($this->name) : $this->rights_class)."'"; - if ($class) { + //$sql .= " WHERE module_name = '".$this->db->escape(empty($this->rights_class) ?strtolower($this->name) : $this->rights_class)."'"; + $sql .= " WHERE label = '".$this->db->escape($label)."'"; + /*if ($class) { $sql .= " AND classesname = '".$this->db->escape($class)."'"; } if ($objectname) { @@ -1467,7 +1468,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it } if ($parameters) { $sql .= " AND params = '".$this->db->escape($parameters)."'"; - } + }*/ $sql .= " AND entity = ".((int) $entity); // Must be exact entity $now = dol_now(); @@ -1516,7 +1517,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it $sql .= "'".$this->db->escape($priority)."', "; } if (is_int($status)) { - $sql .= "'".$this->db->escape($status)."', "; + $sql .= ((int) $status).", "; } $sql .= $entity.","; $sql .= "'".$this->db->escape($test)."'"; diff --git a/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php new file mode 100644 index 00000000000..fd0a87efe5b --- /dev/null +++ b/htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php @@ -0,0 +1,358 @@ + + * Copyright (C) 2006-2014 Laurent Destailleur + * Copyright (C) 2007-2012 Regis Houssin + * Copyright (C) 2011 Juanjo Menent + * Copyright (C) 2022 Faustin Boitel + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/modules/barcode/mod_barcode_thirdparty_standard.php + * \ingroup barcode + * \brief File of class to manage barcode numbering with standard rule + */ + +require_once DOL_DOCUMENT_ROOT.'/core/modules/barcode/modules_barcode.class.php'; + + +/** + * Class to manage barcode with standard rule + */ +class mod_barcode_thirdparty_standard extends ModeleNumRefBarCode +{ + public $name = 'Standard'; // Model Name + + public $code_modifiable; // Editable code + + public $code_modifiable_invalide; // Modified code if it is invalid + + public $code_modifiable_null; // Modified code if it is null + + public $code_null; // Optional code + + /** + * Dolibarr version of the loaded document + * @var string + */ + public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' + + /** + * @var int Automatic numbering + */ + public $code_auto; + + public $searchcode; // Search string + + public $numbitcounter; // Number of digits the counter + + public $prefixIsRequired; // The prefix field of third party must be filled when using {pre} + + + /** + * Constructor + */ + public function __construct() + { + $this->code_null = 0; + $this->code_modifiable = 1; + $this->code_modifiable_invalide = 1; + $this->code_modifiable_null = 1; + $this->code_auto = 1; + $this->prefixIsRequired = 0; + } + + + /** Return description of module + * + * @param Translate $langs Object langs + * @return string Description of module + */ + public function info($langs) + { + global $conf, $mc; + global $form; + + $langs->load("thirdparties"); + + $disabled = ((!empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? ' disabled' : ''); + + $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= '
'; print img_picto('', $supportedoauth2array[$keyforsupportedoauth2array]['picto'], 'class="pictofixedwidth"'); print $label; + if ($keyforprovider) { + print ' ('.$keyforprovider.')'; + } else { + print ' ('.$langs->trans("NoName").')'; + } print ''; - if (!empty($supportedoauth2array[$keyforsupportedoauth2array]['urlforapp'])) { - print $langs->trans($supportedoauth2array[$keyforsupportedoauth2array]['urlforapp']); + if (!empty($supportedoauth2array[$keyforsupportedoauth2array]['urlforcredentials'])) { + print $langs->trans("OAUTH_URL_FOR_CREDENTIAL", $supportedoauth2array[$keyforsupportedoauth2array]['urlforcredentials']); } print '
'; print '
'; print '
'; print img_picto('', $supportedoauth2array[$keyforsupportedoauth2array]['picto'], 'class="pictofixedwidth"'); print $langs->trans($keyforsupportedoauth2array); + if ($keyforprovider) { + print ' ('.$keyforprovider.')'; + } else { + print ' ('.$langs->trans("NoName").')'; + } print ''; + if (is_object($tokenobj)) { //var_dump($tokenobj); - print $tokenobj->getAccessToken().'
'; + $tokentoshow = $tokenobj->getAccessToken(); + print ''.showValueWithClipboardCPButton($tokentoshow, 1, dol_trunc($tokentoshow, 32)).'
'; //print 'Refresh: '.$tokenobj->getRefreshToken().'
'; //print 'EndOfLife: '.$tokenobj->getEndOfLife().'
'; //var_dump($tokenobj->getExtraParams()); @@ -317,9 +339,10 @@ if ($mode == 'setup' && $user->admin) { print '
'; - print yn($refreshtoken); + print ''.showValueWithClipboardCPButton($refreshtoken, 1, dol_trunc($refreshtoken, 32)).''; print '
'; print yn($expire); print '
'; print $expiredat; print ''.$langs->trans("NumberOfCopy").''.$langs->trans("Delete").'
'.$row['login'].''.$row['module'].''.$row['driver'].''.$row['printer_name'].''.$row['printer_location'].''.$row['printer_id'].''.$row['copy'].''.$obj->login.''.$obj->module.''.$obj->driver.''.$obj->printer_name.''.$obj->printer_location.''.$obj->printer_id.''.$obj->copy.''.img_picto($langs->trans("Delete"), 'delete').'
'.$langcode.''.$key.''; - $titleforvalue = $langs->trans("Translation").' en_US for key '.$key.':
'.($langsenfileonly->tab_translate[$key] ? $langsenfileonly->trans($key) : ''.$langs->trans("None").''); + $titleforvalue = $langs->trans("Translation").' en_US for key '.$key.':
'.(!empty($langsenfileonly->tab_translate[$key]) ? $langsenfileonly->trans($key) : ''.$langs->trans("None").''); print ''; print dol_escape_htmltag($val); print ''; diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 53de8fe2502..6f1012d1af4 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -35,9 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'members', 'users')); -if (!$user->admin) { - accessforbidden(); -} $extrafields = new ExtraFields($db); @@ -51,6 +48,10 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'user'; +if (empty($user->admin)) { + accessforbidden(); +} + /* * Action @@ -58,6 +59,8 @@ $type = 'user'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; +$reg = array(); + if ($action == 'set_default') { $ret = addDocumentModel($value, $type, $label, $scandir); $res = true; @@ -83,6 +86,9 @@ if ($action == 'set_default') { $ret = addDocumentModel($value, $type, $label, $scandir); } $res = true; +} elseif ($action == 'unsetdoc') { + // We disable the template + dolibarr_del_const($db, "USER_ADDON_PDF_ODT", $conf->entity); } elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { @@ -118,6 +124,9 @@ if ($action == 'set_default') { $form = new Form($db); +dol_mkdir(DOL_DATA_ROOT.'/doctemplates/users'); +dol_mkdir(DOL_DATA_ROOT.'/doctemplates/usergroups'); + $help_url = 'EN:Module_Users|FR:Module_Utilisateurs|ES:Módulo_Usuarios'; llxHeader('', $langs->trans("UsersSetup"), $help_url); @@ -264,14 +273,17 @@ foreach ($dirmodels as $reldir) { print '
'."\n"; - print 'scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir).'&label='.urlencode($module->name).'">'; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; print "'; if (getDolGlobalString('USER_ADDON_PDF_ODT') == $name) { - print img_picto($langs->trans("Default"), 'on'); + //print img_picto($langs->trans("Default"), 'on'); + print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Default"), 'on').''; } else { print 'scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 410af398bc7..d144d95819b 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -155,6 +155,7 @@ class Asset extends CommonObject public $import_key; public $model_pdf; public $status; + public $user_cloture_id; // /** // * @var string Field with ID of parent key if this object has a parent @@ -1441,24 +1442,10 @@ class Asset extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_validation_id = $obj->fk_user_valid; + $this->user_cloture_id = $obj->fk_user_cloture; $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->datem); $this->date_validation = $this->db->jdate($obj->datev); diff --git a/htdocs/asset/class/assetmodel.class.php b/htdocs/asset/class/assetmodel.class.php index 077f33936e8..6b75702278d 100644 --- a/htdocs/asset/class/assetmodel.class.php +++ b/htdocs/asset/class/assetmodel.class.php @@ -734,27 +734,11 @@ class AssetModel extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); } $this->db->free($result); diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index b4e365fe018..95fb287d2b8 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -35,7 +35,8 @@ $month = dol_print_date($now, '%m'); $day = dol_print_date($now, '%d'); $forbarcode = GETPOST('forbarcode'); $fk_barcode_type = GETPOST('fk_barcode_type'); -$eraseallbarcode = GETPOST('eraseallbarcode'); +$eraseallproductbarcode = GETPOST('eraseallproductbarcode'); +$eraseallthirdpartybarcode = GETPOST('eraseallthirdpartybarcode'); $action = GETPOST('action', 'aZ09'); @@ -43,6 +44,7 @@ $producttmp = new Product($db); $thirdpartytmp = new Societe($db); $modBarCodeProduct = ''; +$modBarCodeThirdparty = ''; $maxperinit = 1000; @@ -51,6 +53,106 @@ $maxperinit = 1000; * Actions */ +// Define barcode template for third-party +if (!empty($conf->global->BARCODE_THIRDPARTY_ADDON_NUM)) { + $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); + + foreach ($dirbarcodenum as $dirroot) { + $dir = dol_buildpath($dirroot, 0); + + $handle = @opendir($dir); + if (is_resource($handle)) { + while (($file = readdir($handle)) !== false) { + if (preg_match('/^mod_barcode_thirdparty_.*php$/', $file)) { + $file = substr($file, 0, dol_strlen($file) - 4); + + try { + dol_include_once($dirroot.$file.'.php'); + } catch (Exception $e) { + dol_syslog($e->getMessage(), LOG_ERR); + } + + $modBarCodeThirdparty = new $file(); + break; + } + } + closedir($handle); + } + } +} + +if ($action == 'initbarcodethirdparties') { + if (!is_object($modBarCodeThirdparty)) { + $error++; + setEventMessages($langs->trans("NoBarcodeNumberingTemplateDefined"), null, 'errors'); + } + + if (!$error) { + $thirdpartystatic = new Societe($db); + + $db->begin(); + + $nbok = 0; + if (!empty($eraseallthirdpartybarcode)) { + $sql = "UPDATE ".MAIN_DB_PREFIX."societe"; + $sql .= " SET barcode = NULL"; + $resql = $db->query($sql); + if ($resql) { + setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); + } else { + $error++; + dol_print_error($db); + } + } else { + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe"; + $sql .= " WHERE barcode IS NULL or barcode = ''"; + $sql .= $db->order("datec", "ASC"); + $sql .= $db->plimit($maxperinit); + + dol_syslog("codeinit", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); + + $i = 0; $nbok = $nbtry = 0; + while ($i < min($num, $maxperinit)) { + $obj = $db->fetch_object($resql); + if ($obj) { + $thirdpartystatic->id = $obj->rowid; + $nextvalue = $modBarCodeThirdparty->getNextValue($thirdpartystatic, ''); + + $result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'THIRDPARTY_MODIFY'); + + $nbtry++; + if ($result > 0) { + $nbok++; + } + } + + $i++; + } + } else { + $error++; + dol_print_error($db); + } + + if (!$error) { + setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + } + } + + if (!$error) { + //$db->rollback(); + $db->commit(); + } else { + $db->rollback(); + } + } + + $action = ''; +} + // Define barcode template for products if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) { $dirbarcodenum = array_merge(array('/core/modules/barcode/'), $conf->modules_parts['barcode']); @@ -91,7 +193,7 @@ if ($action == 'initbarcodeproducts') { $db->begin(); $nbok = 0; - if (!empty($eraseallbarcode)) { + if (!empty($eraseallproductbarcode)) { $sql = "UPDATE ".MAIN_DB_PREFIX."product"; $sql .= " SET barcode = NULL"; $resql = $db->query($sql); @@ -155,7 +257,6 @@ if ($action == 'initbarcodeproducts') { } - /* * View */ @@ -180,16 +281,25 @@ print '
'; //print img_picto('','puce').' '.$langs->trans("PrintsheetForOneBarCode").'
'; //print '
'; -print ''; -print ''; -print ''; -print ''; - print '
'; + + +// Example 1 : Adding jquery code +print ''; + + // For thirdparty if (isModEnabled('societe')) { - $nbno = $nbtotal = 0; + print ''; + print ''; + print ''; + print ''; + $nbthirdpartyno = $nbthirdpartytotal = 0; print load_fiche_titre($langs->trans("BarcodeInitForThirdparties"), '', 'company'); @@ -198,7 +308,7 @@ if (isModEnabled('societe')) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbno = $obj->nb; + $nbthirdpartyno = $obj->nb; } else { dol_print_error($db); } @@ -207,30 +317,47 @@ if (isModEnabled('societe')) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbtotal = $obj->nb; + $nbthirdpartytotal = $obj->nb; } else { dol_print_error($db); } - print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ThirdParties")).'
'."\n"; + print $langs->trans("CurrentlyNWithoutBarCode", $nbthirdpartyno, $nbthirdpartytotal, $langs->transnoentitiesnoconv("ThirdParties")).'
'."\n"; - print '
'; + $disabledthirdparty = $disabledthirdparty1 = 0; + + if (is_object($modBarCodeThirdparty)) { + print $langs->trans("BarCodeNumberManager").": "; + $objthirdparty = new Societe($db); + print ''.(isset($modBarCodeThirdparty->name) ? $modBarCodeThirdparty->name : $modBarCodeThirdparty->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeThirdparty->getNextValue($objthirdparty).'
'; + $disabledthirdparty = 0; + } else { + $disabledthirdparty = 1; + $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); + print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").')
'; + } + if (empty($nbthirdpartyno)) { + $disabledthirdparty1 = 1; + } + + $moretagsthirdparty1 = (($disabledthirdparty || $disabledthirdparty1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); + print '
'; + $moretagsthirdparty2 = (($nbthirdpartyno == $nbthirdpartytotal) ? ' disabled' : ''); + print '   '; + print ''; print '



'; + print ''; } // For products if ($conf->product->enabled || $conf->product->service) { - // Example 1 : Adding jquery code - print ''; + print '
'; + print ''; + print ''; + print ''; - $nbno = $nbtotal = 0; + $nbproductno = $nbproducttotal = 0; print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'product'); print '
'."\n"; @@ -247,7 +374,7 @@ if ($conf->product->enabled || $conf->product->service) { $i = 0; while ($i < $num) { $obj = $db->fetch_object($resql); - $nbno += $obj->nb; + $nbproductno += $obj->nb; $i++; } @@ -259,35 +386,38 @@ if ($conf->product->enabled || $conf->product->service) { $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); - $nbtotal = $obj->nb; + $nbproducttotal = $obj->nb; } else { dol_print_error($db); } - print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'
'."\n"; + print $langs->trans("CurrentlyNWithoutBarCode", $nbproductno, $nbproducttotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'
'."\n"; + + $disabledproduct = $disabledproduct1 = 0; if (is_object($modBarCodeProduct)) { print $langs->trans("BarCodeNumberManager").": "; $objproduct = new Product($db); print ''.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeProduct->getNextValue($objproduct).'
'; - $disabled = 0; + $disabledproduct = 0; } else { - $disabled = 1; + $disabledproduct = 1; $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").')
'; } - if (empty($nbno)) { - $disabled1 = 1; + if (empty($nbproductno)) { + $disabledproduct1 = 1; } print '
'; //print ' '.$langs->trans("ResetBarcodeForAllRecords").'
'; - $moretags1 = (($disabled || $disabled1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); - print ''; - $moretags2 = (($nbno == $nbtotal) ? ' disabled' : ''); + $moretagsproduct1 = (($disabledproduct || $disabledproduct1) ? ' disabled title="'.dol_escape_htmltag($titleno).'"' : ''); + print ''; + $moretagsproduct2 = (($nbproductno == $nbproducttotal) ? ' disabled' : ''); print '   '; - print ''; + print ''; print '



'; + print '
'; } @@ -297,7 +427,6 @@ print $langs->trans("ClickHereToGoTo").' : date_validation = !empty($obj->datev) ? $this->db->jdate($obj->datev) : ""; + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); @@ -1581,29 +1565,11 @@ class BOMLine extends CommonObjectLine if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } - + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } - $this->db->free($result); } else { dol_print_error($this->db); diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 27330f45ffe..dad25199566 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -371,6 +371,8 @@ class Categorie extends CommonObject $this->entity = (int) $res['entity']; $this->date_creation = $this->db->jdate($res['date_creation']); $this->date_modification = $this->db->jdate($res['tms']); + $this->user_creation_id = (int) $res['fk_user_creat']; + $this->user_modification_id = (int) $res['fk_user_modif']; $this->user_creation = (int) $res['fk_user_creat']; $this->user_modification = (int) $res['fk_user_modif']; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 156d5573ae8..7d03def1464 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1448,21 +1448,10 @@ class ActionComm extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->id; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_mod) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_mod); - $this->user_modification = $muser; - } - - $this->date_creation = $this->db->jdate($obj->datec); - if (!empty($obj->fk_user_mod)) { - $this->date_modification = $this->db->jdate($obj->datem); - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_mod; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); } else { diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index f4c4127a0a4..b8b46a0c8d9 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1718,7 +1718,7 @@ if ($action == 'create') { // Mode of payment print '
'.$langs->trans('PaymentMode').''; print img_picto('', 'bank', 'class="pictofixedwidth"'); - $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id), 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); + $form->select_types_paiements((GETPOSTISSET('mode_reglement_id') && GETPOST('mode_reglement_id') != 0) ? GETPOST('mode_reglement_id', 'int') : $soc->mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx'); print '
'; } @@ -526,7 +526,7 @@ function dol_print_object_info($object, $usetable = 0) } } else { $userstatic = new User($db); - $userstatic->fetch($object->user_signature); + $userstatic->fetch($object->user_signature_id ? $object->user_signature_id : $object->user_signature); if ($userstatic->id) { print $userstatic->getNomUrl(-1, '', 0, 0, 0); } else { @@ -553,7 +553,7 @@ function dol_print_object_info($object, $usetable = 0) } print dol_print_date($object->date_signature, 'dayhour'); if ($deltadateforuser) { - print ' '.$langs->trans('CurrentHour').'   /   '.dol_print_date($object->date_signature, 'dayhour', 'tzuserrel').'  '.$langs->trans('ClientHour'); + print ' '.$langs->trans('CurrentHour').'   /   '.dol_print_date($object->date_signature, 'dayhour', 'tzuserrel').'  '.$langs->trans('ClientHour').''; } if ($usetable) { print '
'; } @@ -642,7 +642,7 @@ function dol_print_object_info($object, $usetable = 0) } } else { $userstatic = new User($db); - $userstatic->fetch($object->user_rappro); + $userstatic->fetch($object->user_rappro_id ? $object->user_rappro_id : $object->user_rappro); if ($userstatic->id) { print $userstatic->getNomUrl(1, '', 0, 0, 0); } else { @@ -669,7 +669,7 @@ function dol_print_object_info($object, $usetable = 0) } print dol_print_date($object->date_rappro, 'dayhour', 'tzserver'); if ($deltadateforuser) { - print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour"); + print ' '.$langs->trans("CurrentHour").'   /   '.dol_print_date($object->date_rappro, "dayhour", 'tzuserrel').'  '.$langs->trans("ClientHour").''; } if ($usetable) { print '
'; + + $tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("BarCode"), $langs->transnoentities("BarCode")); + $tooltip .= $langs->trans("GenericMaskCodes3EAN"); + $tooltip .= ''.$langs->trans("Example").':
'; + $tooltip .= '020{000000000}? (for internal use)
'; + $tooltip .= '9771234{00000}? (example of ISSN code with prefix 1234)
'; + $tooltip .= '9791234{00000}? (example of ISMN code with prefix 1234)
'; + //$tooltip.=$langs->trans("GenericMaskCodes5"); + + // Mask parameter + //$texte.= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + $texte .= ''; + + $texte .= '
'.$langs->trans("Mask").' ('.$langs->trans("BarCodeModel").'):
'.$langs->trans("Mask").':'.$form->textwithpicto('', $tooltip, 1, 1).' 
'; + $texte .= ''; + + return $texte; + } + + + /** + * Return an example of result returned by getNextValue + * + * @param Translate $langs Object langs + * @param Societe $objthirdparty Object third-party + * @return string Return string example + */ + public function getExample($langs, $objthirdparty = 0) + { + $examplebarcode = $this->getNextValue($objthirdparty, ''); + if (!$examplebarcode) { + $examplebarcode = $langs->trans('NotConfigured'); + } + if ($examplebarcode == "ErrorBadMask") { + $langs->load("errors"); + $examplebarcode = $langs->trans($examplebarcode); + } + + return $examplebarcode; + } + /** + * Return literal barcode type code from numerical rowid type of barcode + * + * @param Database $db Database + * @param int $type Type of barcode (EAN, ISBN, ...) as rowid + * @return string + */ + public function literalBarcodeType($db, $type = '') + { + global $conf; + $out = ''; + + $sql = "SELECT rowid, code, libelle as label"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_barcode_type"; + $sql .= " WHERE rowid = '".$db->escape($type)."'"; + $sql .= " AND entity = ".((int) $conf->entity); + $result = $db->query($sql); + if ($result) { + $num = $db->num_rows($result); + + if ($num > 0) { + $obj = $db->fetch_object($result); + $out .= $obj->label; //take the label corresponding to the type rowid in the database + } + } else { + dol_print_error($db); + } + + return $out; + } + /** + * Return next value + * + * @param Societe $objthirdparty Object third-party + * @param string $type Type of barcode (EAN, ISBN, ...) + * @return string Value if OK, '' if module not configured, <0 if KO + */ + public function getNextValue($objthirdparty, $type = '') + { + global $db, $conf; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/barcode.lib.php'; // to be able to call function barcode_gen_ean_sum($ean) + + if (empty($type)) { + $type = $conf->global->GENBARCODE_BARCODETYPE_THIRDPARTY; + } //get barcode type configuration for companies if $type not set + + // TODO + + // Get Mask value + $mask = ''; + if (!empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $mask = $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK; + } + + if (empty($mask)) { + $this->error = 'NotConfigured'; + return ''; + } + + $field = 'barcode'; + $where = ''; + + $now = dol_now(); + + $numFinal = get_next_value($db, $mask, 'societe', $field, $where, '', $now); + //Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key + if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...) + $literaltype = ''; + $literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type + switch ($literaltype) { + case 'EAN13': //EAN13 rowid = 2 + if (strlen($numFinal)==13) {// be sure that the mask length is correct for EAN13 + $ean = substr($numFinal, 0, 12); //take first 12 digits + $eansum = barcode_gen_ean_sum($ean); + $ean .= $eansum; //substitute the las character by the key + $numFinal = $ean; + } + break; + // Other barcode cases with key could be written here + default: + break; + } + } + //End barcode with key + return $numFinal; + } + + + /** + * Check validity of code according to its rules + * + * @param DoliDB $db Database handler + * @param string $code Code to check/correct + * @param Societe $thirdparty Object third-party + * @param int $thirdparty_type 0 = customer/prospect , 1 = supplier + * @param string $type type of barcode (EAN, ISBN, ...) + * @return int 0 if OK + * -1 ErrorBadCustomerCodeSyntax + * -2 ErrorCustomerCodeRequired + * -3 ErrorCustomerCodeAlreadyUsed + * -4 ErrorPrefixRequired + */ + public function verif($db, &$code, $thirdparty, $thirdparty_type, $type) + { + global $conf; + + //var_dump($code.' '.$thirdparty->ref.' '.$thirdparty_type);exit; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + + $result = 0; + $code = strtoupper(trim($code)); + + if (empty($code) && $this->code_null && empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK)) { + $result = 0; + } elseif (empty($code) && (!$this->code_null || !empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK))) { + $result = -2; + } else { + if ($this->verif_syntax($code, $type) >= 0) { + $is_dispo = $this->verif_dispo($db, $code, $thirdparty); + if ($is_dispo <> 0) { + $result = -3; + } else { + $result = 0; + } + } else { + if (dol_strlen($code) == 0) { + $result = -2; + } else { + $result = -1; + } + } + } + + dol_syslog(get_class($this)."::verif type=".$thirdparty_type." result=".$result); + return $result; + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return if a code is used (by other element) + * + * @param DoliDB $db Handler acces base + * @param string $code Code to check + * @param Societe $thirdparty Objet third-party + * @return int 0 if available, <0 if KO + */ + public function verif_dispo($db, $code, $thirdparty) + { + // phpcs:enable + $sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."societe"; + $sql .= " WHERE barcode = '".$db->escape($code)."'"; + if ($thirdparty->id > 0) { + $sql .= " AND rowid <> ".$thirdparty->id; + } + + $resql = $db->query($sql); + if ($resql) { + if ($db->num_rows($resql) == 0) { + return 0; + } else { + return -1; + } + } else { + return -2; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return if a barcode value match syntax + * + * @param string $codefortest Code to check syntax + * @param string $typefortest Type of barcode (ISBN, EAN, ...) + * @return int 0 if OK, <0 if KO + */ + public function verif_syntax($codefortest, $typefortest) + { + // phpcs:enable + global $conf; + + $result = 0; + + // Get Mask value + $mask = empty($conf->global->BARCODE_STANDARD_THIRDPARTY_MASK) ? '' : $conf->global->BARCODE_STANDARD_THIRDPARTY_MASK; + if (!$mask) { + $this->error = 'NotConfigured'; + return -1; + } + + dol_syslog(get_class($this).'::verif_syntax codefortest='.$codefortest." typefortest=".$typefortest); + + $newcodefortest = $codefortest; + + // Special case, if mask is on 12 digits instead of 13, we remove last char into code to test + if (in_array($typefortest, array('EAN13', 'ISBN'))) { // We remove the CRC char not included into mask + if (preg_match('/\{(0+)([@\+][0-9]+)?([@\+][0-9]+)?\}/i', $mask, $reg)) { + if (strlen($reg[1]) == 12) { + $newcodefortest = substr($newcodefortest, 0, 12); + } + dol_syslog(get_class($this).'::verif_syntax newcodefortest='.$newcodefortest); + } + } + + $result = check_value($mask, $newcodefortest); + if (is_string($result)) { + $this->error = $result; + return -1; + } + + return $result; + } +} diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 8c3e5bfeab9..32284a2cbd1 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -470,9 +470,9 @@ class ImportCsv extends ModeleImports $newval = $classinstance->id; } else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { - $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { - $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', $key, $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldRefNotIn', num2Alpha($key - 1), $newval, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['element'])); } else { $this->errors[$error]['lib'] = 'ErrorBadDefinitionOfImportProfile'; } @@ -512,7 +512,7 @@ class ImportCsv extends ModeleImports $newval = $classinstance->id; } else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { - $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); } else { $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; } @@ -549,7 +549,7 @@ class ImportCsv extends ModeleImports $newval = $scaleorid ? $scaleorid : 0; } else { if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { - $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); + $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'scale', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); } else { $this->errors[$error]['lib'] = 'ErrorFieldValueNotIn'; } @@ -697,7 +697,7 @@ class ImportCsv extends ModeleImports if (!empty($filter)) { $tableforerror .= ':'.$filter; } - $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorFieldValueNotIn', $key, $newval, $field, $tableforerror); + $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, $field, $tableforerror); $this->errors[$error]['type'] = 'FOREIGNKEY'; $errorforthistable++; $error++; @@ -705,13 +705,22 @@ class ImportCsv extends ModeleImports } elseif (!preg_match('/'.$objimport->array_import_regex[0][$val].'/i', $newval)) { // If test is just a static regex //if ($key == 19) print "xxx".$newval."zzz".$objimport->array_import_regex[0][$val]."
"; - $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorWrongValueForField', $key, $newval, $objimport->array_import_regex[0][$val]); + $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorWrongValueForField', num2Alpha($key - 1), $newval, $objimport->array_import_regex[0][$val]); $this->errors[$error]['type'] = 'REGEX'; $errorforthistable++; $error++; } } + // Check HTML injection + $inj = testSqlAndScriptInject($newval, 0); + if ($inj) { + $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorHtmlInjectionForField', num2Alpha($key - 1), dol_trunc($newval, 100)); + $this->errors[$error]['type'] = 'HTMLINJECTION'; + $errorforthistable++; + $error++; + } + // Other tests // ... } diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 4740f7d3390..d8a9d77a98e 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -756,6 +756,15 @@ class ImportXlsx extends ModeleImports } } + // Check HTML injection + $inj = testSqlAndScriptInject($newval, 0); + if ($inj) { + $this->errors[$error]['lib'] = $langs->transnoentitiesnoconv('ErrorHtmlInjectionForField', $key, dol_trunc($newval, 100)); + $this->errors[$error]['type'] = 'HTMLINJECTION'; + $errorforthistable++; + $error++; + } + // Other tests // ... } diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 0d4a85e00ae..215e7dd3c64 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -286,8 +286,8 @@ class modAdherent extends DolibarrModules $this->export_label[$r] = 'MembersAndSubscriptions'; $this->export_permission[$r] = array(array("adherent", "export")); $this->export_fields_array[$r] = array( - 'a.rowid'=>'Id', 'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname", 'a.firstname'=>"Firstname", 'a.login'=>"Login", 'a.gender'=>"Gender", 'a.morphy'=>'MemberNature', - 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", 'd.nom'=>"State", 'co.code'=>"CountryCode", 'co.label'=>"Country", + 'a.rowid'=>'MemberId', 'a.ref'=>'MemberRef', 'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname", 'a.firstname'=>"Firstname", 'a.login'=>"Login", 'a.gender'=>"Gender", 'a.morphy'=>'MemberNature', + 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", 'd.code_departement'=>'StateCode', 'd.nom'=>"State", 'co.code'=>"CountryCode", 'co.label'=>"Country", 'a.phone'=>"PhonePro", 'a.phone_perso'=>"PhonePerso", 'a.phone_mobile'=>"PhoneMobile", 'a.email'=>"Email", 'a.birth'=>"Birthday", 'a.statut'=>"Status", 'a.photo'=>"Photo", 'a.note_public'=>"NotePublic", 'a.note_private'=>"NotePrivate", 'a.datec'=>'DateCreation', 'a.datevalid'=>'DateValidation', 'a.tms'=>'DateLastModification', 'a.datefin'=>'DateEndSubscription', 'ta.rowid'=>'MemberTypeId', 'ta.libelle'=>'MemberTypeLabel', @@ -301,7 +301,7 @@ class modAdherent extends DolibarrModules 'c.rowid'=>'Numeric', 'c.dateadh'=>'Date', 'c.datef'=>'Date', 'c.subscription'=>'Numeric' ); $this->export_entities_array[$r] = array( - 'a.rowid'=>'member', 'a.civility'=>"member", 'a.lastname'=>"member", 'a.firstname'=>"member", 'a.login'=>"member", 'a.gender'=>'member', 'a.morphy'=>'member', + 'a.rowid'=>'member', 'a.ref'=>'member', 'a.civility'=>"member", 'a.lastname'=>"member", 'a.firstname'=>"member", 'a.login'=>"member", 'a.gender'=>'member', 'a.morphy'=>'member', 'a.societe'=>'member', 'a.address'=>"member", 'a.zip'=>"member", 'a.town'=>"member", 'd.nom'=>"member", 'co.code'=>"member", 'co.label'=>"member", 'a.phone'=>"member", 'a.phone_perso'=>"member", 'a.phone_mobile'=>"member", 'a.email'=>"member", 'a.birth'=>"member", 'a.statut'=>"member", 'a.photo'=>"member", 'a.note_public'=>"member", 'a.note_private'=>"member", 'a.datec'=>'member', 'a.datevalid'=>'member', 'a.tms'=>'member', @@ -338,10 +338,10 @@ class modAdherent extends DolibarrModules $this->import_tables_array[$r] = array('a'=>MAIN_DB_PREFIX.'adherent', 'extra'=>MAIN_DB_PREFIX.'adherent_extrafields'); $this->import_tables_creator_array[$r] = array('a'=>'fk_user_author'); // Fields to store import user id $this->import_fields_array[$r] = array( - 'a.ref' => 'Member Ref*', + 'a.ref' => 'MemberRef*', 'a.civility'=>"UserTitle", 'a.lastname'=>"Lastname*", 'a.firstname'=>"Firstname", 'a.gender'=>"Gender", 'a.login'=>"Login*", "a.pass"=>"Password", - "a.fk_adherent_type"=>"MemberType*", 'a.morphy'=>'MemberNature*', 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", - 'a.state_id'=>'StateId', 'a.country'=>"CountryId", 'a.phone'=>"PhonePro", 'a.phone_perso'=>"PhonePerso", 'a.phone_mobile'=>"PhoneMobile", + "a.fk_adherent_type"=>"MemberTypeId*", 'a.morphy'=>'MemberNature*', 'a.societe'=>'Company', 'a.address'=>"Address", 'a.zip'=>"Zip", 'a.town'=>"Town", + 'a.state_id'=>'StateId|StateCode', 'a.country'=>"CountryId|CountryCode", 'a.phone'=>"PhonePro", 'a.phone_perso'=>"PhonePerso", 'a.phone_mobile'=>"PhoneMobile", 'a.email'=>"Email", 'a.birth'=>"Birthday", 'a.statut'=>"Status*", 'a.photo'=>"Photo", 'a.note_public'=>"NotePublic", 'a.note_private'=>"NotePrivate", 'a.datec'=>'DateCreation', 'a.datefin'=>'DateEndSubscription' ); @@ -397,7 +397,7 @@ class modAdherent extends DolibarrModules if (!empty($conf->societe->enabled)) { $this->import_examplevalues_array[$r]['a.fk_soc'] = "rowid or name"; } - $this->import_updatekeys_array[$r] = array('a.ref'=>'Member Ref', 'a.login'=>'Login'); + $this->import_updatekeys_array[$r] = array('a.ref'=>'MemberRef', 'a.login'=>'Login'); // Cronjobs $arraydate = dol_getdate(dol_now()); diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index 2cdc8229e51..498ff55da74 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -517,7 +517,8 @@ class modFacture extends DolibarrModules 'fd.subprice'=>"LineUnitPrice", 'fd.tva_tx'=>"LineVATRate", 'fd.qty'=>"LineQty", 'fd.total_ht'=>"LineTotalHT", 'fd.total_tva'=>"LineTotalVAT", 'fd.total_ttc'=>"LineTotalTTC", 'fd.date_start'=>"DateStart", 'fd.date_end'=>"DateEnd", 'fd.special_code'=>'SpecialCode', 'fd.product_type'=>"TypeOfLineServiceOrProduct", 'fd.fk_product'=>'ProductId', 'p.ref'=>'ProductRef', 'p.label'=>'ProductLabel', - $alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode' + $alias_product_perentity . '.accountancy_code_sell'=>'ProductAccountancySellCode', + 'aa.account_number' => 'AccountingAffectation' ); if (!empty($conf->multicurrency->enabled)) { $this->export_fields_array[$r]['f.multicurrency_code'] = 'Currency'; @@ -549,6 +550,7 @@ class modFacture extends DolibarrModules 'fd.special_code'=>'Numeric', 'fd.product_type'=>"Numeric", 'fd.fk_product'=>'List:product:label', 'p.ref'=>'Text', 'p.label'=>'Text', $alias_product_perentity . '.accountancy_code_sell'=>'Text', 'f.entity'=>'List:entity:label:rowid', + 'aa.account_number' => 'Text' ); if (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->INVOICE_SHOW_POS)) { $this->export_TypeFields_array[$r]['f.module_source'] = 'Text'; @@ -561,7 +563,8 @@ class modFacture extends DolibarrModules 'fd.subprice'=>"invoice_line", 'fd.total_ht'=>"invoice_line", 'fd.total_tva'=>"invoice_line", 'fd.total_ttc'=>"invoice_line", 'fd.tva_tx'=>"invoice_line", 'fd.qty'=>"invoice_line", 'fd.date_start'=>"invoice_line", 'fd.date_end'=>"invoice_line", 'fd.special_code'=>'invoice_line', 'fd.product_type'=>'invoice_line', 'fd.fk_product'=>'product', 'p.ref'=>'product', 'p.label'=>'product', $alias_product_perentity . '.accountancy_code_sell'=>'product', - 'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user' + 'f.fk_user_author'=>'user', 'uc.login'=>'user', 'f.fk_user_valid'=>'user', 'uv.login'=>'user', + 'aa.account_number' => "invoice_line", ); $this->export_special_array[$r] = array('none.rest'=>'getRemainToPay'); $this->export_dependencies_array[$r] = array('invoice_line'=>'fd.rowid', 'product'=>'fd.rowid', 'none.rest'=>array('f.rowid', 'f.total_ttc', 'f.close_code')); // To add unique key if we ask a field of a child to avoid the DISTINCT to discard them @@ -602,6 +605,7 @@ class modFacture extends DolibarrModules $this->export_sql_end[$r] .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); } $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; + $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'accounting_account as aa on fd.fk_code_ventilation = aa.rowid'; $this->export_sql_end[$r] .= ' WHERE f.fk_soc = s.rowid AND f.rowid = fd.fk_facture'; $this->export_sql_end[$r] .= ' AND f.entity IN ('.getEntity('invoice').')'; if (empty($user->rights->societe->client->voir)) { diff --git a/htdocs/core/modules/modMultiCurrency.class.php b/htdocs/core/modules/modMultiCurrency.class.php index 73c58100ea5..28f2f7cdd16 100644 --- a/htdocs/core/modules/modMultiCurrency.class.php +++ b/htdocs/core/modules/modMultiCurrency.class.php @@ -286,7 +286,7 @@ class modMultiCurrency extends DolibarrModules $multicurrency = new MultiCurrency($this->db); - if (!$multicurrency->checkCodeAlreadyExists($conf->currency)) { + if (! $multicurrency->checkCodeAlreadyExists($conf->currency)) { $langs->loadCacheCurrencies(''); $multicurrency->code = $conf->currency; diff --git a/htdocs/core/modules/oauth/github_oauthcallback.php b/htdocs/core/modules/oauth/github_oauthcallback.php index 496a2c988fa..5c24e23aafa 100644 --- a/htdocs/core/modules/oauth/github_oauthcallback.php +++ b/htdocs/core/modules/oauth/github_oauthcallback.php @@ -34,9 +34,12 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $action = GETPOST('action', 'aZ09'); $backtourl = GETPOST('backtourl', 'alpha'); +$keyforprovider = GETPOST('keyforprovider', 'aZ09'); +if (empty($keyforprovider) && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) { + $keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"]; +} /** @@ -64,9 +67,11 @@ $serviceFactory->setHttpClient($httpClient); $storage = new DoliStorage($db, $conf); // Setup the credentials for the requests +$keyforparamid = 'OAUTH_GITHUB'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_GITHUB'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( - $conf->global->OAUTH_GITHUB_ID, - $conf->global->OAUTH_GITHUB_SECRET, + getDolGlobalString($keyforparamid), + getDolGlobalString($keyforparamsecret), $currentUri->getAbsoluteUri() ); @@ -81,13 +86,20 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { //var_dump($requestedpermissionsarray);exit; // Instantiate the Api service using the credentials, http client and storage mechanism for the token -$apiService = $serviceFactory->createService('GitHub', $credentials, $storage, $requestedpermissionsarray); +$apiService = $serviceFactory->createService('GitHub'.($keyforprovider ? '-'.$keyforprovider : ''), $credentials, $storage, $requestedpermissionsarray); // access type needed to have oauth provider refreshing token //$apiService->setAccessType('offline'); $langs->load("oauth"); +if (!getDolGlobalString($keyforparamid)) { + accessforbidden('Setup of service is not complete. Customer ID is missing'); +} +if (!getDolGlobalString($keyforparamsecret)) { + accessforbidden('Setup of service is not complete. Secret key is missing'); +} + /* * Actions @@ -140,14 +152,15 @@ if (!empty($_GET['code'])) { // We are coming from oauth provider page } catch (Exception $e) { print $e->getMessage(); } -} else // If entry on page with no parameter, we arrive here -{ +} else { // If entry on page with no parameter, we arrive here $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; + $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; + $_SESSION['oauthstateanticsrf'] = $state; // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). if (GETPOST('state')) { - $url = $apiService->getAuthorizationUri(array('state'=>GETPOST('state'))); + $url = $apiService->getAuthorizationUri(array('state' => GETPOST('state'))); } else { $url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated } diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php index 9fbc38ef156..2812c4f7163 100644 --- a/htdocs/core/modules/oauth/google_oauthcallback.php +++ b/htdocs/core/modules/oauth/google_oauthcallback.php @@ -40,6 +40,11 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai $action = GETPOST('action', 'aZ09'); $backtourl = GETPOST('backtourl', 'alpha'); +$keyforprovider = GETPOST('keyforprovider', 'aZ09'); +if (empty($keyforprovider) && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) { + // If we are coming from the Oauth page + $keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"]; +} /** @@ -63,23 +68,25 @@ $httpClient = new \OAuth\Common\Http\Client\CurlClient(); //$httpClient->setCurlParameters($params); $serviceFactory->setHttpClient($httpClient); -// Dolibarr storage -$storage = new DoliStorage($db, $conf); - // Setup the credentials for the requests +$keyforparamid = 'OAUTH_GOOGLE'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_GOOGLE'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( - $conf->global->OAUTH_GOOGLE_ID, - $conf->global->OAUTH_GOOGLE_SECRET, + getDolGlobalString($keyforparamid), + getDolGlobalString($keyforparamsecret), $currentUri->getAbsoluteUri() ); $state = GETPOST('state'); +$statewithscopeonly = ''; +$statewithanticsrfonly = ''; $requestedpermissionsarray = array(); if ($state) { // 'state' parameter is standard to store a hash value and can be used to retrieve some parameters back $statewithscopeonly = preg_replace('/\-.*$/', '', $state); $requestedpermissionsarray = explode(',', $statewithscopeonly); // Example: 'userinfo_email,userinfo_profile,openid,email,profile,cloud_print'. + $statewithanticsrfonly = preg_replace('/^.*\-/', '', $state); } if ($action != 'delete' && empty($requestedpermissionsarray)) { print 'Error, parameter state is not defined'; @@ -88,6 +95,8 @@ if ($action != 'delete' && empty($requestedpermissionsarray)) { //var_dump($requestedpermissionsarray);exit; +// Dolibarr storage +$storage = new DoliStorage($db, $conf, $keyforprovider); // Instantiate the Api service using the credentials, http client and storage mechanism for the token // $requestedpermissionsarray contains list of scopes. @@ -101,6 +110,13 @@ $apiService->setAccessType('offline'); $langs->load("oauth"); +if (!getDolGlobalString($keyforparamid)) { + accessforbidden('Setup of service is not complete. Customer ID is missing'); +} +if (!getDolGlobalString($keyforparamsecret)) { + accessforbidden('Setup of service is not complete. Secret key is missing'); +} + /* * Actions @@ -117,7 +133,7 @@ if ($action == 'delete') { } if (GETPOST('code')) { // We are coming from oauth provider page. - dol_syslog("We are coming from the oauth provider page"); + dol_syslog("We are coming from the oauth provider page keyforprovider=".$keyforprovider); // We must validate that the $state is the same than the one into $_SESSION['oauthstateanticsrf'], return error if not. if (isset($_SESSION['oauthstateanticsrf']) && $state != $_SESSION['oauthstateanticsrf']) { @@ -174,8 +190,10 @@ if (GETPOST('code')) { // We are coming from oauth provider page. } } else { // If we enter this page without 'code' parameter, we arrive here. this is the case when we want to get the redirect - // to the OAuth provider login page + // to the OAuth provider login page. $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; + $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; + $_SESSION['oauthstateanticsrf'] = $state; if (!preg_match('/^forlogin/', $state)) { $apiService->setApprouvalPrompt('force'); diff --git a/htdocs/core/modules/oauth/stripelive_oauthcallback.php b/htdocs/core/modules/oauth/stripelive_oauthcallback.php index 77ef3ebde1a..bf9656df783 100644 --- a/htdocs/core/modules/oauth/stripelive_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripelive_oauthcallback.php @@ -34,9 +34,12 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $action = GETPOST('action', 'aZ09'); $backtourl = GETPOST('backtourl', 'alpha'); +$keyforprovider = GETPOST('keyforprovider', 'aZ09'); +if (empty($keyforprovider) && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) { + $keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"]; +} /** @@ -64,9 +67,11 @@ $serviceFactory->setHttpClient($httpClient); $storage = new DoliStorage($db, $conf); // Setup the credentials for the requests +$keyforparamid = 'OAUTH_STRIPE_LIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_STRIPE_LIVE'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( - $conf->global->OAUTH_STRIPE_LIVE_ID, - $conf->global->STRIPE_LIVE_SECRET_KEY, + getDolGlobalString($keyforparamid), + getDolGlobalString($keyforparamsecret), $currentUri->getAbsoluteUri() ); @@ -84,7 +89,8 @@ if (GETPOST('state')) { // Instantiate the Api service using the credentials, http client and storage mechanism for the token //$apiService = $serviceFactory->createService('StripeTest', $credentials, $storage, $requestedpermissionsarray); -$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token set service='StripeLive', entity=".$conf->entity; +$servicesuffix = ($keyforprovider ? '-'.$keyforprovider : ''); +$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token SET service = 'StripeLive".$db->escape($servicesuffix)."', entity = ".((int) $conf->entity); $db->query($sql); // access type needed to have oauth provider refreshing token @@ -92,6 +98,13 @@ $db->query($sql); $langs->load("oauth"); +if (!getDolGlobalString($keyforparamid)) { + accessforbidden('Setup of service is not complete. Customer ID is missing'); +} +if (!getDolGlobalString($keyforparamsecret)) { + accessforbidden('Setup of service is not complete. Secret key is missing'); +} + /* * Actions @@ -148,6 +161,8 @@ if (!empty($_GET['code'])) { // We are coming from oauth provider page } else // If entry on page with no parameter, we arrive here { $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; + $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; + $_SESSION['oauthstateanticsrf'] = $state; // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). @@ -156,7 +171,7 @@ if (!empty($_GET['code'])) { // We are coming from oauth provider page } else { //$url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated //https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_AX27ut70tJ1j6eyFCV3ObEXhNOo2jY6V&scope=read_write - $url = 'https://connect.stripe.com/oauth/authorize?response_type=code&client_id='.$conf->global->OAUTH_STRIPE_LIVE_ID.'&scope=read_write'; + $url = 'https://connect.stripe.com/oauth/authorize?response_type=code&client_id='.$conf->global->$keyforparamid.'&scope=read_write'; } // we go on oauth provider authorization page diff --git a/htdocs/core/modules/oauth/stripetest_oauthcallback.php b/htdocs/core/modules/oauth/stripetest_oauthcallback.php index a31f0f43db4..64d55fba760 100644 --- a/htdocs/core/modules/oauth/stripetest_oauthcallback.php +++ b/htdocs/core/modules/oauth/stripetest_oauthcallback.php @@ -34,9 +34,12 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $action = GETPOST('action', 'aZ09'); $backtourl = GETPOST('backtourl', 'alpha'); +$keyforprovider = GETPOST('keyforprovider', 'aZ09'); +if (empty($keyforprovider) && !empty($_SESSION["oauthkeyforproviderbeforeoauthjump"]) && (GETPOST('code') || $action == 'delete')) { + $keyforprovider = $_SESSION["oauthkeyforproviderbeforeoauthjump"]; +} /** @@ -64,9 +67,11 @@ $serviceFactory->setHttpClient($httpClient); $storage = new DoliStorage($db, $conf); // Setup the credentials for the requests +$keyforparamid = 'OAUTH_STRIPE_TEST'.($keyforprovider ? '-'.$keyforprovider : '').'_ID'; +$keyforparamsecret = 'OAUTH_STRIPE_TEST'.($keyforprovider ? '-'.$keyforprovider : '').'_SECRET'; $credentials = new Credentials( - $conf->global->OAUTH_STRIPE_TEST_ID, - $conf->global->STRIPE_TEST_SECRET_KEY, + getDolGlobalString($keyforparamid), + getDolGlobalString($keyforparamsecret), $currentUri->getAbsoluteUri() ); @@ -84,7 +89,8 @@ if (GETPOST('state')) { // Instantiate the Api service using the credentials, http client and storage mechanism for the token //$apiService = $serviceFactory->createService('StripeTest', $credentials, $storage, $requestedpermissionsarray); -$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token set service='StripeTest', entity=".$conf->entity; +$servicesuffix = ($keyforprovider ? '-'.$keyforprovider : ''); +$sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token SET service = 'StripeTest".$db->escape($servicesuffix)."', entity = ".((int) $conf->entity); $db->query($sql); // access type needed to have oauth provider refreshing token @@ -92,6 +98,13 @@ $db->query($sql); $langs->load("oauth"); +if (!getDolGlobalString($keyforparamid)) { + accessforbidden('Setup of service is not complete. Customer ID is missing'); +} +if (!getDolGlobalString($keyforparamsecret)) { + accessforbidden('Setup of service is not complete. Secret key is missing'); +} + /* * Actions @@ -148,6 +161,8 @@ if (!empty($_GET['code'])) { // We are coming from oauth provider page } else // If entry on page with no parameter, we arrive here { $_SESSION["backtourlsavedbeforeoauthjump"] = $backtourl; + $_SESSION["oauthkeyforproviderbeforeoauthjump"] = $keyforprovider; + $_SESSION['oauthstateanticsrf'] = $state; // This may create record into oauth_state before the header redirect. // Creation of record with state in this tables depend on the Provider used (see its constructor). @@ -156,7 +171,7 @@ if (!empty($_GET['code'])) { // We are coming from oauth provider page } else { //$url = $apiService->getAuthorizationUri(); // Parameter state will be randomly generated //https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_AX27ut70tJ1j6eyFCV3ObEXhNOo2jY6V&scope=read_write - $url = 'https://connect.stripe.com/oauth/authorize?response_type=code&client_id='.$conf->global->OAUTH_STRIPE_TEST_ID.'&scope=read_write'; + $url = 'https://connect.stripe.com/oauth/authorize?response_type=code&client_id='.$conf->global->$keyforparamid.'&scope=read_write'; } // we go on oauth provider authorization page diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 8bd1e0d647d..cc6a1168c32 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -72,19 +72,25 @@ class InterfaceWorkflowManager extends DolibarrTriggers if ($action == 'PROPAL_CLOSE_SIGNED') { dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); if (!empty($conf->commande->enabled) && !empty($conf->global->WORKFLOW_PROPAL_AUTOCREATE_ORDER)) { - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $newobject = new Commande($this->db); + $object->fetchObjectLinked(); + if (!empty($object->linkedObjectsIds['commande'])) { + setEventMessages($langs->trans("OrderExists"), null, 'warnings'); + return $ret; + } else { + include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + $newobject = new Commande($this->db); - $newobject->context['createfrompropal'] = 'createfrompropal'; - $newobject->context['origin'] = $object->element; - $newobject->context['origin_id'] = $object->id; + $newobject->context['createfrompropal'] = 'createfrompropal'; + $newobject->context['origin'] = $object->element; + $newobject->context['origin_id'] = $object->id; - $ret = $newobject->createFromProposal($object, $user); - if ($ret < 0) { - $this->error = $newobject->error; - $this->errors[] = $newobject->error; + $ret = $newobject->createFromProposal($object, $user); + if ($ret < 0) { + $this->error = $newobject->error; + $this->errors[] = $newobject->error; + } + return $ret; } - return $ret; } } diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index bdd670814c2..6fd71669d9c 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -389,7 +389,7 @@ if (($action == "create") || ($action == "edit")) { print ''; print $langs->trans('CronArgs').""; - print "params."\" /> "; + print ' '; print ""; print ""; print $form->textwithpicto('', $langs->trans("CronArgsHelp"), 1, 'help'); @@ -398,7 +398,7 @@ if (($action == "create") || ($action == "edit")) { print ''; print $langs->trans('CronCommand').""; - print "command."\" /> "; + print ' '; print ""; print ""; print $form->textwithpicto('', $langs->trans("CronCommandHelp"), 1, 'help'); @@ -471,7 +471,7 @@ if (($action == "create") || ($action == "edit")) { if (!empty($object->datestart)) { print $form->selectDate($object->datestart, 'datestart', 1, 1, '', "cronform"); } else { - print $form->selectDate('', 'datestart', 1, 1, '', "cronform"); + print $form->selectDate(-1, 'datestart', 1, 1, '', "cronform"); } print ""; print ""; @@ -483,7 +483,7 @@ if (($action == "create") || ($action == "edit")) { if (!empty($object->dateend)) { print $form->selectDate($object->dateend, 'dateend', 1, 1, '', "cronform"); } else { - print $form->selectDate(-1, 'dateend', 1, 1, 1, "cronform"); + print $form->selectDate(-1, 'dateend', 1, 1, '', "cronform"); } print ""; print ""; @@ -514,7 +514,7 @@ if (($action == "create") || ($action == "edit")) { print ""; print "\n"; - print ''; + print ''; print $langs->trans('CronDtNextLaunch'); print ' ('.$langs->trans('CronFrom').')'; print ""; @@ -768,7 +768,7 @@ if (($action == "create") || ($action == "edit")) { if (!$user->rights->cron->create) { print ''.$langs->trans("CronStatusActiveBtn").'/'.$langs->trans("CronStatusInactiveBtn").''; } else { - print ''.$langs->trans("Clone").''; + print ''.$langs->trans("ToClone").''; if (empty($object->status)) { print ''.$langs->trans("CronStatusActiveBtn").''; diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 44564e1b0ab..744ac1834aa 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -262,8 +262,8 @@ class Cronjob extends CommonObject // Check parameters // Put here code to add a control on parameters values - if (dol_strlen($this->datestart) == 0) { - $this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtStart')); + if (dol_strlen($this->datenextrun) == 0) { + $this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtNextLaunch')); $error++; } if (empty($this->label)) { @@ -377,10 +377,6 @@ class Cronjob extends CommonObject // Commit or rollback if ($error) { - foreach ($this->errors as $errmsg) { - dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } $this->db->rollback(); return -1 * $error; } else { @@ -717,8 +713,8 @@ class Cronjob extends CommonObject // Check parameters // Put here code to add a control on parameters values - if (dol_strlen($this->datestart) == 0) { - $this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtStart')); + if (dol_strlen($this->datenextrun) == 0) { + $this->errors[] = $langs->trans('CronFieldMandatory', $langs->transnoentitiesnoconv('CronDtNextLaunch')); $error++; } if ((dol_strlen($this->datestart) != 0) && (dol_strlen($this->dateend) != 0) && ($this->dateend < $this->datestart)) { @@ -873,7 +869,7 @@ class Cronjob extends CommonObject // Clear fields $object->status = self::STATUS_DISABLED; - $object->label = $langs->trans("CopyOf").' '.$object->label; + $object->label = $langs->trans("CopyOf").' '.$langs->trans($object->label); // Create clone $object->context['createfromclone'] = 'createfromclone'; @@ -968,7 +964,16 @@ class Cronjob extends CommonObject $label .= ' '.$this->getLibStatut(5); } $label .= '
'.$langs->trans('Ref').': '.$this->ref; - $label .= '
'.$langs->trans('Title').': '.$this->label; + $label .= '
'.$langs->trans('Title').': '.$langs->trans($this->label); + if ($this->label != $langs->trans($this->label)) { + $label .= ' ('.$this->label.')'; + } + if (!empty($this->datestart)) { + $label .= '
'.$langs->trans('CronDtStart').': '.dol_print_date($this->datestart, 'dayhour', 'tzuserrel'); + } + if (!empty($this->dateend)) { + $label .= '
'.$langs->trans('CronDtEnd').': '.dol_print_date($this->dateend, 'dayhour', 'tzuserrel'); + } $url = DOL_URL_ROOT.'/cron/card.php?id='.$this->id; @@ -1032,10 +1037,11 @@ class Cronjob extends CommonObject if ($this->db->num_rows($resql)) { $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; + + $this->user_modification_id = $obj->fk_user_mod; + $this->user_creation_id = $obj->fk_user_author; $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->tms); - $this->user_modification = $obj->fk_user_mod; - $this->user_creation = $obj->fk_user_author; } $this->db->free($resql); diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index c8cb251ea46..40fe27d3404 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -33,10 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "cron", "bills", "members")); -if (!$user->rights->cron->read) { - accessforbidden(); -} - $action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) $confirm = GETPOST('confirm', 'alpha'); @@ -87,6 +83,15 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); +// Security +if (!$user->rights->cron->read) { + accessforbidden(); +} + +$permissiontoread = $user->rights->cron->read; +$permissiontoadd = $user->rights->cron->create ? $user->rights->cron->create : $user->rights->cron->write; +$permissiontodelete = $user->rights->cron->delete; +$permissiontoexecute = $user->rights->cron->execute; /* @@ -129,7 +134,7 @@ if (empty($reshook)) { } // Delete jobs - if ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->cron->delete) { + if ($action == 'confirm_delete' && $confirm == "yes" && $permissiontodelete) { //Delete cron task $object = new Cronjob($db); $object->id = $id; @@ -141,7 +146,7 @@ if (empty($reshook)) { } // Execute jobs - if ($action == 'confirm_execute' && $confirm == "yes" && $user->rights->cron->execute) { + if ($action == 'confirm_execute' && $confirm == "yes" && $permissiontoexecute) { if (!empty($conf->global->CRON_KEY) && $conf->global->CRON_KEY != $securitykey) { setEventMessages('Security key '.$securitykey.' is wrong', null, 'errors'); $action = ''; @@ -196,9 +201,6 @@ if (empty($reshook)) { // Mass actions $objectclass = 'CronJob'; $objectlabel = 'CronJob'; - $permissiontoread = $user->rights->cron->read; - $permissiontoadd = $user->rights->cron->create ? $user->rights->cron->create : $user->rights->cron->write; - $permissiontodelete = $user->rights->cron->delete; $uploaddir = $conf->cron->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; if ($massaction && $permissiontoadd) { @@ -281,12 +283,8 @@ if (is_array($filter) && count($filter) > 0) { $sql .= " AND ".$key." LIKE '%".$db->escape($value)."%'"; } } -$sqlwhere = array(); if (!empty($search_module_name)) { - $sqlwhere[] = "(t.module_name = '".$db->escape($search_module_name)."')"; -} -if (count($sqlwhere) > 0) { - $sql .= " WHERE ".implode(' AND ', $sqlwhere); + $sql .= natural_search("t.module_name", $search_module_name); } // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -353,7 +351,7 @@ if ($action == 'execute') { print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.'&securitykey='.$securitykey.$param, $langs->trans("CronExecute"), $langs->trans("CronConfirmExecute"), "confirm_execute", '', '', 1); } -if ($action == 'delete') { +if ($action == 'delete' && empty($toselect)) { // Used when we make a delete on 1 line (not used for mass delete) print $form->formconfirm($_SERVER['PHP_SELF']."?id=".$id.$param, $langs->trans("CronDelete"), $langs->trans("CronConfirmDelete"), "confirm_delete", '', '', 1); } @@ -386,7 +384,6 @@ if ($optioncss != '') { } print ''; print ''; -print ''; print ''; print ''; print ''; @@ -434,10 +431,11 @@ print ''; print ''; print ''; print ' '; +print ''; print ' '; print ' '; -print ' '; -print ' '; +//print ' '; +//print ' '; print ' '; print ' '; print ' '; @@ -453,13 +451,14 @@ print ''; print ''; print ''; -print_liste_field_titre("ID", $_SERVER["PHP_SELF"], "t.rowid", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "t.rowid", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("CronLabel", $_SERVER["PHP_SELF"], "t.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Prority", $_SERVER["PHP_SELF"], "t.priority", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("CronTask", '', '', "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("CronModule", $_SERVER["PHP_SELF"], "t.module_name", "", $param, '', $sortfield, $sortorder); +print_liste_field_titre("CronType", '', '', "", $param, '', $sortfield, $sortorder); print_liste_field_titre("CronFrequency", '', "", "", $param, '', $sortfield, $sortorder); -print_liste_field_titre("CronDtStart", $_SERVER["PHP_SELF"], "t.datestart", "", $param, 'align="center"', $sortfield, $sortorder); -print_liste_field_titre("CronDtEnd", $_SERVER["PHP_SELF"], "t.dateend", "", $param, 'align="center"', $sortfield, $sortorder); +//print_liste_field_titre("CronDtStart", $_SERVER["PHP_SELF"], "t.datestart", "", $param, 'align="center"', $sortfield, $sortorder); +//print_liste_field_titre("CronDtEnd", $_SERVER["PHP_SELF"], "t.dateend", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("CronNbRun", $_SERVER["PHP_SELF"], "t.nbrun", "", $param, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("CronDtLastLaunch", $_SERVER["PHP_SELF"], "t.datelastrun", "", $param, 'align="center"', $sortfield, $sortorder); print_liste_field_titre("Duration", $_SERVER["PHP_SELF"], "", "", $param, 'align="center"', $sortfield, $sortorder); @@ -497,6 +496,9 @@ if ($num > 0) { $object->priority = $obj->priority; $object->processing = $obj->processing; $object->lastresult = $obj->lastresult; + $object->datestart = $db->jdate($obj->datestart); + $object->dateend = $db->jdate($obj->dateend); + $object->module_name = $obj->module_name; $datelastrun = $db->jdate($obj->datelastrun); $datelastresult = $db->jdate($obj->datelastresult); @@ -521,9 +523,15 @@ if ($num > 0) { // Priority print ''; - print $object->priority; + print dol_escape_htmltag($object->priority); print ''; + // Module + print ''; + print dol_escape_htmltag($object->module_name); + print ''; + + // Class/Method print ''; if ($obj->jobtype == 'method') { $text = $langs->trans("CronClass"); @@ -557,6 +565,7 @@ if ($num > 0) { } print ''; + /* print ''; if (!empty($obj->datestart)) { print dol_print_date($db->jdate($obj->datestart), 'dayhour', 'tzserver'); @@ -568,15 +577,16 @@ if ($num > 0) { print dol_print_date($db->jdate($obj->dateend), 'dayhour', 'tzserver'); } print ''; + */ print ''; if (!empty($obj->nbrun)) { - print $obj->nbrun; + print dol_escape_htmltag($obj->nbrun); } else { print '0'; } if (!empty($obj->maxrun)) { - print ' / '.$obj->maxrun.''; + print ' / '.dol_escape_htmltag($obj->maxrun).''; } print ''; @@ -598,24 +608,27 @@ if ($num > 0) { print ''; // Return code of last run - print ''; + print ''; if ($obj->lastresult != '') { if (empty($obj->lastresult)) { - print $obj->lastresult; + print $obj->lastresult; // Print '0' } else { - print ''.dol_trunc($obj->lastresult).''; + print ''.dol_escape_htmltag(dol_trunc($obj->lastresult)).''; } } print ''; // Output of last run - print ''; + print ''; if (!empty($obj->lastoutput)) { - print dol_trunc(nl2br($obj->lastoutput), 50); + print '
'; + print dol_trunc(dolGetFirstLineOfText($obj->lastoutput, 2), 100); + print '
'; } print ''; - print ''; + // Next run + print ''; if (!empty($obj->datenextrun)) { $datenextrun = $db->jdate($obj->datenextrun); if (empty($obj->status)) { diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 0ce92f44e1b..4c0811e70c9 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -974,7 +974,7 @@ class Don extends CommonObject public function info($id) { $sql = 'SELECT d.rowid, d.datec, d.fk_user_author, d.fk_user_valid,'; - $sql .= ' d.tms'; + $sql .= ' d.tms as datem'; $sql .= ' FROM '.MAIN_DB_PREFIX.'don as d'; $sql .= ' WHERE d.rowid = '.((int) $id); @@ -985,16 +985,9 @@ class Don extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_modification = $vuser; - } + + $this->user_creation_id = $obj->fk_user_author; + $this->user_validation_id = $obj->fk_user_valid; $this->date_creation = $this->db->jdate($obj->datec); $this->date_modification = $this->db->jdate($obj->tms); } diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index a0a1db6056e..9a60624e9d2 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; // Ship require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; // supplier invoice require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; // supplier order require_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; // supplier proposal -require_once DOL_DOCUMENT_ROOT."/reception/class/reception.class.php"; // reception +require_once DOL_DOCUMENT_ROOT.'/reception/class/reception.class.php'; // reception include_once DOL_DOCUMENT_ROOT.'/emailcollector/lib/emailcollector.lib.php'; //require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; // Holidays (leave request) //require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; // expernse report @@ -615,7 +615,7 @@ class EmailCollector extends CommonObject */ public function info($id) { - $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; + $sql = 'SELECT rowid, date_creation as datec, tms as datem,'; $sql .= ' fk_user_creat, fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; $sql .= ' WHERE t.rowid = '.((int) $id); @@ -624,27 +624,11 @@ class EmailCollector extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index 5c7681a3782..37bd93926cb 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -484,27 +484,11 @@ class EmailCollectorAction extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index ec42ce53a34..6386ee3c27f 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -458,27 +458,11 @@ class EmailCollectorFilter extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index 2ab747f12c1..3df55ff48f3 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -679,14 +679,11 @@ class ConferenceOrBooth extends ActionComm if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index b65d152189f..3dae278d3a1 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -947,27 +947,11 @@ class ConferenceOrBoothAttendee extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index a64e6c2b761..328a84430a9 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -797,6 +797,10 @@ if ($id > 0 || !empty($ref)) { print $product->stock_reel; if ($product->stock_reel < $toBeShipped[$objp->fk_product]) { print ' '.img_warning($langs->trans("StockTooLow")); + if (!empty($conf->global->STOCK_CORRECT_STOCK_IN_SHIPMENT)) { + $nbPiece = $toBeShipped[$objp->fk_product] - $product->stock_reel; + print '   '.$langs->trans("GoTo").' '.$langs->trans("CorrectStock").''; + } } print ''; } else { diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index a877b659141..47eefb01be9 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -138,7 +138,7 @@ $candelete = 0; if (!empty($user->rights->expensereport->supprimer)) { $candelete = 1; } -if ($object->statut == ExpenseReport::STATUS_DRAFT && !empty($user->rights->expensereport->write) && in_array($object->fk_user_author, $childids)) { +if ($object->statut == ExpenseReport::STATUS_DRAFT && $user->hasRight('expensereport', 'write') && in_array($object->fk_user_author, $childids)) { $candelete = 1; } diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 4f001238134..f06e83f4c40 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -883,9 +883,9 @@ if ($step == 4 && $datatoexport) { if (isset($objexport->array_export_fields[0][$code])) { $list .= ($list ? ', ' : ''); if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) { - $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); + $list .= ''.$langs->trans($objexport->array_export_fields[0][$code]).''.(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); } else { - $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + $list .= ''.$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; } } } @@ -1163,9 +1163,9 @@ if ($step == 5 && $datatoexport) { if (isset($objexport->array_export_fields[0][$code])) { $list .= ($list ? ', ' : ''); if (isset($array_filtervalue[$code]) && preg_match('/^\s*[<>]/', $array_filtervalue[$code])) { - $list .= $langs->trans($objexport->array_export_fields[0][$code]).(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); + $list .= ''.$langs->trans($objexport->array_export_fields[0][$code]).''.(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : ''); } else { - $list .= $langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; + $list .= ''.$langs->trans($objexport->array_export_fields[0][$code])."='".(isset($array_filtervalue[$code]) ? $array_filtervalue[$code] : '')."'"; } } } diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index 7462dd82c35..6deb6e9cf72 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -29,7 +29,7 @@ require '../main.inc.php'; // Load translation files required by the page -$langs->load("externalsite"); +$langs->load("other"); $mainmenu = GETPOST('mainmenu', "aZ09"); diff --git a/htdocs/externalsite/frametop.php b/htdocs/externalsite/frametop.php index 7aac7955262..f774d89d0c6 100644 --- a/htdocs/externalsite/frametop.php +++ b/htdocs/externalsite/frametop.php @@ -25,7 +25,7 @@ require "../main.inc.php"; // Load translation files required by the page -$langs->load("externalsite"); +$langs->load("other"); top_htmlhead("", ""); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index b9f0264ad46..029c5651a32 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -590,7 +590,7 @@ class Fichinter extends CommonObject $sql .= " SET fk_statut = 1"; $sql .= ", ref = '".$this->db->escape($num)."'"; $sql .= ", date_valid = '".$this->db->idate($now)."'"; - $sql .= ", fk_user_valid = ".((int) $user->id); + $sql .= ", fk_user_valid = ".($user->id > 0 ? (int) $user->id : "null"); $sql .= " WHERE rowid = ".((int) $this->id); $sql .= " AND entity = ".((int) $conf->entity); $sql .= " AND fk_statut = 0"; @@ -1204,7 +1204,7 @@ class Fichinter extends CommonObject // Clear fields $this->user_author_id = $user->id; - $this->user_valid = ''; + $this->user_valid = 0; $this->date_creation = ''; $this->date_validation = ''; $this->ref_client = ''; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 00208d53a19..3212766a573 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -856,6 +856,9 @@ class CommandeFournisseur extends CommonOrder if (!empty($this->total_ttc)) { $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); } + if (!empty($this->date)) { + $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); + } if (!empty($this->delivery_date)) { $label .= '
'.$langs->trans('DeliveryDate').': '.dol_print_date($this->delivery_date, 'dayhour'); } @@ -1578,7 +1581,7 @@ class CommandeFournisseur extends CommonOrder $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; $sql .= " fk_user_author=".(isset($this->user_author_id) ? $this->user_author_id : "null").","; - $sql .= " fk_user_valid=".(isset($this->user_valid) ? $this->user_valid : "null").","; + $sql .= " fk_user_valid=".(isset($this->user_valid) && $this->user_valid > 0 ? $this->user_valid : "null").","; $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; $sql .= " fk_mode_reglement=".(isset($this->mode_reglement_id) ? $this->mode_reglement_id : "null").","; @@ -1676,7 +1679,7 @@ class CommandeFournisseur extends CommonOrder // Clear fields $this->user_author_id = $user->id; - $this->user_valid = ''; + $this->user_valid = 0; $this->date_creation = ''; $this->date_validation = ''; $this->ref_supplier = ''; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index df10ed07632..5c6db6ce34d 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -3060,7 +3060,7 @@ class FactureFournisseur extends CommonInvoice // Clear fields $object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier); $object->author = $user->id; - $object->user_valid = ''; + $object->user_valid = 0; $object->fk_facture_source = 0; $object->date_creation = ''; $object->date_validation = ''; diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 24d1671b37e..19a630871fc 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -2080,7 +2080,7 @@ if ($action == 'create') { // Date if ($object->methode_commande_id > 0) { print ''.$langs->trans("Date").''; - print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin) : ''; + print $object->date_commande ? dol_print_date($object->date_commande, $usehourmin ? 'dayhour' : 'day') : ''; if ($object->hasDelay() && !empty($object->date_delivery) && !empty($object->date_commande)) { print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); } diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index cd24a3a881a..b62424eb2fe 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -25,7 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$langs->loadLangs(array("admin", "ftp")); +$langs->loadLangs(array("admin", "other")); // Security check if (!$user->admin) { diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index bbf01bb4fbe..419727b1cca 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('ftp', 'companies', 'other')); +$langs->loadLangs(array('companies', 'other')); // Security check if ($user->socid) { diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 2a2c4e4b3dd..326ced8b9c8 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -395,7 +395,7 @@ class Establishment extends CommonObject */ public function info($id) { - $sql = 'SELECT e.rowid, e.ref, e.datec, e.fk_user_author, e.tms, e.fk_user_mod, e.entity'; + $sql = 'SELECT e.rowid, e.ref, e.datec, e.fk_user_author, e.tms as datem, e.fk_user_mod, e.entity'; $sql .= ' FROM '.MAIN_DB_PREFIX.'establishment as e'; $sql .= ' WHERE e.rowid = '.((int) $id); @@ -407,19 +407,10 @@ class Establishment extends CommonObject $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - $this->date_creation = $this->db->jdate($obj->datec); - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_mod) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_mod); - $this->user_modification = $muser; - - $this->date_modification = $this->db->jdate($obj->tms); - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_mod; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); } else { diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 8050eb08ec9..77403631725 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -878,27 +878,11 @@ class Evaluation extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 0ca56d84e60..8fd7d3b177a 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -850,27 +850,11 @@ class Evaluationline extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 8d4c09528a7..c21335f2df5 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -884,27 +884,11 @@ class Job extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index f83fa5901d8..9416907b8ed 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -930,27 +930,11 @@ class Position extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } - - $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index ddf5fe989f2..c2e8833955b 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -924,27 +924,11 @@ class Skill extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index ac91e2ef21a..3c24ca78415 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -838,27 +838,11 @@ class Skilldet extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 51768171049..6e2413c4f5f 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -877,27 +877,11 @@ class SkillRank extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index 11dcf9a5172..b2ac9e6bce1 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -317,6 +317,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; print ''; + print ''; print '
'; print ''; print ''; @@ -336,6 +337,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; print ''; + print ''; print ''; } print '
'; diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 38a540ca042..51a50c6376c 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -876,9 +876,9 @@ if ($step == 4 && $datatoimport) { $isrequired = preg_match('/\*$/', $label); if (!empty($isrequired)) { $newlabel = substr($label, 0, -1); - $fieldstarget_tmp[$key] = array("label"=>$newlabel,"required"=>true); + $fieldstarget_tmp[$key] = array("label"=>$newlabel, "required"=>true); } else { - $fieldstarget_tmp[$key] = array("label"=>$label,"required"=>false); + $fieldstarget_tmp[$key] = array("label"=>$label, "required"=>false); } if (!empty($array_match_database_to_file[$key])) { $fieldstarget_tmp[$key]["imported"] = true; @@ -1089,9 +1089,14 @@ if ($step == 4 && $datatoimport) { $optionsall = array(); foreach ($fieldstarget as $code => $line) { //var_dump($line); - $labeltoshow = $langs->transnoentities($line["label"]); - $optionsall[$code] = array('labelkey'=>$line['label'], 'label'=>$labeltoshow, 'required'=>(empty($line["required"]) ? 0 : 1), 'position'=>!empty($line['position']) ? $line['position'] : 0); - // TODO Get type from an new array into module descriptor. + + $tmparray = explode('|', $line["label"]); // If label of field is several translation keys separated with | + $labeltoshow = ''; + foreach ($tmparray as $tmpkey => $tmpval) { + $labeltoshow .= ($labeltoshow ? ' '.$langs->trans('or').' ' : '').$langs->transnoentities($tmpval); + } + $optionsall[$code] = array('labelkey'=>$line['label'], 'labelkeyarray'=>$tmparray, 'label'=>$labeltoshow, 'required'=>(empty($line["required"]) ? 0 : 1), 'position'=>!empty($line['position']) ? $line['position'] : 0); + // TODO Get type from a new array into module descriptor. //$picto = 'email'; $picto = ''; if ($picto) { @@ -1129,9 +1134,6 @@ if ($step == 4 && $datatoimport) { print '
'; $entity = (!empty($objimport->array_import_entities[0][$code]) ? $objimport->array_import_entities[0][$code] : $objimport->array_import_icon[0]); - $tablealias = preg_replace('/(\..*)$/i', '', $code); - $tablename = !empty($objimport->array_import_tables[0][$tablealias]) ? $objimport->array_import_tables[0][$tablealias] : ""; - $entityicon = !empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ... $entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ... @@ -1161,6 +1163,48 @@ if ($step == 4 && $datatoimport) { $label .= $tmpval['label']; $label .= $tmpval['required'] ? '*' : ''; + $tablealias = preg_replace('/(\..*)$/i', '', $tmpcode); + $tablename = !empty($objimport->array_import_tables[0][$tablealias]) ? $objimport->array_import_tables[0][$tablealias] : ""; + + $htmltext = ''; + + $filecolumn = ($i + 1); + // Source field info + if (empty($objimport->array_import_convertvalue[0][$tmpcode])) { // If source file does not need convertion + $filecolumntoshow = num2Alpha($i); + } else { + if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromref') { + $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).'
'; + } + if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromcodeid') { + $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).'
'; + } + } + // Source required + $example = !empty($objimport->array_import_examplevalues[0][$tmpcode])?$objimport->array_import_examplevalues[0][$tmpcode]:""; + // Example + if (empty($objimport->array_import_convertvalue[0][$tmpcode])) { // If source file does not need convertion + if ($example) { + $htmltext .= $langs->trans("SourceExample").': '.str_replace('"', '', $example).'
'; + } + } else { + if ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromref') { + $htmltext .= $langs->trans("SourceExample").': '.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; + } elseif ($objimport->array_import_convertvalue[0][$tmpcode]['rule'] == 'fetchidfromcodeid') { + $htmltext .= $langs->trans("SourceExample").': '.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; + } elseif ($example) { + $htmltext .= $langs->trans("SourceExample").': '.str_replace('"', '', $example).'
'; + } + } + // Format control rule + if (!empty($objimport->array_import_regex[0][$tmpcode])) { + $htmltext .= $langs->trans("FormatControlRule").': '.str_replace('"', '', $objimport->array_import_regex[0][$tmpcode]).'
'; + } + + $htmltext .= $langs->trans("Table")."->".$langs->trans("Field").':   '.$tablename."->".preg_replace('/^.*\./', '', $tmpcode).""; + + $labelhtml = $label.' '.$form->textwithpicto('', $htmltext, 1, 'help', '', 1); + $selectforline .= ''; print ''; $i++; } @@ -1926,9 +1931,9 @@ if ($step == 5 && $datatoimport) { print $langs->trans("TooMuchErrors", (count($arrayoferrors) - $nboferrors))."
"; break; } - print '* '.$langs->trans("Line").' '.$key.'
'; + print '* '.$langs->trans("Line").' '.dol_escape_htmltag($key).'
'; foreach ($val as $i => $err) { - print '     > '.$err['lib'].'
'; + print '     > '.dol_escape_htmltag($err['lib']).'
'; } } print '
' . $langs->trans('AddSkill') . '
'; - $filecolumn = ($i + 1); + // Source field info $htmltext = ''.$langs->trans("FieldSource").'
'; - if ($filecolumn > count($fieldssource)) { - $htmltext .= $langs->trans("DataComeFromNoWhere").'
'; - } else { - if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion - $filecolumntoshow = num2Alpha($i); - $htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'
'; - } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { - $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).'
'; - } - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { - $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).'
'; - } - } - } - // Source required - $example = !empty($objimport->array_import_examplevalues[0][$code])?$objimport->array_import_examplevalues[0][$code]:""; - // Example - if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion - if ($example) { - $htmltext .= $langs->trans("SourceExample").': '.$example.'
'; - } - } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { - $htmltext .= $langs->trans("SourceExample").': '.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; - } elseif ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { - $htmltext .= $langs->trans("SourceExample").': '.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; - } elseif ($example) { - $htmltext .= $langs->trans("SourceExample").': '.$example.'
'; - } - } - // Format control rule - if (!empty($objimport->array_import_regex[0][$code])) { - $htmltext .= $langs->trans("FormatControlRule").': '.$objimport->array_import_regex[0][$code].'
'; - } - $htmltext .= '
'; - // Target field info - $htmltext .= ''.$langs->trans("FieldTarget").'
'; - //$htmltext .= $langs->trans("SourceRequired").': '.yn($line["label"]).'
'; - if (empty($objimport->array_import_convertvalue[0][$code])) { // If source file does not need convertion - $htmltext .= $langs->trans("DataIsInsertedInto").'
'; - } else { - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') { - $htmltext .= $langs->trans("DataIDSourceIsInsertedInto").'
'; - } - if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') { - $htmltext .= $langs->trans("DataCodeIDSourceIsInsertedInto").'
'; - } - } - $htmltext .= $langs->trans("FieldTitle").": ".$langs->trans($fieldstarget[$arraykeysfieldtarget[$code-1]]["label"])."
"; - $htmltext .= $langs->trans("Table")." -> ".$langs->trans("Field").': '.$tablename." -> ".preg_replace('/^.*\./', '', $code)."
"; - print $form->textwithpicto($more, $htmltext); + $filecolumntoshow = num2Alpha($i); + $htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'
'; + + print $form->textwithpicto('', $htmltext); + + print '
'; @@ -1946,9 +1951,9 @@ if ($step == 5 && $datatoimport) { print $langs->trans("TooMuchWarnings", (count($arrayofwarnings) - $nbofwarnings))."
"; break; } - print ' * '.$langs->trans("Line").' '.$key.'
'; + print ' * '.$langs->trans("Line").' '.dol_escape_htmltag($key).'
'; foreach ($val as $i => $err) { - print '     > '.$err['lib'].'
'; + print '     > '.dol_escape_htmltag($err['lib']).'
'; } } print ''; diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index b2a79dc4751..8bd15b7602e 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -29,257 +29,280 @@ use OAuth\Common\Storage\Exception\TokenNotFoundException; use OAuth\Common\Storage\Exception\AuthorizationStateNotFoundException; use DoliDB; +/** + * Class to manage storage of OAUTH2 in Dolibarr + */ class DoliStorage implements TokenStorageInterface { - /** - * @var DoliDB Database handler - */ - protected $db; + /** + * @var DoliDB Database handler + */ + protected $db; - /** - * @var object|TokenInterface - */ - protected $tokens; + /** + * @var object|TokenInterface + */ + protected $tokens; - /** - * @var string Error code (or message) - */ - public $error; - /** - * @var string[] Several error codes (or messages) - */ - public $errors = array(); + /** + * @var string Error code (or message) + */ + public $error; + /** + * @var string[] Several error codes (or messages) + */ + public $errors = array(); - private $conf; - private $key; - private $stateKey; + private $conf; + private $key; + private $stateKey; + private $keyforprovider; - /** - * @param Conf $conf - * @param string $key - * @param string $stateKey - */ - public function __construct(DoliDB $db, $conf) - { - $this->db = $db; - $this->conf = $conf; - $this->tokens = array(); - $this->states = array(); - //$this->key = $key; - //$this->stateKey = $stateKey; - } - /** - * {@inheritDoc} - */ - public function retrieveAccessToken($service) - { - if ($this->hasAccessToken($service)) { - return $this->tokens[$service]; - } + /** + * @param DoliDB $db Database handler + * @param Conf $conf Conf object + * @param string $keyforprovider Key to manage several providers of the same type. For example 'abc' will be added to 'Google' to defined storage key. + */ + public function __construct(DoliDB $db, $conf, $keyforprovider = '') + { + $this->db = $db; + $this->conf = $conf; + $this->keyforprovider = $keyforprovider; + $this->tokens = array(); + $this->states = array(); + //$this->key = $key; + //$this->stateKey = $stateKey; + } - throw new TokenNotFoundException('Token not found in db, are you sure you stored it?'); - } + /** + * {@inheritDoc} + */ + public function retrieveAccessToken($service) + { + dol_syslog("retrieveAccessToken service=".$service); - /** - * {@inheritDoc} - */ - public function storeAccessToken($service, TokenInterface $token) - { - //var_dump("storeAccessToken"); - //var_dump($token); - dol_syslog("storeAccessToken"); - - $serializedToken = serialize($token); - $this->tokens[$service] = $token; + if ($this->hasAccessToken($service)) { + return $this->tokens[$service]; + } - if (!is_array($this->tokens)) { - $this->tokens = array(); - } - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " WHERE service='".$this->db->escape($service)."' AND entity=1"; - $resql = $this->db->query($sql); - if (! $resql) - { - dol_print_error($this->db); - } - $obj = $this->db->fetch_array($resql); - if ($obj) { - // update - $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " SET token='".$this->db->escape($serializedToken)."'"; - $sql.= " WHERE rowid='".$obj['rowid']."'"; - $resql = $this->db->query($sql); - } else { - // save - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity)"; - $sql.= " VALUES ('".$this->db->escape($service)."', '".$this->db->escape($serializedToken)."', 1)"; - $resql = $this->db->query($sql); - } - //print $sql; - - // allow chaining - return $this; - } + throw new TokenNotFoundException('Token not found in db, are you sure you stored it?'); + } - /** - * {@inheritDoc} - */ - public function hasAccessToken($service) - { - // get from db - dol_syslog("hasAccessToken service=".$service); - $sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " WHERE service='".$this->db->escape($service)."'"; - $resql = $this->db->query($sql); - if (! $resql) - { - dol_print_error($this->db); - } - $result = $this->db->fetch_array($resql); - $token = unserialize($result['token']); - - $this->tokens[$service] = $token; + /** + * {@inheritDoc} + */ + public function storeAccessToken($service, TokenInterface $token) + { + global $conf; - return is_array($this->tokens) - && isset($this->tokens[$service]) - && $this->tokens[$service] instanceof TokenInterface; - } + //var_dump("storeAccessToken"); + //var_dump($token); + dol_syslog("storeAccessToken service=".$service); - /** - * {@inheritDoc} - */ - public function clearToken($service) - { - // TODO - // get previously saved tokens - //$tokens = $this->retrieveAccessToken($service); + $serializedToken = serialize($token); + $this->tokens[$service] = $token; - //if (is_array($tokens) && array_key_exists($service, $tokens)) { - // unset($tokens[$service]); + if (!is_array($this->tokens)) { + $this->tokens = array(); + } + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_token"; + $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; + $sql .= " AND entity IN (".getEntity('oauth_token').")"; + $resql = $this->db->query($sql); + if (! $resql) { + dol_print_error($this->db); + } + $obj = $this->db->fetch_array($resql); + if ($obj) { + // update + $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_token"; + $sql.= " SET token = '".$this->db->escape($serializedToken)."'"; + $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $resql = $this->db->query($sql); + } else { + // save + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_token (service, token, entity)"; + $sql.= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($serializedToken)."', ".((int) $conf->entity).")"; + $resql = $this->db->query($sql); + } + //print $sql; - $sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token"; - $sql.= " WHERE service='".$this->db->escape($service)."'"; - $resql = $this->db->query($sql); - //} + // allow chaining + return $this; + } - // allow chaining - return $this; - } + /** + * {@inheritDoc} + */ + public function hasAccessToken($service) + { + // get from db + dol_syslog("hasAccessToken service=".$service); - /** - * {@inheritDoc} - */ - public function clearAllTokens() - { - // TODO - $this->conf->remove($this->key); + $sql = "SELECT token FROM ".MAIN_DB_PREFIX."oauth_token"; + $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; + $sql .= " AND entity IN (".getEntity('oauth_token').")"; + $resql = $this->db->query($sql); + if (! $resql) { + dol_print_error($this->db); + } + $result = $this->db->fetch_array($resql); + $token = unserialize($result['token']); - // allow chaining - return $this; - } + $this->tokens[$service] = $token; - /** - * {@inheritDoc} - */ - public function retrieveAuthorizationState($service) - { - if ($this->hasAuthorizationState($service)) { - return $this->states[$service]; + return is_array($this->tokens) + && isset($this->tokens[$service]) + && $this->tokens[$service] instanceof TokenInterface; + } - } + /** + * {@inheritDoc} + */ + public function clearToken($service) + { + dol_syslog("clearToken service=".$service); - throw new AuthorizationStateNotFoundException('State not found in db, are you sure you stored it?'); - } + // TODO + // get previously saved tokens + //$tokens = $this->retrieveAccessToken($service); - /** - * {@inheritDoc} - */ - public function storeAuthorizationState($service, $state) - { - // TODO save or update + //if (is_array($tokens) && array_key_exists($service, $tokens)) { + // unset($tokens[$service]); - if (!is_array($states)) { - $states = array(); - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."oauth_token"; + $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; + $sql .= " AND entity IN (".getEntity('oauth_token').")"; + $resql = $this->db->query($sql); + //} - $states[$service] = $state; - $this->states[$service] = $state; + // allow chaining + return $this; + } - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_state"; - $sql.= " WHERE service='".$this->db->escape($service)."' AND entity=1"; - $resql = $this->db->query($sql); - if (! $resql) - { - dol_print_error($this->db); - } - $obj = $this->db->fetch_array($resql); - if ($obj) { - // update - $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_state"; - $sql.= " SET state='".$this->db->escape($state)."'"; - $sql.= " WHERE rowid='".$obj['rowid']."'"; - $resql = $this->db->query($sql); - } else { - // save - $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_state (service, state, entity)"; - $sql.= " VALUES ('".$this->db->escape($service)."', '".$this->db->escape($state)."', 1)"; - $resql = $this->db->query($sql); - } + /** + * {@inheritDoc} + */ + public function clearAllTokens() + { + // TODO + $this->conf->remove($this->key); - // allow chaining - return $this; - } + // allow chaining + return $this; + } - /** - * {@inheritDoc} - */ - public function hasAuthorizationState($service) - { - // get state from db - dol_syslog("get state from db"); - $sql = "SELECT state FROM ".MAIN_DB_PREFIX."oauth_state"; - $sql.= " WHERE service='".$this->db->escape($service)."'"; - $resql = $this->db->query($sql); - $result = $this->db->fetch_array($resql); - $states[$service] = $result['state']; - $this->states[$service] = $states[$service]; + /** + * {@inheritDoc} + */ + public function retrieveAuthorizationState($service) + { + if ($this->hasAuthorizationState($service)) { + return $this->states[$service]; + } - return is_array($states) - && isset($states[$service]) - && null !== $states[$service]; - } + dol_syslog('State not found in db, are you sure you stored it?', LOG_WARNING); + throw new AuthorizationStateNotFoundException('State not found in db, are you sure you stored it?'); + } - /** - * {@inheritDoc} - */ - public function clearAuthorizationState($service) - { - // TODO - // get previously saved tokens - //$states = $this->conf->get($this->stateKey); + /** + * {@inheritDoc} + */ + public function storeAuthorizationState($service, $state) + { + global $conf; - if (is_array($states) && array_key_exists($service, $states)) { - unset($states[$service]); + // TODO save or update - // Replace the stored tokens array - //$this->conf->set($this->stateKey, $states); - } + dol_syslog("storeAuthorizationState service=".$service); - // allow chaining - return $this; - } + if (!isset($this->states) || !is_array($this->states)) { + $this->states = array(); + } - /** - * {@inheritDoc} - */ - public function clearAllAuthorizationStates() - { - // TODO - //$this->conf->remove($this->stateKey); + //$states[$service] = $state; + $this->states[$service] = $state; - // allow chaining - return $this; - } + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."oauth_state"; + $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; + $sql .= " AND entity IN (".getEntity('oauth_token').")"; + $resql = $this->db->query($sql); + if (! $resql) { + dol_print_error($this->db); + } + $obj = $this->db->fetch_array($resql); + if ($obj) { + // update + $sql = "UPDATE ".MAIN_DB_PREFIX."oauth_state"; + $sql.= " SET state = '".$this->db->escape($state)."'"; + $sql.= " WHERE rowid = ".((int) $obj['rowid']); + $resql = $this->db->query($sql); + } else { + // save + $sql = "INSERT INTO ".MAIN_DB_PREFIX."oauth_state (service, state, entity)"; + $sql.= " VALUES ('".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."', '".$this->db->escape($state)."', ".((int) $conf->entity).")"; + $resql = $this->db->query($sql); + } + // allow chaining + return $this; + } + + /** + * {@inheritDoc} + */ + public function hasAuthorizationState($service) + { + // get state from db + dol_syslog("hasAuthorizationState service=".$service); + + $sql = "SELECT state FROM ".MAIN_DB_PREFIX."oauth_state"; + $sql .= " WHERE service = '".$this->db->escape($service.($this->keyforprovider?'-'.$this->keyforprovider:''))."'"; + $sql .= " AND entity IN (".getEntity('oauth_token').")"; + + $resql = $this->db->query($sql); + + $result = $this->db->fetch_array($resql); + + $states = array(); + $states[$service] = $result['state']; + $this->states[$service] = $states[$service]; + + return is_array($states) + && isset($states[$service]) + && null !== $states[$service]; + } + + /** + * {@inheritDoc} + */ + public function clearAuthorizationState($service) + { + // TODO + // get previously saved tokens + //$states = $this->conf->get($this->stateKey); + + if (is_array($this->states) && array_key_exists($service, $this->states)) { + unset($this->states[$service]); + + // Replace the stored tokens array + //$this->conf->set($this->stateKey, $states); + } + + // allow chaining + return $this; + } + + /** + * {@inheritDoc} + */ + public function clearAllAuthorizationStates() + { + // TODO + //$this->conf->remove($this->stateKey); + + // allow chaining + return $this; + } } diff --git a/htdocs/includes/php-iban/.travis.yml b/htdocs/includes/php-iban/.travis.yml new file mode 100644 index 00000000000..c775f178e7f --- /dev/null +++ b/htdocs/includes/php-iban/.travis.yml @@ -0,0 +1,21 @@ +matrix: + include: + - php: 5.3 + dist: precise +language: php +dist: trusty +php: + - '5.4' + - '5.5' + - '5.6' + - '7.0' + - '7.4' + - '8.0' + - '8.1' + - hhvm-3.3 + - hhvm-3.6 + - hhvm-3.9 + - hhvm-3.12 + - hhvm-3.15 + - hhvm-3.18 +script: php utils/test.php && php utils/ootest.php && php utils/other-tests.php diff --git a/htdocs/includes/php-iban/README.md b/htdocs/includes/php-iban/README.md new file mode 100644 index 00000000000..78b5c121c30 --- /dev/null +++ b/htdocs/includes/php-iban/README.md @@ -0,0 +1,1467 @@ +php-iban +======== + +`php-iban` is a library for parsing, validating and generating IBAN (and IIBAN) bank account information in PHP. + +[![Build Status](https://travis-ci.org/globalcitizen/php-iban.png)](https://travis-ci.org/globalcitizen/php-iban) +[![Latest Stable Version](https://poser.pugx.org/globalcitizen/php-iban/v/stable)](https://packagist.org/packages/globalcitizen/php-iban) +[![License](https://poser.pugx.org/globalcitizen/php-iban/license)](https://packagist.org/packages/globalcitizen/php-iban) + +All parts of an IBAN can be retrieved, including country code, checksum, BBAN, financial institution or bank code, account number, and where a fixed-length national system is in use, also branch/sort code. Legacy national checksums may also be retrieved, validated and correctly set, where available, whether they apply to the account number portion, bank and branch identifiers, part or all of the above. IBAN country codes can be converted in to ISO3166-1 alpha-2 and IANA formats, the parent IBAN country acting as registrar for dependent territories may be queried, the official national currency (ISO4217 alpha code format), central bank name and central bank URL may also be queried to ease integration. IBANs may be converted between human and machine representation. IBANs may be obfuscated for presentation to humans in special circumstances such as relative identification. A database of example/test IBANs from different countries is included. Finally, highly accurate suggestions for originally intended input can be made when an incorrect IBAN is detected and is due to mistranscription error. + +Tested on PHP versions: ![PHP 5.2](https://img.shields.io/badge/version-PHP%205.2%2B-lightgrey.svg) ![PHP 5.3](https://img.shields.io/badge/version-PHP%205.3%2B-lightgrey.svg) ![PHP 5.4](https://img.shields.io/badge/version-PHP%205.4%2B-lightgrey.svg) ![PHP 5.5](https://img.shields.io/badge/version-PHP%205.5%2B-lightgrey.svg) ![PHP 5.6](https://img.shields.io/badge/version-PHP%205.6%2B-lightgrey.svg) ![PHP 7.0](https://img.shields.io/badge/version-PHP%207.0%2B-lightgrey.svg) ![PHP 7.4](https://img.shields.io/badge/version-PHP%207.4%2B-lightgrey.svg) + +Test on HHVM versions: ![HHVM 3.3](https://img.shields.io/badge/version-HHVM%203.3%2B-lightgrey.svg) ![HHVM 3.6](https://img.shields.io/badge/version-HHVM%203.6%2B-lightgrey.svg) ![HHVM 3.9](https://img.shields.io/badge/version-HHVM%203.9%2B-lightgrey.svg) ![HHVM 3.12](https://img.shields.io/badge/version-HHVM%203.12%2B-lightgrey.svg) ![HHVM 3.15](https://img.shields.io/badge/version-HHVM%203.15%2B-lightgrey.svg) ![HHVM 3.18](https://img.shields.io/badge/version-HHVM%203.18%2B-lightgrey.svg) + +The parser was built using regular expressions to adapt the contents of the _official_ IBAN registry available from SWIFT then manually modified for special cases such as [errors and omissions in SWIFT's official specifications](https://raw.githubusercontent.com/globalcitizen/php-iban/master/docs/COMEDY-OF-ERRORS). + +Various deficiencies in the initial adaptation have since been rectified, and the current version should be a fairly correct and reliable implementation. + +Where appropriate, __European Committee for Banking Standards__ (ECBS) recommendations have also been incorporated. + +Please bear in mind that because the specification changes frequently, it may not be 100% up to date if a new version has been recently released - I do my best though. We are currently thought to be up to date with [the January 2020 release, ie. PDF release #86](https://www.swift.com/standards/data-standards/iban). + +Licensed under LGPL, it is free to use in commercial settings. + + +Countries Supported +------------------- + +The following 116 official and *unofficial* IBAN countries are supported. + +* Albania (AL) +* *Algeria* (DZ) +* Andorra (AD) +* *Angola* (AO) +* Austria (AT) +* Azerbaijan (AZ) +* Bahrain (BH) +* Belarus (BY) +* Belgium (BE) +* *Benin* (BJ) +* Bosnia and Herzegovina (BA) +* Brazil (BR) +* British Virgin Islands (VG) +* Bulgaria (BG) +* *Burkina Faso* (BF) +* *Burundi* (BI) +* *Cameroon* (CM) +* *Central African Republic* (CF) +* *Chad* (TD) +* *Cape Verde* (CV) +* *Comoros* (KM) +* *Congo* (CG) +* Costa Rica (CR) +* *Côte d'Ivoire* (CI) +* Croatia (HR) +* Cyprus (CY) +* Czech Republic (CZ) +* Denmark (DK) + * Faroe Islands (FO) + * Greenland (GL) +* *Djibouti* (DJ) +* Dominican Republic (DO) +* East Timor (TL) +* *Egypt* (EG) +* El Salvador (SV) +* *Equitorial Guinea* (GQ) +* Estonia (EE) +* Finland (FI) + * Åland Islands (AX) +* France (FR) + * French Guiana (GF) + * French Polynesia (PF) + * French Southern Territories (TF) + * Guadelope (GP) + * Martinique (MQ) + * Mayotte (YT) + * New Caledonia (NC) + * Réunion (RE) + * Saint Barhélemy (BL) + * Saint Martin (French Part) (MF) + * Saint-Pierre and Miquelon (PM) + * Wallis and Futuna (WF) +* *Gabon* (GA) +* Georgia (GE) +* Germany (DE) +* Gibraltar (GI) +* Greece (GR) +* Guatemala (GT) +* *Guinea-Bissau* (GW) +* *Honduras* (HN) +* Hungary (HU) +* Iceland (IS) +* *IIBAN (Internet)* (AA) +* *Iran* (IR) +* Iraq (IQ) +* Ireland (IE) +* Israel (IL) +* Italy (IT) +* Jordan (JO) +* Kazakhstan (KZ) +* Kosovo (XK) +* Kuwait (KW) +* Latvia (LV) +* Lebanon (LB) +* Liechtenstein (LI) +* Lithuania (LT) +* Luxembourg (LU) +* Macedonia (MK) +* *Madagascar* (MG) +* *Mali* (ML) +* Malta (MT) +* Mauritania (MR) +* Mauritius (MU) +* Moldova (MD) +* Monaco (MC) +* Montenegro (ME) +* *Morocco* (MA) +* *Mozambique* (MZ) +* Netherlands (NL) +* *Nicaragua* (NI) +* *Niger* (NE) +* Norway (NO) +* Pakistan (PK) +* Palestine (PS) +* Poland (PL) +* Portugal (PT) +* Qatar (QA) +* Romania (RO) +* Saint Lucia (LC) +* San Marino (SM) +* São Tomé and Príncipe (ST) +* Saudi Arabia (SA) +* *Senegal* (SN) +* Serbia (RS) +* Seychelles (SC) +* Slovakia (SK) +* Slovenia (SI) +* Spain (ES) +* Sweden (SE) +* Switzerland (CH) +* *Togo* (TG) +* Tunisia (TN) +* Turkey (TR) +* *Ukraine* (UA) +* United Arab Emirates (AE) +* United Kingdom (GB) + + +Installation via composer +------------------------- + +If you use [composer](https://getcomposer.org/) you can simply run `composer require globalcitizen/php-iban` to get going. Reportedly [![Daily Downloads](https://poser.pugx.org/globalcitizen/php-iban/d/daily)](https://packagist.org/packages/globalcitizen/php-iban) (and [![Monthly Downloads](https://poser.pugx.org/globalcitizen/php-iban/d/monthly)](https://packagist.org/packages/globalcitizen/php-iban)) were done via composer. + +(If you don't yet have `composer` and wish to install it in an insecure fashion (not recommended, but convenient) you can run `curl -sS https://getcomposer.org/installer | php` or `wget -O- https://getcomposer.org/installer | php`) + +Then just add the following to your `composer.json` file: + +```js +// composer.json +{ + "require": { + "globalcitizen/php-iban": "4.1.0" + } +} +``` + +Then, you can install the new dependencies by running `composer`'s update command from the directory where your `composer.json` file is located: + +```sh +# install +$ php composer.phar install +# update +$ php composer.phar update globalcitizen/php-iban + +# or you can simply execute composer command if you set it to +# your PATH environment variable +$ composer install +$ composer update globalcitizen/php-iban +``` + +You can [see this library on Packagist](https://packagist.org/packages/globalcitizen/php-iban). + + +Installation via git +-------------------- + +For a regular install, use the `git clone` command: + +```sh +# HTTP +$ git clone https://github.com/globalcitizen/php-iban.git +# SSH +$ git clone git@github.com:globalcitizen/php-iban.git +``` + + +Installation via git submodule +------------------------------ + +Alternatively, to embed the `php-iban` library in your own `git`-managed repository at a specific revision number, such that it is possible to update the version in a predictable way while maintaining a larger system that depends upon its functionality: +```sh +# enter your project's git repo +$ cd my-existing-project-with-a-git-repo/ +# select an appropriate place to create the php-iban subdir +$ cd lib/ +# add php-iban as a submodule +$ git submodule add https://github.com/globalcitizen/php-iban.git +# commit new submodule +$ git commit -m 'Add php-iban submodule' +``` + +Then, when checking out `git` projects with submodules for the first time, normally you need to make a couple of extra steps: +```sh +# check out your project as normal +$ git clone git@your-server.com:your/project.git +# initialize submodules +$ git submodule init +# update submodules +$ git submodule update +``` + +To skip these steps, add the `--recursive` argument to `git clone` when checking out: +```sh +# check out your project, initialize and update all submodules +$ git clone --recursive git@your-server.com:your/project.git +``` + +If you later wish to your project to use a newer version of `php-iban`, run: +```sh +# fetch changes +$ git submodule update --remote php-iban +# commit +$ git commit -m 'Update php-iban submodule' +``` + + +Manual installation +------------------- + +1. Fetch the latest release from [our github releases page](https://github.com/globalcitizen/php-iban/releases) in either `zip` or `tar.gz` format. +2. Extract the library using your favourite archive utility, for example `unzip filename.zip` on Unix-like platforms. +3. Write your code to depend on the library based upon its relative location to your source code. For example if you wish to include `php-iban` from the parent directory's subdirectory `libraries/php-iban` you could use the following [require_once()](http://php.net/manual/en/function.require-once.php) statement: +```php + +``` + + +Comparison of PHP IBAN libraries +-------------------------------- + +The following table compares __php-iban__ to other PHP projects offering IBAN-related functionality, on the basis of general project information and the programming paradigms supported. + +| Project | Lic. | Proc | OO | Began | Latest | Star | Watch | Fork | Installs | Home culture | Deps | +| ---------------------------------------------------------- | ---- | ---- | --- | ------ | ------ | ---- | ----- | ---- | -------- | ------------ | ------- | +| __php-iban__ | LGPL | ✔ | ✔ | 2009 | 4.1.0 | 344 | 26 | 76 | ~2M* | Global* | *none* | +| [Iban](https://github.com/jschaedl/Iban) | MIT | ✘ | ✔ | 2013 | 1.3.0 | 50 | 9 | 19 | 178.39k | German | lots | +| [IsoCodes](https://github.com/ronanguilloux/IsoCodes) | GPL3 | ✘ | ✔ | 2012 | 2.1.1 | 466 | 22 | 54 | 145k | French | lots | +| [SepaUtil's](https://github.com/AbcAeffchen/SepaUtilities) | GPL3 | ✘ | ✔ | 2014 | 1.2.3 | 8 | 4 | 3 | 25k | German | phpunit | +| [Symfony](https://github.com/symfony/symfony) | MIT | ✘ | ✔ | 2013 | 3.3.6 | 15k | 1214 | 5.6k | 23M+ | French | lots | + +Notes: + * Original download records for __php-iban__ releases were hosted on Google Code and are now lost. Prior to establishing a release process on Github, we just expected that people would download the code... so we're really not sure how many installs exist, but this is a fair guess (~11k + composer installs + a little bit now and then). + * __php-iban__ also powers: + * [adm-gravity-iban](https://github.com/InternativeNL/adm-gravity-iban) + * [Azzana consulting's XML Solver for ISO20022](http://www.azzana-consulting.com/xmlsolver/) + * [basepa Payment Gateway for WooCommerce](https://github.com/besepa/woocommerce-besepa) + * [org.civicoop.ibanaccounts extension](https://github.com/CiviCooP/org.civicoop.ibanaccounts) for [CiviCoop](http://www.civicoop.org/) + * [commerce_sepa](https://github.com/StephanGeorg/commerce_sepa) + * [contao-haste_plus](https://github.com/heimrichhannot/contao-haste_plus) + * [Dolibarr ERP & CRM](http://www.dolibarr.org/) ([website](https://github.com/Dolibarr/dolibarr/tree/develop/htdocs/includes/php-iban)) + * [fieldwork: Web forms for cool people](https://github.com/jmversteeg/fieldwork) + * [IBAN Validator](https://www.drupal.org/project/iban_validator) for Drupal + * [identity](https://github.com/mpijierro/identity) component for Laravel to check Spanish IDs + * [lib-bankaccount](https://github.com/majestixx/lib-bankaccount) (conversion to/from legacy German account format) + * [PHP SEPA XML](http://www.phpclasses.org/package/8179-PHP-Generate-XML-for-the-Single-Euro-Payments-Area.html) class ([github](https://github.com/dmitrirussu/php-sepa-xml-generator)) + * [Project60 SEPA direct debit](https://github.com/Project60/org.project60.sepa) + * [SEPA Payment Plugin](https://github.com/subs-guru/sepa-payment-plugin) for [SubsGuru](http://subs.guru/) + * [Silverstripe CMS module](https://github.com/denkfabrik-neueMedien/silverstripe-siteinfo) + * [statement](https://github.com/hiwye/statement) + * [WooCommerce Germanized](http://hookr.io/plugins/woocommerce-germanized/) + * [WooCommerce SEPA Payment Gateway](https://codecanyon.net/item/woocommerce-sepa-payment-gateway/7963419) + * php-iban's author is an Australian born, Australia/New Zealand/German citizen based in mainland China, who has formerly also worked and banked in the US, UK, and many Asian countries. + * The IsoCodes and SepaUtil's projects cover standards other than IBAN so their popularity should be considered in this light. (In essence, there is really only one directly competing library, Iban) + +Now let's take a look at features. + +| | + | ISO | IANA | SEPA | ₶ | UO | MT | NC | ₴ | CB | H? | Registry | +| ------------------------------------------------------------- | --- | --- | ---- | ---- | --- | --- | --- | --- | --- | --- | --- | ---------------------------------------------------------------------- | +| __php-iban__ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | 116: [full, error-corrected CSV](https://github.com/globalcitizen/php-iban/blob/master/registry.txt) with [open-source toolchain](https://github.com/globalcitizen/php-iban/blob/master/utils/convert-registry.php) and [documentation](https://github.com/globalcitizen/php-iban/blob/master/docs/COMEDY-OF-ERRORS) | +| [Iban](https://github.com/jschaedl/Iban) | ✔* | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 54: [partial, hardcoded, dubious origin](https://github.com/jschaedl/Iban/blob/master/library/IBAN/Core/Constants.php#L44) | +| [IsoCodes](https://github.com/ronanguilloux/IsoCodes) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 66: [partial, hardcoded, dubious origin](https://github.com/ronanguilloux/IsoCodes/blob/master/src/IsoCodes/Iban.php#L25) | +| [SepaUtil's](https://github.com/AbcAeffchen/SepaUtilities) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 89: [partial, hardcoded, dubious origin](https://github.com/AbcAeffchen/SepaUtilities/blob/master/src/SepaUtilities.php#L89) | +| [Symfony](https://github.com/symfony/symfony) | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | 95: [partial, hardcoded](https://github.com/symfony/symfony/blob/09f92ba516b8840f2ee2dc630b75cbccfca5976b/src/Symfony/Component/Validator/Tests/Constraints/IbanValidatorTest.php), [dubious origin](https://github.com/symfony/symfony/blob/a4f3baae3758b0e72005353f624101f089e4302b/src/Symfony/Component/Validator/Constraints/IbanValidator.php) + +Note: + * __+__ refers to the capacity to create checksum-accurate potential IBANs programatically. It is the author's opinion that generation features without IIBAN support (ie. authority) are of dubious use, except in one-off migrations. (See also NC, below) + * __ISO__ refers to the capacity to convert between IBAN country codes and ISO3166-1 alpha-2 country codes + * __IANA__ refers to the capacity to convert between IBAN country codes and IANA country codes (eg. 'GB' to '.uk' and vice versa) + * __SEPA__ refers to the ability to check whether a particular IBAN country is a member of the Single Euro Payments Area (SEPA) + * __₶__ describes support for IIBAN, the open [proposal](http://www.ifex-project.org/) for decentralized financial endpoint generation by private parties, such as crypto-currency exchanges, whilst maintaining compatibility with the emerging IBAN system. This system has been adopted by major cryptocurrency exchanges such as [Kraken](https://www.kraken.com/). + * __UO__ refers to support for unofficial countries whose IBAN formats have been [published as in informal use](http://www.nordea.com/en/our-services/cashmanagement/iban-validator-and-information/iban-countries/index.html) by major financial institutions, but are not official SWIFT-published registry entries. + * __MT__ refers to mistranscription support: the capacity to automatically detect what the user probably meant when they make a transcription error on IBANs, such as those manually written or printed in confusing fonts, for instance writing 'L' instead of 'I' or '1', or vice versa. + * __NC__ refers to national checksum support: the capacity to verify and, where appropriate, set and extract the national checksum portion of a BBAN, for countries that offered pre-IBAN national checksum algorithms. + * __₴__ refers to support for querying the official national currency's ISO4217 code for an IBAN country + * __CB__ refers to support for querying the name and URL of the central bank of an IBAN country + * __H?__ refers to support for input and output for the human, space-laden or presentation variant of an IBAN, ie. `IBAN XXXX XXXX XXXX XXXX` instead of `XXXXXXXXXXXXXXXX` - a lot more reasonable. + +In short, while composer users have apparently lept on rival libraries (particularly Iban), probably due to the time it took us to integrate a composer file, those libraries are often either full-fledged web frameworks or burdensome in dependencies, less mature, fail to hat-tip to the free software foundation, do not support the procedural programming paradigm (for when AbstractProductClassMakerFactories just won't cut it), use data from dubious sources, tend to use licenses that are incompatible with certain commercial uses, and are frankly short on features. + +So, fearless user ... __choose php-iban__: the ethical, functional, forward-looking, low-hassle library of choice for IBAN and IIBAN processing. __Choose to win!__ ;) + + +Your Help Wanted +---------------- + + * If you know the URL of __national IBAN, BBAN or national checksum documentation__ from official sources, please let us know at [issue #39](https://github.com/globalcitizen/php-iban/issues/39) and [issue #41](https://github.com/globalcitizen/php-iban/issues/41). + * __Faroe Islands__ (FO) banks do not respond, neither does the Danish National Bank who referred me to them. + * __Luxembourg__ (LU) does not seem to conform to any single checksum system. While some IBAN do validate with reasonably common systems, others don't or use others. The suggestion that Luxembourg has a national checksum system may in fact be incorrect. We need some clarification here, hopefully someone can dig up an official statement. + * __Mauritania__ (MR) has a dual character checksum system but our example IBAN does not match MOD97-10 which would be the expected system. Previously the IBAN here was always fixed to '13' checksum digits, however as of registry v66 it is now dynamic, which suggests a changed or at least now nationally relaxed checksum system. + + * If you are willing to spend some time searching, we could do with some more test IBANs for most countries, especially smaller ones... + +News: July 2021 +--------------- + +__[Version 4.1.0](https://github.com/globalcitizen/php-iban/releases/tag/v4.1.0)__ has been released. + * New feature to check for EU memberships - thanks to [@julianpollmann](https://github.com/julianpollman) + +News: August 2020 +----------------- +__[Version 4.0.0](https://github.com/globalcitizen/php-iban/releases/tag/v4.0.0)__ has been released. + * Major version upgrade to certainly fix missing dot in prior release version string, thus avoiding composer hassles. (See [#108](https://github.com/globalcitizen/php-iban/issues/108)). I am really beginning to hate composer. + +__[Version 3.0.3](https://github.com/globalcitizen/php-iban/releases/tag/v3.0.3)__ has been released. + * Official support for php-7.4 + +__[Version 3.0.2](https://github.com/globalcitizen/php-iban/releases/tag/v3.0.2)__ has been released. + * BBAN length fixes for Bahrain and Quatar (thanks to @jledrogo) + +News: July 2020 +--------------- + +__[Version 3.0.0](https://github.com/globalcitizen/php-iban/releases/tag/v3.0.0)__ has been released. + * Same as previous but bump version to fix issues with the addition of namespaces. (See [#104](https://github.com/globalcitizen/php-iban/issues/104)) + * Versions 2.8.x are being removed from the releases. + * Hopefully this should fix things for users upgrading from earlier versions via composer. + +__[Version 2.8.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.8.1)__ has been released. + * Same as previous but officially drop php-5.2 support due to lack of namespacing. + +__[Version 2.8.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.8.1)__ has been released. + * `TL` BBAN format regex removed extraneous spaces (did not affect IBAN validation). (Thanks to @DanyCorbineauBappli) + +News: June 2020 +--------------- +__[Version 2.8.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.8.0)__ has been released. + * Object oriented class is now namespaced. + +News: May 2020 +-------------- +__[Version 2.7.5](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.5)__ has been released. + * Corrections from newer IBAN registry releases + * Updated Egypt example IBAN and registry entry (disabled French national checksum scheme as this no longer works with the example IBAN provided. Users with insight please check, there are no examples visible online!) + * Corrections to Polish BBAN length (now fixed, previously spuriously specified as variable) + * Corrections to Seychelles BBAN and IBAN structure + +__[Version 2.7.4](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.4)__ has been released. + * New function `iban_to_obfsucated_format()` or `ObfuscatedFormat()` to obfuscate IBAN for specific output scenarios (such as relative identification) + * Thanks to @jaysee for feature request #99 + +News: November 2019 +------------------ +__[Version 2.7.3](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.3)__ has been released. + * Load registry only when used. This creates slightly more overhead in real world use, but nominally substantially reduces load times in the edge case event that you include the library but only want to use a function that does not require the IBAN registry to be loaded. + * Thanks to @manitu-opensource + +__[Version 2.7.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.2)__ has been released. + * Fix composer file to add license. + * Thanks to @SunMar + +News: October 2019 +------------------ +__[Version 2.7.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.1)__ has been released. + * Update erroneous bank ID stop offset for Costa Rica. + * Thanks to @thinkpozzitive + * Minor syntax updates + * Thanks to @bwurst + * Add quite a number of Costa Rica example IBANs for confidence in testing. + +News: July 2019 +--------------- + +__[Version 2.7.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.7.0)__ has been released. + * Fixed erroneous Liechtenstein BBAN length. + * Update National Bank of Greece name/website. + +News: August 2018 +----------------- + +__[Version 2.6.9](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.9)__ has been released. + * Added national checksum implementation for San Marino (`SM`) + * Thanks to @francescozanoni + +__[Version 2.6.8](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.8)__ has been released. + * Added national checksum implementation for Italy (`IT`) + * Thanks to @francescozanoni + +News: June 2018 +--------------- + +__[Version 2.6.7](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.7)__ has been released. + * Added national checksum implementation for Slovakia (`SK`) + * Thanks to @ostrolucky + +News: June 2018 +--------------- + +__[Version 2.6.6](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.6)__ has been released. + * Fixed generation of voluminous errors in environments without `ini_set` enabled + * Thanks to @agil-NUBBA + +News: March 2018 +---------------- + +__[Version 2.6.5](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.5)__ has been released. + * Fixed spurious warning when `gmp` extension was enabled + * Thanks to @marcovo + +__[Version 2.6.4](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.4)__ has been released. + * Remove spurious dependency on `bcmath` extension + * Minor documentation updates + +__[Version 2.6.3](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.3)__ has been released. + * Upgrade travis environment as old one broken + * Fix test execution under new Travis environment + * Re-addition of HHVM test environments + * Addition of PHP-5.2 test environment + * A few new test IBANs + +__[Version 2.6.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.2)__ has been released. + * Update Croatia SEPA status + * Thanks to @Pappshadow + +News: August 2017 +----------------- + +__[Version 2.6.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.1)__ has been released. + * Fixed missing registry data. + * Thanks to @monojp + +__[Version 2.6.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.6.0)__ has been released. + * World = conquered. + * We now have well over 100 supported countries. + * According to packagist, we are now the most popular IBAN-related project for PHP ... and quite possibly the internet! + * Addition of official countries + * Belarus (BY) + * El Salvador (SV) + * Iraq (IQ) + * Addition of unofficial countries + * Central African Republic (CF) + * Chad (TD) + * Comoros (KM) + * Congo (CG) + * Djibouti (DJ) + * Egypt (EG) + * Equitorial Guinea (GQ) + * Gabon (GA) + * Guinea-Bissau (GW) + * Honduras (HN) + * Morocco (MA) + * Nicaragua (NI) + * Niger (NE) + * Togo (TG) + * Additional example Iran (IR) IBANs. + * As HHVM is no longer supported by Travis we have dropped it from our automated testing, although php-iban should continue to work fine on HHVM. + * Minor documentation updates + + +News: October 2016 +------------------ + +__[Version 2.5.9](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.9)__ has been released. + * Bring us up to date with IBAN registry release #69 from #66 + * Release #67: fixes broken Costa Rica format and disables Croatia SEPA status + * Release #69: adds Sao Tome and Principe bank + branch offsets + + +News: August 2016 +----------------- + +__[Version 2.5.8](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.8)__ has been released. + * Fix [issue #52](https://github.com/globalcitizen/php-iban/issues/52) (thanks to [@simeucci](https://github.com/simeucci) for reporting), apologies for the delay! + * Minor documentation updates + + +News: June 2016 +--------------- + +__[Version 2.5.7](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.7)__ has been released. + * Minor changes missed in latest edition (May 2016, version 66) registry release + * New Seychelles (SC) example IBAN + * Unfix Mauritania (MR) checksum digits (no functional change) + * Minor documentation updates + + +News: May 2016 +-------------- + +__[Version 2.5.6](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.6)__ has been released. + * Update to conform with latest edition (May 2016, version 66) registry release + * Many of the corrections we had apparently already resolved on initial data import + * Moldova (MD): Split 20!c to 2!c18!c + * Seychelles (SC): Fix IBAN format (SWIFT markup) + * Tunisia (TN): Remove hardcoded 59 as IBAN checksum (following SWIFT; though inefficient) + * Minor documentation updates + * Update stats/figures for php-iban installs/stars/etc. + * Add new 'powered by' + + +News: April 2016 +---------------- + +__[Version 2.5.5](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.5)__ has been released. + * Update to conform with latest edition (April 2016, version 65) registry release + * Corrected account format for Seychelles (SC) to permit alphabetic characters (formerly numeric only) + + +News: March 2016 +---------------- + +__[Version 2.5.4](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.4)__ has been released. + * Update to conform with latest edition (March 2016, version 64) registry release + * Added Seychelles (SC) + * The three other changes apparently corrected registry errors we had already caught during record ingestion and testing + +__[Version 2.5.3](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.3)__ has been released. + * Added [Falsehoods Programmers Believe About IBANs](https://github.com/globalcitizen/php-iban/blob/master/docs/FALSEHOODS.md), inspired by... + * [Falsehoods Programmers Believe About Phone Numbers](https://github.com/googlei18n/libphonenumber/blob/master/FALSEHOODS.md) + * [Falsehoods Programmers Believe About Names](http://www.kalzumeus.com/2010/06/17/falsehoods-programmers-believe-about-names/) + * [Falsehoods Programmers Believe About Time](http://infiniteundo.com/post/25326999628/falsehoods-programmers-believe-about-time) + * [Falsehoods Programmers Believe About Geography](http://wiesmann.codiferes.net/wordpress/?p=15187) + * [Falsehoods Programmers Believe About Addresses](https://www.mjt.me.uk/posts/falsehoods-programmers-believe-about-addresses/) + * Additional example IBANs + * Azerbaijan (AZ) + * Austria (AT) + * Angola (AO) + * San Marino (SM) + * Various minor changes + + +News: February 2016 +------------------- + +__[Version 2.5.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.2)__ has been released. + * Miscellaneous test library updated to validate example IBANs collection. + +__[Version 2.5.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.1)__ has been released. + * The 'Narodna banka Srbije' (`908`) bank in Serbia (RS) appears to have multiple live IBANs with broken national checksums, so we ignore all national checksums on accounts from that bank. + +__[Version 2.5.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.5.0)__ has been released. + * All users are encouraged to upgrade; this release is considered long term stable. + * The following national checksum schemes added in the 2.4.x series are now included and well validated, while invalid assumptions have been removed: + * Belgium (BE) + * Spain (ES) + * Monaco (MC) + * France (FR) + * Norway (NO) + * Montenegro (ME) + * Macedonia (MK) + * Netherlands (NL) - including exception for `INGB` (ING Bank) who have dropped the original checksum + * Portugal (PT) + * Serbia (RS) + * Slovenia (SI) - including exception for `01` (Bank of Slovenia) who do not honour checksums + * Timor Lest (TL) + * In addition, a library of test IBANs is being maintained under `utils/example-ibans` which has a good number of entries for a good number of countries already. This should simplify future research. + * Documented [ideas for the enhancement of the mistranscription error correction suggestion function](https://github.com/globalcitizen/php-iban/commit/045f39b33468e04ff4a64a3bd8cba92611149935#diff-61178a0267b9e23c2b5c19c0f4671a22). + +__[Version 2.4.20](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.20)__ has been released. + * Another bugfix release, based on further real world test IBANs from certain countries: + * Remove Bosnia (BA) national checksum support + +__[Version 2.4.19](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.19)__ has been released. + * Another bugfix release, based on further real world test IBANs from certain countries: + * Remove Finland (FI) national checksum support + +__[Version 2.4.18](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.18)__ has been released. + * Another bugfix release, based on further real world test IBANs from certain countries: + * Remove Poland (PL) national checksum support + +__[Version 2.4.17](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.17)__ has been released. + * Bank of Slovenia (bank code `01` under Slovenia (SI)) does not implement the national checksum scheme, as a special case. An exception has been added to the Slovenia national checksum implementation. + +__[Version 2.4.16](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.16)__ has been released. + * Another bugfix release, based on further real world test IBANs from certain countries: + * Remove Sweden (SE) national checksum support + * I am now instituting a new rule that if national checksum support has not been tested on 10+ real world IBANs, preferably 20+ across a range of institutions, then it does not get committed. This means that small countries will be impossible to add until research is done beyond web-browsing. + +__[Version 2.4.15](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.15)__ has been released. + * The Netherlands (NL) bank 'INGB' no longer uses the national checksum scheme, and has been excepted from the check. This marks our first bank-specific checksum feature. + +__[Version 2.4.14](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.14)__ has been released. + * Another bugfix release, based on further real world test IBANs from certain countries: + * Remove Estonia (EE) national checksum support + * Remove Hungary (HU) national checksum support + +__[Version 2.4.13](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.13)__ has been released. + * This release is mostly about bugfixes, after spending a lot of time gathering IBANs online and using them for further testing. + * Tunisia (TN) national checksum support has been removed, after additional testing with IBAN gathered from the internet it was found not to be correct. Perils of reverse-engineering! + * A couple of other bugfixes: + * The function `iban_mistranscription_suggestions()` now behaves correctly when passed loosely formatted IBAN-like strings + * The checksum algorithm `_verhoeff()` which supports certain national checksum implementations now behaves correctly when passed invalid input + +__[Version 2.4.12](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.12)__ has been released. + * Tunisia (TN) national checksum support has been added. + +__[Version 2.4.11](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.11)__ has been released. + * It is now possible to query the central bank name and URL for each country, from new registry fields `central_bank_url` and `central_bank_name`, for example: + * The central bank for New Caledonia (NC) is the 'Overseas Issuing Institute (Institut d'émission d'Outre-Mer)' and their URL is http://www.ieom.fr/ + * The central bank for the British Virgin Islands (BV) is 'The British Virgin Islands Financial Services Commission' and their URL is http://www.bvifsc.vg/ + * There is no central bank for the IIBAN (Internet) (AA). + +__[Version 2.4.10](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.10)__ has been released. + * New registry field `currency_iso4217` stores the official currency of the country in ISO4217 alpha code format, for example: + * The currency of Iceland (IS) is ISD + * The currency of Saint-Pierre and Miquelon (PM) is EUR + * The currency of Wallis and Futuna (WF) is XPF + +__[Version 2.4.9](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.9)__ has been released. + * New registry field `parent_registrar` stores the parent registrar IBAN country of an IBAN country, for example: + * Åland Islands (AX) parent registrar is Finland (FI) + * Faroe Islands (FO) parent registrar is Denmark (DK) + * New Caledonia (NC) parent registrar is France (FR) + +__[Version 2.4.8](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.8)__ has been released. + * Monaco (MC) national checksum support has been added. + +__[Version 2.4.7](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.7)__ has been released. + * Netherlands (NL) national checksum support has been added. + +__[Version 2.4.6](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.6)__ has been released. + * Poland (PL) national checksum support has been added. + +__[Version 2.4.5](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.5)__ has been released. + * Estonia (EE) national checksum support has been added. + * Finland (FI) national checksum support has been added. + * Macedonia (MK) national checksum support has been added. + * Montenegro (ME) national checksum support has been added. + * Norway (NO) national checksum support has been added. + * Serbia (RS) national checksum support has been added. + * Slovenia (SI) national checksum support has been added. + * Sweden (SE) national checksum support has been added. + +__[Version 2.4.4](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.4)__ has been released. + * Portugal (PT) national checksum support has been added. + +__[Version 2.4.3](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.3)__ has been released. + * Hungary (HU) national checksum support has been added. + +__[Version 2.4.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.2)__ has been released. + * Albania (AL) national checksum support has been added. + * Timor-Leste (TL) national checksum support has been added. + +__[Version 2.4.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.1)__ has been released. + * Bosnia (BA) national checksum support has been added. + +__[Version 2.4.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.4.0)__ has been released. + * It is now possible to determine, verify and set the correct national checksums for some countries that offered a pre-IBAN national checksum algorithm via the new functions `iban_{set|find|verify}_nationalchecksum()` and their OO-wrapper equivalents. Presently Belgium (BE), France (FR) and Spain (ES) are supported. If you would like to see your country supported, please see [issue #39](https://github.com/globalcitizen/php-iban/issues/39) and [issue #41](https://github.com/globalcitizen/php-iban/issues/41). + + +News: January 2016 +------------------ + +__[Version 2.3.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.3.1)__ has been released. + * Fix paste error in Bosnia IANA code + * Additional tests for new country functions + +__[Version 2.3.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.3.0)__ has been released. + * All IBAN country records can now be cross-referenced with their corresponding [IANA](https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains) and [ISO3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Current_codes) codes, if available + +__[Version 2.2.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.2.0)__ has been released. + * Fully up to date with SEPA membership list. (Added new member for 2016, Andorra) + * Fully up to date with latest SWIFT IBAN registry PDF. + * Many fixes and new features since 2.1.0 + * All users are encouraged to ugprade. + +__[Version 2.1.9](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.9)__ has been released. + * Example field updates attempting to include what is possible from SWIFT IBAN registry PDF version #63. There persist [significant issues with this release process](https://github.com/globalcitizen/php-iban/blob/master/docs/COMEDY-OF-ERRORS). + +__[Version 2.1.8](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.8)__ has been released. + * National BBAN checksum offset data for Belgium added. + +__[Version 2.1.7](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.7)__ has been released. + * National BBAN checksum offset data added to registry. This can be queried via the new functions `iban_get_nationalchecksum_part()`, `iban_country_get_nationalchecksum_start_offset()` and `iban_country_get_nationalchecksum_stop_offset()` and their OO-wrapper equivalents `$myIban->NationalChecksum()`, `$myCountry->NationalChecksumStartOffset()` and `$mycountry->NationalChecksumStopOffset()`. Test and documentation updated. If you know anything about national checksum algorithms, please lend a hand at [issue #39](https://github.com/globalcitizen/php-iban/issues/39). + +__[Version 2.1.6](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.6)__ has been released. + * OO wrapper and documentation updated for new strict `machine_format_only` validation. + +__[Version 2.1.5](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.5)__ has been released. + * Additional strict `machine_format_only` mode for `verify_iban()` to close [issue #22](https://github.com/globalcitizen/php-iban/issues/22). + +__[Version 2.1.4](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.4)__ has been released. + * Simplified a function using a php4+ builtin. + +__[Version 2.1.3](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.3)__ has been released. + * Behavior of `iban_to_human_format()` has been fixed when passed input already containing spaces. + * OO-based tests are now executed following successful procedural tests. + * An additional test library for testing edge-case behavior in general functions is now executed following the main tests. + +__[Version 2.1.2](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.2)__ has been released. All known unofficial IBAN country codes are now integrated. As well as minor documentation updates and a shortening of the reported name of Kosovo, this version adds: + * Ivory Coast (CI) + * Madagascar (MG) + * Mali (ML) + * Mozambique (MZ) + * Senegal (SN) + * Ukraine (UA) + +__[Version 2.1.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.1)__ has been released. Currently unofficial IBAN country codes are being integrated, and the process remains ongoing. This version adds: + * Burkina Faso (BF) + * Burundi (BI) + * Cameroon (CM) + * Cape Verde (CV) + * Iran (IR) + +__[Version 2.1.0](https://github.com/globalcitizen/php-iban/releases/tag/v2.1.0)__ has been released. +Currently unofficial IBAN country codes are being integrated, and the process remains ongoing. A new flag has been created to check whether a country is an official, SWIFT-issued record or not. The following new countries have therefore been added. + * Algeria (DZ) + * Angola (AO) + * Benin (BJ) + +Note also that the IIBAN (AA) record has been marked unofficial, and features listed in `docs/TODO` have been migrated to Github issues and that file deleted. + +__[Version 2.0.1](https://github.com/globalcitizen/php-iban/releases/tag/v2.0.1)__ has been released. This is to celebrate real testing, composer support, as well as finally catching up with changes. This version should be up to date with all registry changes to the present, including changes or additions to the countries: + * IIBAN (AA) + * Brazil (BR) + * Costa Rica (CR) + * Kazakhstan (KZ) + * Kosovo (XK) + * Kuwait (KW) + * Saint Barthelemy (BL) + * Saint Lucia (LC) + * Saint Martin (French Part) (MF) + * Sao Tome and Principe (ST) + * Timor Leste (TL) + * Turkey (TR) + +__[Version 1.6.0](https://github.com/globalcitizen/php-iban/releases/tag/v1.6.0)__ has been released. This version features more registry corrections (newly added territories with faulty data, bad checksums in sample IBANs, etc.) as well as enhanced testing routines, extended documentation, and corrected documentation. All users are advised to upgrade. We now have automated test script execution with Travis CI, to provide additional robustness for all committed code. This took longer than expected as unfortunately I picked the exact time Travis broke their build logs - https://www.traviscistatus.com/incidents/fcllblkclgmb - to see what all the fuss was about... proving again that cloud computing is just *great* for breaking things unexpectedly. Because they want to hide things, there was literally no debug output whatsoever, and I was led to believe this was my fault. Fellow programmers, behold: it is the dawning of the age of the mystical fail. + +__[Version 1.5.0](https://github.com/globalcitizen/php-iban/releases/tag/v1.5.0)__ has been released. There are no code changes, but we now have http://packagist.org/ integration, hopefully this triggers it to start working. If you use packagist, you can now add the library to your project by just running `composer require globalcitizen/php-iban` (thanks to @acoulton for pointing the way) + +__[Version 1.4.9](https://github.com/globalcitizen/php-iban/releases/tag/v1.4.9)__ has been released using the new Github-based release process. Hopefully this provides a solid anchor point for those bundling the library with other software. We also have a contributed composer metadata file to ease integration. +New IBAN registry URLs integrated. +Removed old SVN tag/trunk structure. + +News: July 2015 +--------------- +Corrected SWIFT URL to IBAN page. +Emphasized mistranscription error support. + +News: March 2015 +---------------- +Finally, google has killed `code.google.com` and we have migrated to Github! Once the old `trunk`/`tag` structure (lingering from `svn`) is cleaned up and this document translated from the old wiki format to markdown, a new version will be issued. + +News: June 2014 +--------------- + +__Version 1.4.6__ has been released: + * Fixes for Jordan and Qatar. Turns out both of them have broken TXT registry entries, PDF entries differ and the PDF is the one to go for (familiar story). + * Some further improvements. + +Unfortunately, Google now requires `code.google.com` projects to use Google Drive. I tried to use Google Drive (sign up for a new account, jump through email hoops, get treated as a robot, learn stupid new touchy-feely-friendly interface, get meaningless error messages like 'Your sharing limit has been exceeded' (with 2x290KB files on a new account I was told to create) and lost patience entirely. + +So for the moment, you'll just have to download using `git`, instead. I will migrate `php-iban` to Github shortly. Google really is a pain in the ass recently, what with all of this Google+ and Google Drive junk, ruining Picasa, ruining Sketchup by lack of attention, etc. What are they thinking? + +News: March 2014 +---------------- +__Version 1.4.5__ has been released: + * Addition of Jordan and Qatar + * Minor changes to documentation and support scripts. + +__Version 1.4.4__ has been released: + * Fix SEPA status of Croatia (HR) + * Subsqeuent SEPA status audit based upon https://en.wikipedia.org/wiki/Single_Euro_Payments_Area turned up some other status issues (this information is not contained within the official IBAN registry) + * Faroe Islands, Greenland, San Marino status fixed. Everything else apparently hunky dory. + +*The project source code repository has switched from `svn` (ugh) to `git` (yay!)*. + * This should make future changes less painful. + + +News: September 2013 +-------------------- +__Version 1.4.3__ has been released: + * Add Aland Islands (AX), part of Finland (FI) that is only documented in the SEPA status field of Finland and does not have its own entry or mention elsewhere in the IBAN registry document. + * Consider but do not add either of the somewhat similar Canary Islands (CI) or Ceuta/Melilla (EA) - both minor territories of Spain (ES) - due to lack of any evidence of usage. + * Fix SEPA status for Spain (ES), Finland (FI), Porgual (PT) due to registry values being mixed with free text. + * Document this and further issues with the official IBAN registry document, both as documentation in `docs/COMEDY-OF-ERRORS` and inline within the registry converter. + * Update human country name of Palestine to better mirror current registry document ("State of" is dropped as is the reigning style, so simply "Palestine" is presented) + * Updating an outstanding last modified date within the registry from the previous release + +News: August 2013 +----------------- +__Version 1.4.2__ has been released: + * Resolve issue #19: incorrect SEPA status of France/French territories due to a parser bug. (Thanks to the reporter) + +__Version 1.4.1__ has been released: + * Requests + * Attempts to intelligently calculate the 'account' portion of a BBAN based upon the (non-)presence of a branch ID and bank ID portion, by request (for Germany/Austria. Previously this was requested for the Netherlands, however this solution should fix results for everyone!) + * Add 'IIBAN' prefix removal support to machine format conversion function + * Add _gmp_ disable flag (`$__disable_iiban_gmp_extension=true;`) + * Silence warnings on some PHP engine configurations + * Update Brazil record (minor) + * No longer redistribute IBAN registry in .txt format + * Improve inline documentation + +News: June 2013 +--------------- +__Version 1.4.1__ is still being prepared, squashing some bugs and updating the registry ... meanwhile, it has come to my attention that we have been featured in the Code Candy blog! http://www.codecandies.com/2012/05/30/no-exceptions/ Hooray for the German sense of humour! Hahah. + +News: March 2013 +---------------- +__Version 1.4.0__ has been released: + * Resolves an issue reported affecting the last few versions when attempting to generate a correct checksum for a checksum-invalid IBAN. + * Adds `VERSION` file, to include hard version information in source tree, by request. + +News: February 2013 +------------------- +__Version 1.3.9__ has been released: + * Resolves issue reported in 1.3.7 re-enables the more efficient PHP _gmp_ library based checksum code (thanks to rpkamp) + +__Version 1.3.8__ has been released: + * An error in checksum processing for some IBANs using the new _gmp_ library based MOD97 routine (_only affects users with php-iban 1.3.7 and the PHP _gmp_ library enabled_) has been reported. As an immediate workaround 1.3.8 is being released with the following changes: + ** Code from 1.3.6 + ** Registry from 1.3.7 + +__Version 1.3.7__ has been released: + * Added Brazil + * Added two new French overseas territories + * Reduced 'Moldova' to normalized short-form name + * Large CPU efficiency improvement in IBAN validation routine (16x if PHP _gmp_ extension is installed, 5x otherwise. Special thanks to algorithmic contributor Chris and to engineers everywhere upholding the Germanic tradition of precision and efficiency! Alas, I am but part-German, for shame...) + * Minor internal/tool updates + * Some comedy of errors additions + +News: November 2012 +------------------- + +__Version 1.3.6__ has been released: + * Update IIBAN format for latest IETF draft. + +News: October 2012 +------------------ + +__Version 1.3.5__ has been released: + * Correct lack of support for lower case alphabetic characters (ie. non ECBS-compliant) in human to machine format conversion function. + +__Version 1.3.4__ has been released: + * Add reference to the latest ECBS recommendations and include them in documentation. + +__Version 1.3.3__ has been released: + * Very minor efficiency improvement. + +News: September 2012 +-------------------- + +__Version 1.3.2__ has been released: + * Registry updates + * Added Palestinian Territories + * Moldova fixed its format + * Finland fixed its bank identifier location + * Saudi Arabia - remove spurious trailing space in example + +News: June 2012 +--------------- + +__Version 1.3.1__ has been released: + * New countries added + * Azerbaijan (AZ) + * Costa Rica (CR) + * Guatemala (GT) + * Moldova (MD) + * Pakistan (PK) + * British Virgin Islands (VG) + * Miscellaneous updates + * Normalize/simplify examples (FI,PT,SA) + * Normalize/simplify human country name (BH,LI,MK) + * Documentation updates + +News: December 2011 +------------------- +__Version 1.3.0__ has been released. This release adds mistranscription error suggestion support. + +__Version 1.2.0__ has been released. This release adds Internet International Bank Account Number (IIBAN) support, as per the current IIBAN Internet Draft at http://tools.ietf.org/html/draft-iiban-01 + +News: September 2011 +-------------------- +__Version 1.1.2__ has been released. This adds long open tags to the main library file in order to simplify deployment on many default PHP installations. + +News: August 2011 +----------------- +__Version 1.1.1__ has been released. This fixes a typo in a function call in the new OO wrapper. Non OO users do not need to upgrade. + +News: July 2011 +--------------- +__Version 1.1.0__ has been released. This version adds an object oriented wrapper library and related updates to documentation and test scripts. It is not critical for existing users to upgrade. + +__Version 1.0.0__ has been released. This version includes the following changes: + * *Support for the SEPA flag* ("Is this country a member of the Single Euro Payments Area?"), both in the registry and with a new function `iban_country_is_sepa($iban_country)` + * *Placeholder support for converting machine format IBAN to human format* (simply adds a space every four characters) with the function `iban_to_human_format($iban)` + * *Fixed a series of domestic example issues* in the registry file that had been imported from SWIFT's own broken IBAN registry + * *Normalised example fields* in the registry to better facilitate use in automated contexts (Austria, Germany, etc.) + * *Updated test code* + * *Added a significant amount of new documentation* + * *Reorganised file layout• + * *Moved to _x.y.z_ format versioning and use of subversion 'tags'* in conjunction with the 1.0.0 release. + +--- + +Earlier in the month... *Small maintenance release*, not critical. + * The _split()_ function has been replaced with _explode()_ to prevent warnings (or error on _very_ new PHP engines) + * Resolved an issue on PHP environments configured to display warnings would display a warning when an IBAN input to be validated did not include a prefix that was a valid IBAN country code. (Nobody should be running production PHP environments with such warnings enabled, anyway!) + +News: June 2011 +--------------- + * We are now well over 1000 downloads: not bad considering how specific this project is! + * A *new version* has been released that fixes many important changes to the official registry, plus adds some new features. + * *Add New French Territories* (GF,GP,MQ,RE) + Older versions of the specification did not include the GF,GP,MQ,RE French territories, only the PF,TF,YT,NC,PM,WF French territories. The new territories have now been added to the database. + * *Add New Countries* + We welcome Bahrain (BH), Dominican Republic (DO), Khazakstan (KZ), United Arab Emirates (AE) to the database. + * *Format/example updates* + There have apparently been some minor format/example changes, these have been rolled in to existing countries. + * *Inclusion of altered IBAN_Registry.txt* + Errors and omissions have been found within the official IBAN_Registry.txt file, namely the exclusion of Khazakstan (KZ) and only partial information on Kuwait (KW), and errors in both of these countries' PDF specifications. This is SWIFT's fault: shame on them! I suspect they have changed staff recently. Anyway, a version of IBAN_Registry.txt with these problems solved is now distributed along with php-iban. + * *Fix for Tunisia* + Strangely I visited Tunisia during the revolution in January this year. Sorry to the Tunisian people for getting their IBAN format wrong! TN59 + 20 digits is the correct format. This is now included in the new registry file. + * *Fix for Albania* + The SWIFT format information was updated for Albania. (Did not affect validation, since this uses regular expressions which were already correct) + * *Additional and revised documentation* + Further documentation has been added to the project. + * *Automated IBAN_Registry.txt fix/conversion tool* + A new _convert-registry_ tool has been added to the project that attempts to automatically normalise/fix problems with the official SWIFT .txt specification as much as possible. Note that this is not enough to get a good registry.txt file (the internal format used by php-iban) as SWIFT's .txt release excludes entire countries in the PDF specification. In addition, there are some errors in the PDF specification that need to be manually resolved at present. These can be seen resolved in the _IBAN_Registry.txt_ file. + +News: December 2009 +------------------- + +*We now have a http://groups.google.com/group/php-iban-users mailing list. Feel free to post your feedback, queries or suggestions - we'd love to know how you are using the library. To date, the project has reached over 400 downloads and still going strong, with more than one new user per day - a pretty good showing for a specialised library! + +*__version 12__ has been released. The registry file has been improved, partly as a result of user reports and partly as a result of issues uncovered while performing automated tests against version 11. + + * *Corrected header row* + Two columns were not represented in the title (`bban_length` and `iban_length`). They have now been added. + + * *Fixes to registry entries for French Territories* (PF,TF,YT,NC,PM,WF) + French territories are not explicitly included in the SWIFT specification textfile. + They were duplicated from France according to an unstructured comments against + that entry. Example IBANs were then made for illustrative purposes by simply + modifying the country prefix without regenerating the checksums. The IBAN + examples included for these territories should now be correct. + + * *Gibraltar and Hungary* (GI,HU) + Fixed a bug where both territories had a superfluous colon appended to their regular expressions after initial document conversion, which was causing validation failures for all IBANs in those countries. + + * *Mauritius* (MU) + Corrected IBAN length expectation from 31 to 30. + + * *Sweden* (SE) + Example IBAN had been manually modified from IBAN specification example early in development and did not pass checksum. The IBAN official example has been restored. + + * *Tunisia* (TN) + Corrected improper validation strings caused by a bug in initial document conversion (IBAN format-specifier to regular-expression conversion function). + + +Documentation (Procedural/Recommended) +====================================== + +```php +require_once('php-iban.php'); +# ... your code utilising IBAN functions... +``` + +Validation Functions +-------------------- + +```php +# Verify an IBAN number. +# An optional second argument specifies $machine_format_only (default is false) +# If true, the function will not tolerate unclean inputs +# (eg. spaces, dashes, leading 'IBAN ' or 'IIBAN ', lower case) +# If false (default), input can be in either: +# - printed ('IIBAN xx xx xx...' or 'IBAN xx xx xx...'); or +# - machine ('xxxxx') +# ... string formats. +# Returns true or false. +if(!verify_iban($iban,$machine_format_only=false)) { + # ... +} + +# Check the checksum of an IBAN - code modified from Validate_Finance PEAR class +if(!iban_verify_checksum($iban)) { + # ... +} + +# Suggest what the user really meant in the case of transcription errors +$suggestions = iban_mistranscription_suggestions($bad_iban); +if(count($suggestions) == 1) { + print "You really meant " . $suggestions[0] . ", right?\n"; +} + +# Find the correct checksum for an IBAN +$correct_checksum = iban_find_checksum($iban); + +# Set the correct checksum for an IBAN +$fixed_iban = iban_set_checksum($iban); + +# Verify the pre-IBAN era, BBAN-level national checksum for those countries that +# have such a system and we have implemented. +# (Returns '' if unimplemented, true or false) +$result = iban_verify_nationalchecksum($iban); +if($result == '') { + print "National checksum system does not exist or remains unimplemented for the country of IBAN '$iban'.\n"; +} +elseif($result == true) { + print "IBAN '$iban' passes the national checksum algorithm for its country.\n"; +} +else { + print "IBAN '$iban' FAILS the national checksum algorithm for its country.\n"; +} + +# Set the pre-IBAN era, BBAN-level national checksum for those countries that +# have such a system, where that system results in a dedicated checksum +# substring, and that we have implemented. +# (Returns '' if unimplemented, or the corrected string) +# (NOTE: On success, the function also subsequently recalculates the IBAN-level checksum) +$national_checksum_algorithm_valid_iban = iban_set_nationalchecksum($iban); + +# Determine, but do not set, the pre-IBAN era, BBAN-level national checksum +# for those countries that have such a system, where that system results in +# a dedicated checksum substring, and that we have implemented. +# (Returns '' if unimplemented, or the expected national checksum substring) +$expected_national_checksum = iban_find_nationalchecksum($iban); +``` + + +Utility Functions +----------------- + +```php +# Convert an IBAN to machine format. To do this, we +# remove IBAN from the start, if present, and remove +# non basic roman letter / digit characters +$machine_iban = iban_to_machine_format($iban); + +# Convert an IBAN to human format. To do this, we +# add a space every four characters. +$human_iban = iban_to_human_format($iban); + +# Convert an IBAN to obfuscated format for relative +# identification. To do this, we replace all but the +# leading country code and final four characters with +# asterisks. +$obfuscated_iban = iban_to_obfuscated_format($iban); +``` + + +IBAN Country-Level Functions +---------------------------- +```php +# Get the name of an IBAN country +$country_name = iban_country_get_country_name($iban_country); + +# Get the domestic example for an IBAN country +$country_domestic_example = iban_country_get_domestic_example($iban_country); + +# Get the BBAN example for an IBAN country +$country_bban_example = iban_country_get_bban_example($iban_country); + +# Get the BBAN format (in SWIFT format) for an IBAN country +$country_bban_format_as_swift = iban_country_get_bban_format_swift($iban_country); + +# Get the BBAN format (as a regular expression) for an IBAN country +$country_bban_format_as_regex = iban_country_get_bban_format_regex($iban_country); + +# Get the BBAN length for an IBAN country +$country_bban_length = iban_country_get_bban_length($iban_country); + +# Get the IBAN example for an IBAN country +$country_iban_example = iban_country_get_iban_example($iban_country); + +# Get the IBAN length for an IBAN country +$country_iban_length = iban_country_get_iban_length($iban_country); + +# Get the IBAN format (in SWIFT format) for an IBAN country +$country_iban_format_as_swift = iban_country_get_iban_format_swift ($iban_country); + +# Get the IBAN format (as a regular expression) for an IBAN country +$country_iban_format_as_regex = iban_country_get_iban_format_regex($iban_country); + +# Determine whether an IBAN country is a member of SEPA (Single Euro Payments Area) +if(!iban_country_is_sepa($iban_country)) { + # ... do something xenophobic ... +} + +# Get the bank ID start offset for an IBAN country +$country_bankid_start_offset = iban_country_get_bankid_start_offset($iban_country); + +# Get the bank ID stop offset for an IBAN country +$country_bankid_stop_offset = iban_country_get_bankid_stop_offset($iban_country); + +# Get the branch ID start offset for an IBAN country +$country_branchid_start_offset = iban_country_get_branchid_start_offset($iban_country); + +# Get the branch ID stop offset for an IBAN country +$country_branchid_stop_offset = iban_country_get_branchid_stop_offset($iban_country); + +# Get the registry edition for an IBAN country (note: IIBAN country 'AA' returns 'N/A') +$country_registry_edition = iban_country_get_registry_edition($iban_country); + +# Determine whether an IBAN country is an official, SWIFT issued country record +if(!iban_country_get_country_swift_official($iban_country)) { + # ... do something against decentralization ... +} + +# Get the IANA code for an IBAN country +$country_iana = iban_country_get_iana($iban_country); + +# Get the ISO3166-1 alpha-2 code for an IBAN country +$country_iso3166 = iban_country_get_iso3166($iban_country); + +# Get the parent registrar IBAN country of an IBAN country +# (Returns '' in the normal case that the country is independently registered) +$registrar_country = iban_country_get_parent_registrar($iban_country); +if($registrar_country=='') { + print "The mighty nation of '$iban_country' stands strong and proud...\n"; + print " ... with its own heirarchy of bureaucrats!\n"; +} +else { + print "It has been foretold that the downtrodden natives of '$iban_country' will one day\n"; + print "rise up and throw off the shackles of the evil '$registrar_country' oppressors!\n"; +} + +# Get the official currency of an IBAN country as an ISO4217 alpha code +# (Returns '' in the Internet (IIBAN) case, ie. no official currency) +$official_currency = iban_country_get_currency_iso4217($iban_country); +if($official_currency == '') { + print "There is no official currency for the IBAN country '$iban_country'.\n"; +} + +# Get the URL of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +$central_bank_url = iban_country_get_central_bank_url($iban_country); + +# Get the name of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +$central_bank_name = iban_country_get_central_bank_name($iban_country); + +# Get the membership type of the country +# There are four types of memberships: +# * EU-Member States (eu_member) +# * EFTA-Member States (efta_member) +# * Other Memberships, which have monetary agreements with the EU (other_member) +# * Non-Members, which don't belong to the EU or have agreements (non_member) +$country_membership = iban_country_get_membership($iban_country); + +# Get if the country is a eu member state +# (Note: Returns true, if member state; false otherwise) +$country_membership = iban_country_get_is_eu_member($iban_country); +``` + + +Parsing Functions +----------------- +```php +# Get an array of all the parts from an IBAN +$iban_parts = iban_get_parts($iban); + +# Get the country part from an IBAN +$iban_country = iban_get_country_part($iban); + +# Get the BBAN part from an IBAN +$bban = iban_get_bban_part($iban); + +# Get the Bank ID (institution code) from an IBAN +$bank = iban_get_bank_part($iban); + +# Get the Branch ID (sort code) from an IBAN +# (NOTE: only available for some countries) +$sortcode = iban_get_branch_part($iban); + +# Get the (branch-local) account ID from an IBAN +# (NOTE: only available for some countries) +$account = iban_get_account_part($iban); + +# Get the checksum part from an IBAN +$checksum = iban_get_checksum_part($iban); + +# Get the national checksum part from an IBAN (if it exists) +$checksum = iban_get_nationalchecksum_part($iban); +``` + + +Documentation (Object Oriented Wrapper/Discouraged) +=================================================== + +OO use is discouraged as there is a present-day trend to overuse the model. However, if you prefer OO PHP then by all means use the object oriented wrapper, described below. +```php +require_once('oophp-iban.php'); +# ... your code utilising object oriented PHP IBAN functions... +``` + +Validation Functions +-------------------- +```php +# Example instantiation +$iban = 'AZ12345678901234' +$myIban = new IBAN($iban); + +# Verify an IBAN number. +# Tolerates spaces, prefixes "IBAN ...", dashes, lowercase input, etc. +# Returns true or false. +if(!$myIban->Verify()) { + # ... +} +# Verify an IBAN number in machine format only. +# Does not tolerate lowercase input, separators, whitespace or prefixes. +# Returns true or false. +if(!$myIban->VerifyMachineFormatOnly()) { + # ... +} + +# Check the checksum of an IBAN - code modified from Validate_Finance PEAR class +if(!$myIban->VerifyChecksum()) { + # ... +} + +# Suggest what the user really meant in the case of mistranscription errors +$suggestions = $badIban->MistranscriptionSuggestions(); +if(count($suggestions)==1) { + print "You really meant " . $suggestions[0] . ", right?\n"; +} + +# Find the correct checksum for an IBAN +$correct_checksum = $myIban->FindChecksum(); + +# Set the correct checksum for an IBAN +$fixed_iban = $myIban->SetChecksum() + +# Verify the pre-IBAN era, BBAN-level national checksum for those countries that +# have such a system and we have implemented. +# (Returns '' if unimplemented, true or false) +$result = $myIban->VerifyNationalChecksum(); +if($result == '') { + print "National checksum system does not exist or remains unimplemented for this IBAN's country.\n"; +} +elseif($result == true) { + print "IBAN passes the national checksum algorithm for its country.\n"; +} +else { + print "IBAN FAILS the national checksum algorithm for its country.\n"; +} + +# Set the pre-IBAN era, BBAN-level national checksum for those countries that +# have such a system, where that system results in a dedicated checksum +# substring, and that we have implemented. +# (Returns '' if unimplemented, or the corrected string) +# (NOTE: On success, the function also subsequently recalculates the IBAN-level checksum) +$myIban->SetNationalChecksum(); + +# Determine, but do not set, the pre-IBAN era, BBAN-level national checksum +# for those countries that have such a system, where that system results in +# a dedicated checksum substring, and that we have implemented. +# (Returns '' if unimplemented, or the expected national checksum substring) +$national_checksum = $myIban->FindNationalChecksum(); +``` + +Utility Functions +----------------- + +```php +# Convert an IBAN to machine format. To do this, we +# remove IBAN from the start, if present, and remove +# non basic roman letter / digit characters +$machine_iban = $myIban->MachineFormat(); + +# Convert an IBAN to human format. To do this, we +# add a space every four characters. +$human_iban = $myIban->HumanFormat(); + +# Convert an IBAN to obfuscated format for relative +# identification. To do this, we replace all but the +# leading country code and final four characters with +# asterisks. +$obfsucated_iban = $myIban->ObfuscatedFormat(); +``` + +IBAN Country-Level Functions +---------------------------- + +```php +# To list countries, use the IBAN Class... +$myIban->Countries(); + +# ... everything else is in the IBANCountry class. + +# Example instantiation +$countrycode = 'DE'; +$myCountry = new IBANCountry($countrycode); + +# Get the country code of an IBAN country +$country_code = $myCountry->Code(); + +# Get the name of an IBAN country +$country_name = $myCountry->Name(); + +# Get the domestic example for an IBAN country +$country_domestic_example = $myCountry->DomesticExample(); + +# Get the BBAN example for an IBAN country +$country_bban_example = $myCountry->BBANExample(); + +# Get the BBAN format (in SWIFT format) for an IBAN country +$country_bban_format_as_swift = $myCountry->BBANFormatSWIFT(); + +# Get the BBAN format (as a regular expression) for an IBAN country +$country_bban_format_as_regex = $myCountry->BBANFormatRegex(); + +# Get the BBAN length for an IBAN country +$country_bban_length = $myCountry->BBANLength(); + +# Get the IBAN example for an IBAN country +$country_iban_example = $myCountry->IBANExample(); + +# Get the IBAN length for an IBAN country +$country_iban_length = $myCountry->IBANLength(); + +# Get the IBAN format (in SWIFT format) for an IBAN country +$country_iban_format_as_swift = $myCountry->IBANFormatSWIFT(); + +# Get the IBAN format (as a regular expression) for an IBAN country +$country_iban_format_as_regex = $myCountry->IBANFormatRegex(); + +# Determine whether an IBAN country is a member of SEPA (Single Euro Payments Area) +if(!$myCountry->IsSEPA()) { + # ... do something xenophobic ... +} + +# Get the bank ID start offset for an IBAN country +$country_bankid_start_offset = $myCountry->BankIDStartOffset(); + +# Get the bank ID stop offset for an IBAN country +$country_bankid_stop_offset = $myCountry->BankIDStopOffset(); + +# Get the branch ID start offset for an IBAN country +$country_branchid_start_offset = $myCountry->BranchIDStartOffset(); + +# Get the branch ID stop offset for an IBAN country +$country_branchid_stop_offset = $myCountry->BranchIDStopOffset(); + +# Get the national checksum start offset for an IBAN country +$country_nationalchecksum_start_offset = $myCountry->NationalChecksumStartOffset(); + +# Get the national checksum stop offset for an IBAN country +$country_nationalchecksum_stop_offset = $myCountry->NationalChecksumStopOffset(); + +# Get the registry edition for an IBAN country (note: IIBAN country 'AA' returns 'N/A') +$country_registry_edition = $myCountry->RegistryEdition(); + +# Determine whether an IBAN country is an official, SWIFT issued country record +if(!$myCountry->SWIFTOfficial()) { + # ... do something against decentralization ... +} + +# Get the IANA code for an IBAN country +$country_iana = $myCountry->IANA(); + +# Get the ISO3166-1 alpha-2 code for an IBAN country +$country_iso3166 = $myCountry->ISO3166(); + +# Get the parent registrar IBAN country of an IBAN country +# (Returns '' in the normal case that the country is independently registered) +$registrar_country = $myCountry->ParentRegistrar(); +if($registrar_country=='') { + print "The mighty nation of '$iban_country' stands strong and proud...\n"; + print " ... with its own heirarchy of bureaucrats!\n"; +} +else { + print "It has been foretold that the downtrodden natives of '$iban_country' will one day\n"; + print "rise up and throw off the shackles of the evil '$registrar_country' oppressors!\n"; +} + +# Get the official currency of an IBAN country as an ISO4217 alpha code +# (Returns '' in the Internet (IIBAN) case, ie. no official currency) +$official_currency = $myCountry->CurrencyISO4217(); +if($official_currency == '') { + print "There is no official currency for the IBAN country '$iban_country'.\n"; +} + +# Get the URL of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +$central_bank_url = $myCountry->CentralBankURL(); + +# Get the name of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +$central_bank_name = $myCountry->CentralBankName(); +``` + + +Parsing Functions +----------------- + +```php +# Get an array of all the parts from an IBAN +$iban_parts = $myIban->Parts(); + +# Get the country part from an IBAN +$iban_country = $myIban->Country(); + +# Get the checksum part from an IBAN +$checksum = $myIban->Checksum(); + +# Get the BBAN part from an IBAN +$bban = $myIban->BBAN(); + +# Get the Bank ID (institution code) from an IBAN +$bank = $myIban->Bank(); + +# Get the Branch ID (sort code) from an IBAN +# (NOTE: only available for some countries) +$sortcode = $myIban->Branch(); + +# Get the (branch-local) account ID from an IBAN +# (NOTE: only available for some countries) +$account = $myIban->Account(); + +# Get the national checksum part from an IBAN +# (NOTE: only available for some countries) +$checksum = $myIban->NationalChecksum(); +``` + + +IBAN Libraries in Other Languages +--------------------------------- +See for yourself how our approach and features compare favourably with all of these libraries... + +| Language | Library +| ---------- | --------------------------------------------------------- +| C# | [iban-api-net](https://github.com/aventum-solutions/iban-api-net) +| Java | [iban-api-java](https://github.com/aventum-solutions/iban-api-java) +| Java | [iban4j](https://github.com/arturmkrtchyan/iban4j) +| Java | [java-iban](https://github.com/barend/java-iban) +| Javascript | [iban.js](https://github.com/arhs/iban.js) +| Javascript | [ng-iban](https://github.com/mmjmanders/ng-iban) +| ObjectiveC | [IBAN-Helper](https://github.com/xs4some/IBAN-Helper) +| ObjectiveC | [ibanValidation](https://github.com/smoldovansky/ibanValidation) +| Perl | [various CPAN libraries](http://search.cpan.org/search?query=iban&mode=all) +| Python | [django-localflavor](https://github.com/django/django-localflavor) +| Python | [iban-generator](https://github.com/lkraider/iban-generator) +| Ruby | [bank](https://github.com/max-power/bank) +| Ruby | [iban-tools](https://github.com/iulianu/iban-tools) +| Ruby | [ibandit](https://github.com/gocardless/ibandit) +| Ruby | [ibanizator](https://github.com/softwareinmotion/ibanizator) +| Ruby | [iso-iban](https://github.com/apeiros/iso-iban) diff --git a/htdocs/includes/php-iban/composer.json b/htdocs/includes/php-iban/composer.json new file mode 100644 index 00000000000..df0516f9a0b --- /dev/null +++ b/htdocs/includes/php-iban/composer.json @@ -0,0 +1,12 @@ +{ + "name": "globalcitizen/php-iban", + "description": "php-iban is a library for parsing and validating IBAN (and IIBAN) bank account information.", + "license": "LGPL-3.0-only", + "require": { + "php": "^5.4 || ^5.5 || ^5.6 || ^7.0 || ^7.4 || ^8.0 || ^8.1" + }, + "autoload": { + "files": ["oophp-iban.php","php-iban.php"] + } +} + diff --git a/htdocs/includes/php-iban/oophp-iban.php b/htdocs/includes/php-iban/oophp-iban.php index 76e3cd0d06b..2ef17a7112e 100644 --- a/htdocs/includes/php-iban/oophp-iban.php +++ b/htdocs/includes/php-iban/oophp-iban.php @@ -1,4 +1,5 @@ iban = $iban; } - public function Verify($iban='') { - if($iban!='') { return verify_iban($iban); } - return verify_iban($this->iban); + public function Verify($iban='',$machine_format_only=false) { + if($iban!='') { return verify_iban($iban,$machine_format_only); } + return verify_iban($this->iban,$machine_format_only); # we could throw exceptions of various types, but why - does it really # add anything? possibly some slightly better user feedback potential. # however, this can be written by hand by performing individual checks @@ -19,6 +20,11 @@ Class IBAN { # maintenance/documentation cost, i say, therefore: no. no exceptions. } + public function VerifyMachineFormatOnly($iban='') { + if($iban!='') { return verify_iban($iban,true); } + return verify_iban($this->iban,true); + } + public function MistranscriptionSuggestions() { return iban_mistranscription_suggestions($this->iban); } @@ -31,6 +37,10 @@ Class IBAN { return iban_to_human_format($this->iban); } + public function ObfuscatedFormat() { + return iban_to_obfuscated_format($this->iban); + } + public function Country($iban='') { return iban_get_country_part($this->iban); } @@ -39,6 +49,10 @@ Class IBAN { return iban_get_checksum_part($this->iban); } + public function NationalChecksum($iban='') { + return iban_get_nationalchecksum_part($this->iban); + } + public function BBAN() { return iban_get_bban_part($this->iban); } @@ -59,6 +73,18 @@ Class IBAN { return iban_checksum_string_replace($this->iban); } + public function FindNationalChecksum() { + return iban_find_nationalchecksum($this->iban); + } + + public function SetNationalChecksum() { + $this->iban = iban_set_nationalchecksum($this->iban); + } + + public function VerifyNationalChecksum() { + return iban_verify_nationalchecksum($this->iban); + } + public function Parts() { return iban_get_parts($this->iban); } @@ -88,6 +114,10 @@ Class IBANCountry { $this->code = $code; } + public function Code() { + return $this->code; + } + public function Name() { return iban_country_get_country_name($this->code); } @@ -144,14 +174,57 @@ Class IBANCountry { return iban_country_get_branchid_stop_offset($this->code); } + public function NationalChecksumStartOffset() { + return iban_country_get_nationalchecksum_start_offset($this->code); + } + + public function NationalChecksumStopOffset() { + return iban_country_get_nationalchecksum_stop_offset($this->code); + } + public function RegistryEdition() { return iban_country_get_registry_edition($this->code); } + public function SWIFTOfficial() { + return iban_country_get_country_swift_official($this->code); + } + public function IsSEPA() { return iban_country_is_sepa($this->code); } + public function IANA() { + return iban_country_get_iana($this->code); + } + + public function ISO3166() { + return iban_country_get_iso3166($this->code); + } + + public function ParentRegistrar() { + return iban_country_get_parent_registrar($this->code); + } + + public function CurrencyISO4217() { + return iban_country_get_currency_iso4217($this->code); + } + + public function CentralBankURL() { + return iban_country_get_central_bank_url($this->code); + } + + public function CentralBankName() { + return iban_country_get_central_bank_name($this->code); + } + + public function Membership() { + return iban_country_get_membership($this->code); + } + + public function IsEuMember() { + return iban_country_get_is_eu_member($this->code); + } } ?> diff --git a/htdocs/includes/php-iban/php-iban.php b/htdocs/includes/php-iban/php-iban.php index e4ef4d8dd1d..902cc1e2669 100644 --- a/htdocs/includes/php-iban/php-iban.php +++ b/htdocs/includes/php-iban/php-iban.php @@ -1,16 +1,18 @@ 0) && (($i+1)%4==0)) { $human_iban .= ' '; } + return wordwrap($iban,4,' ',true); +} + +# Convert an IBAN to obfuscated presentation. To do this, we +# replace the checksum and all subsequent characters with an +# asterisk, except for the final four characters, and then +# return in human format, ie. +# HU69107000246667654851100005 -> HU** **** **** **** **** **** 0005 +# +# We avoid the checksum as it may be used to infer the rest +# of the IBAN in cases where the country has few valid banks +# and branches, or other information about the account such +# as bank, branch, or date issued is known (where a sequential +# issuance scheme is in use). +# +# Note that output of this function should be presented with +# other information to a user, such as the date last used or +# the date added to their account, in order to better facilitate +# unambiguous relative identification. +function iban_to_obfuscated_format($iban) { + $iban = iban_to_machine_format($iban); + $tr = substr($iban,0,2); + for($i=2;$i iban_get_country_part($iban), - 'checksum' => iban_get_checksum_part($iban), - 'bban' => iban_get_bban_part($iban), - 'bank' => iban_get_bank_part($iban), - 'country' => iban_get_country_part($iban), - 'branch' => iban_get_branch_part($iban), - 'account' => iban_get_account_part($iban) + 'checksum' => iban_get_checksum_part($iban), + 'bban' => iban_get_bban_part($iban), + 'bank' => iban_get_bank_part($iban), + 'country' => iban_get_country_part($iban), + 'branch' => iban_get_branch_part($iban), + 'account' => iban_get_account_part($iban), + 'nationalchecksum' => iban_get_nationalchecksum_part($iban) ); } @@ -231,6 +254,18 @@ function iban_get_account_part($iban) { return ''; } +# Get the national checksum part from an IBAN +function iban_get_nationalchecksum_part($iban) { + $iban = iban_to_machine_format($iban); + $country = iban_get_country_part($iban); + $start = iban_country_get_nationalchecksum_start_offset($country); + if($start == '') { return ''; } + $stop = iban_country_get_nationalchecksum_stop_offset($country); + if($stop == '') { return ''; } + $bban = iban_get_bban_part($iban); + return substr($bban,$start,($stop-$start+1)); +} + # Get the name of an IBAN country function iban_country_get_country_name($iban_country) { return _iban_country_get_info($iban_country,'country_name'); @@ -301,33 +336,119 @@ function iban_country_get_branchid_stop_offset($iban_country) { return _iban_country_get_info($iban_country,'bban_branchid_stop_offset'); } +# Get the BBAN (national) checksum start offset for an IBAN country +# Returns '' when (often) not present) +function iban_country_get_nationalchecksum_start_offset($iban_country) { + return _iban_country_get_info($iban_country,'bban_checksum_start_offset'); +} + +# Get the BBAN (national) checksum stop offset for an IBAN country +# Returns '' when (often) not present) +function iban_country_get_nationalchecksum_stop_offset($iban_country) { + return _iban_country_get_info($iban_country,'bban_checksum_stop_offset'); +} + # Get the registry edition for an IBAN country function iban_country_get_registry_edition($iban_country) { return _iban_country_get_info($iban_country,'registry_edition'); } +# Is the IBAN country one official issued by SWIFT? +function iban_country_get_country_swift_official($iban_country) { + return _iban_country_get_info($iban_country,'country_swift_official'); +} + # Is the IBAN country a SEPA member? function iban_country_is_sepa($iban_country) { return _iban_country_get_info($iban_country,'country_sepa'); } +# Get the IANA code of an IBAN country +function iban_country_get_iana($iban_country) { + return _iban_country_get_info($iban_country,'country_iana'); +} + +# Get the ISO3166-1 alpha-2 code of an IBAN country +function iban_country_get_iso3166($iban_country) { + return _iban_country_get_info($iban_country,'country_iso3166'); +} + +# Get the parent registrar IBAN country of an IBAN country +function iban_country_get_parent_registrar($iban_country) { + return _iban_country_get_info($iban_country,'parent_registrar'); +} + +# Get the official currency of an IBAN country as an ISO4217 alpha code +# (Note: Returns '' if there is no official currency, eg. for AA (IIBAN)) +function iban_country_get_currency_iso4217($iban_country) { + return _iban_country_get_info($iban_country,'currency_iso4217'); +} + +# Get the URL of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +function iban_country_get_central_bank_url($iban_country) { + $result = _iban_country_get_info($iban_country,'central_bank_url'); + if($result!='') { $result = 'http://' . $result . '/'; } + return $result; +} + +# Get the name of an IBAN country's central bank +# (Note: Returns '' if there is no central bank. Also, note that +# sometimes multiple countries share one central bank) +function iban_country_get_central_bank_name($iban_country) { + return _iban_country_get_info($iban_country,'central_bank_name'); +} + # Get the list of all IBAN countries function iban_countries() { + _iban_load_registry(); global $_iban_registry; return array_keys($_iban_registry); } +# Get the membership of an IBAN country +# (Note: Possible Values eu_member, efta_member, other_member, non_member) +function iban_country_get_membership($iban_country) { + return _iban_country_get_info($iban_country,'membership'); +} + +# Get the membership of an IBAN country +# (Note: Possible Values eu_member, efta_member, other_member, non_member) +function iban_country_get_is_eu_member($iban_country) { + $membership = _iban_country_get_info($iban_country,'membership'); + if ($membership === 'eu_member') { + $result = true; + } else { + $result = false; + } + + return $result; +} + # Given an incorrect IBAN, return an array of zero or more checksum-valid # suggestions for what the user might have meant, based upon common # mistranscriptions. +# IDEAS: +# - length correction via adding/removing leading zeros from any single component +# - overlength correction via dropping final digit(s) +# - national checksum algorithm checks (apply same testing methodology, abstract to separate function) +# - length correction by removing double digits (xxyzabxybaaz = change aa to a, or xx to x) +# - validate bank codes +# - utilize format knowledge with regards to alphanumeric applicability in that offset in that national BBAN format +# - turkish TL/TK thing +# - norway NO gets dropped due to mis-identification with "No." for number (ie. if no country code try prepending NO) function iban_mistranscription_suggestions($incorrect_iban) { - + + # remove funky characters + $incorrect_iban = iban_to_machine_format($incorrect_iban); + # abort on ridiculous length input (but be liberal) $length = strlen($incorrect_iban); - if($length<5 || $length>34) { return array('(length bad)'); } + if($length<5 || $length>34) { return array('(supplied iban length insane)'); } # abort if mistranscriptions data is unable to load - if(!_iban_load_mistranscriptions()) { return array('(failed to load)'); } + if(!_iban_load_mistranscriptions()) { return array('(failed to load mistranscriptions)'); } # init global $_iban_mistranscriptions; @@ -396,7 +517,6 @@ function iban_mistranscription_suggestions($incorrect_iban) { # Load the IBAN registry from disk. global $_iban_registry; $_iban_registry = array(); -_iban_load_registry(); function _iban_load_registry() { global $_iban_registry; # if the registry is not yet loaded, or has been corrupted, reload @@ -407,14 +527,20 @@ function _iban_load_registry() { # loop through lines foreach($lines as $line) { if($line!='') { - # split to fields - $old_display_errors_value = ini_get('display_errors'); - ini_set('display_errors',false); - $old_error_reporting_value = ini_get('error_reporting'); - ini_set('error_reporting',false); - list($country,$country_name,$domestic_example,$bban_example,$bban_format_swift,$bban_format_regex,$bban_length,$iban_example,$iban_format_swift,$iban_format_regex,$iban_length,$bban_bankid_start_offset,$bban_bankid_stop_offset,$bban_branchid_start_offset,$bban_branchid_stop_offset,$registry_edition,$country_sepa) = explode('|',$line); - ini_set('display_errors',$old_display_errors_value); - ini_set('error_reporting',$old_error_reporting_value); + # avoid spewing tonnes of PHP warnings under bad PHP configs - see issue #69 + if(function_exists('ini_set')) { + # split to fields + $old_display_errors_value = ini_get('display_errors'); + ini_set('display_errors',false); + $old_error_reporting_value = ini_get('error_reporting'); + ini_set('error_reporting',false); + } + list($country,$country_name,$domestic_example,$bban_example,$bban_format_swift,$bban_format_regex,$bban_length,$iban_example,$iban_format_swift,$iban_format_regex,$iban_length,$bban_bankid_start_offset,$bban_bankid_stop_offset,$bban_branchid_start_offset,$bban_branchid_stop_offset,$registry_edition,$country_sepa,$country_swift_official,$bban_checksum_start_offset,$bban_checksum_stop_offset,$country_iana,$country_iso3166,$parent_registrar,$currency_iso4217,$central_bank_url,$central_bank_name,$membership) = explode('|',$line); + # avoid spewing tonnes of PHP warnings under bad PHP configs - see issue #69 + if(function_exists('ini_set')) { + ini_set('display_errors',$old_display_errors_value); + ini_set('error_reporting',$old_error_reporting_value); + } # assign to registry $_iban_registry[$country] = array( 'country' => $country, @@ -433,7 +559,17 @@ function _iban_load_registry() { 'bban_bankid_stop_offset' => $bban_bankid_stop_offset, 'bban_branchid_start_offset' => $bban_branchid_start_offset, 'bban_branchid_stop_offset' => $bban_branchid_stop_offset, - 'registry_edition' => $registry_edition + 'registry_edition' => $registry_edition, + 'country_swift_official' => $country_swift_official, + 'bban_checksum_start_offset' => $bban_checksum_start_offset, + 'bban_checksum_stop_offset' => $bban_checksum_stop_offset, + 'country_iana' => $country_iana, + 'country_iso3166' => $country_iso3166, + 'parent_registrar' => $parent_registrar, + 'currency_iso4217' => $currency_iso4217, + 'central_bank_url' => $central_bank_url, + 'central_bank_name' => $central_bank_name, + 'membership' => $membership ); } } @@ -448,6 +584,7 @@ function _iban_get_info($iban,$code) { # Get information from the IBAN registry by country / code combination function _iban_country_get_info($country,$code) { + _iban_load_registry(); global $_iban_registry; $country = strtoupper($country); $code = strtolower($code); @@ -483,4 +620,717 @@ function _iban_load_mistranscriptions() { return true; } +# Find the correct national checksum for an IBAN +# (Returns the correct national checksum as a string, or '' if unimplemented for this IBAN's country) +# (NOTE: only works for some countries) +function iban_find_nationalchecksum($iban) { + return _iban_nationalchecksum_implementation($iban,'find'); +} + +# Verify the correct national checksum for an IBAN +# (Returns true or false, or '' if unimplemented for this IBAN's country) +# (NOTE: only works for some countries) +function iban_verify_nationalchecksum($iban) { + return _iban_nationalchecksum_implementation($iban,'verify'); +} + +# Verify the correct national checksum for an IBAN +# (Returns the (possibly) corrected IBAN, or '' if unimplemented for this IBAN's country) +# (NOTE: only works for some countries) +function iban_set_nationalchecksum($iban) { + $result = _iban_nationalchecksum_implementation($iban,'set'); + if($result != '' ) { + $result = iban_set_checksum($result); # recalculate IBAN-level checksum + } + return $result; +} + +# Internal function to overwrite the national checksum portion of an IBAN +function _iban_nationalchecksum_set($iban,$nationalchecksum) { + $country = iban_get_country_part($iban); + $start = iban_country_get_nationalchecksum_start_offset($country); + if($start == '') { return ''; } + $stop = iban_country_get_nationalchecksum_stop_offset($country); + if($stop == '') { return ''; } + # determine the BBAN + $bban = iban_get_bban_part($iban); + # alter the BBAN + $firstbit = substr($bban,0,$start); # 'string before the checksum' + $lastbit = substr($bban,$stop+1); # 'string after the checksum' + $fixed_bban = $firstbit . $nationalchecksum . $lastbit; + # reconstruct the fixed IBAN + $fixed_iban = $country . iban_get_checksum_part($iban) . $fixed_bban; + return $fixed_iban; +} + +# Currently unused but may be useful for Norway. +# ISO7064 MOD11-2 +# Adapted from https://gist.github.com/andreCatita/5714353 by Andrew Catita +function _iso7064_mod112_catita($input) { + $p = 0; + for ($i = 0; $i < strlen($input); $i++) { + $c = $input[$i]; + $p = 2 * ($p + $c); + } + $p %= 11; + $result = (12 - $p) % 11; + if($result == 10) { $result = 'X'; } + return $result; +} + +# Currently unused but may be useful for Norway. +# ISO 7064:1983.MOD 11-2 +# by goseaside@sina.com +function _iso7064_mod112_goseaside($vString) { + $sigma = ''; + $wi = array(1, 2, 4, 8, 5, 10, 9, 7, 3, 6); + $hash_map = array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'); + $i_size = strlen($vString); + $bModify = '?' == substr($vString, -1); + $i_size1 = $bModify ? $i_size : $i_size + 1; + for ($i = 1; $i <= $i_size; $i++) { + $i1 = $vString[$i - 1] * 1; + $w1 = $wi[($i_size1 - $i) % 10]; + $sigma += ($i1 * $w1) % 11; + } + if($bModify) return str_replace('?', $hash_map[($sigma % 11)], $vString); + else return $hash_map[($sigma % 11)]; +} + +# ISO7064 MOD97-10 (Bosnia, etc.) +# (Credit: Adapted from https://github.com/stvkoch/ISO7064-Mod-97-10/blob/master/ISO7064Mod97_10.php) +function _iso7064_mod97_10($str) { + $ai=1; + $ch = ord($str[strlen($str)-1]) - 48; + if($ch < 0 || $ch > 9) return false; + $check=$ch; + for($i=strlen($str)-2;$i>=0;$i--) { + $ch = ord($str[$i]) - 48; + if ($ch < 0 || $ch > 9) return false; + $ai=($ai*10)%97; + $check+= ($ai * ((int)$ch)); + } + return (98-($check%97)); +} + +# Implement the national checksum for a Belgium (BE) IBAN +# (Credit: @gaetan-be) +function _iban_nationalchecksum_implementation_be($iban,$mode) { + if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution + $nationalchecksum = iban_get_nationalchecksum_part($iban); + $account = iban_get_account_part($iban); + $account_less_checksum = substr($account,strlen($account)-2); + $expected_nationalchecksum = $account_less_checksum % 97; + if($mode=='find') { + return $expected_nationalchecksum; + } + elseif($mode=='set') { + return _iban_nationalchecksum_set($iban,$expected_nationalchecksum); + } + elseif($mode=='verify') { + return ($nationalchecksum == $expected_nationalchecksum); + } +} + +# MOD11 helper function for the Spanish (ES) IBAN national checksum implementation +# (Credit: @dem3trio, code lifted from Spanish Wikipedia at https://es.wikipedia.org/wiki/C%C3%B3digo_cuenta_cliente) +function _iban_nationalchecksum_implementation_es_mod11_helper($numero) { + if(strlen($numero)!=10) return "?"; + $cifras = Array(1,2,4,8,5,10,9,7,3,6); + $chequeo=0; + for($i=0; $i<10; $i++) { + $chequeo += substr($numero,$i,1) * $cifras[$i]; + } + $chequeo = 11 - ($chequeo % 11); + if ($chequeo == 11) $chequeo = 0; + if ($chequeo == 10) $chequeo = 1; + return $chequeo; +} + +# Implement the national checksum for a Spanish (ES) IBAN +# (Credit: @dem3trio, adapted from code on Spanish Wikipedia at https://es.wikipedia.org/wiki/C%C3%B3digo_cuenta_cliente) +function _iban_nationalchecksum_implementation_es($iban,$mode) { + if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution + # extract appropriate substrings + $bankprefix = iban_get_bank_part($iban) . iban_get_branch_part($iban); + $nationalchecksum = iban_get_nationalchecksum_part($iban); + $account = iban_get_account_part($iban); + $account_less_checksum = substr($account,2); + # first we calculate the initial checksum digit, which is MOD11 of the bank prefix with '00' prepended + $expected_nationalchecksum = _iban_nationalchecksum_implementation_es_mod11_helper("00".$bankprefix); + # then we append the second digit, which is MOD11 of the account + $expected_nationalchecksum .= _iban_nationalchecksum_implementation_es_mod11_helper($account_less_checksum); + if($mode=='find') { + return $expected_nationalchecksum; + } + elseif($mode=='set') { + return _iban_nationalchecksum_set($iban,$expected_nationalchecksum); + } + elseif($mode=='verify') { + return ($nationalchecksum == $expected_nationalchecksum); + } +} + +# Helper function for the France (FR) BBAN national checksum implementation +# (Credit: @gaetan-be) +function _iban_nationalchecksum_implementation_fr_letters2numbers_helper($bban) { + $allNumbers = ""; + $conversion = array( + "A" => 1, "B" => 2, "C" => 3, "D" => 4, "E" => 5, "F" => 6, "G" => 7, "H" => 8, "I" => 9, + "J" => 1, "K" => 2, "L" => 3, "M" => 4, "N" => 5, "O" => 6, "P" => 7, "Q" => 8, "R" => 9, + "S" => 2, "T" => 3, "U" => 4, "V" => 5, "W" => 6, "X" => 7, "Y" => 8, "Z" => 9 + ); + for ($i=0; $i < strlen($bban); $i++) { + if(is_numeric($bban[$i])) { + $allNumbers .= $bban[$i]; + } + else { + $letter = strtoupper($bban[$i]); + if(array_key_exists($letter, $conversion)) { + $allNumbers .= $conversion[$letter]; + } + else { + return null; + } + } + } + return $allNumbers; +} + +# NOTE: Worryingly at least one domestic number found within CF online is +# not passing national checksum support. Perhaps banks do not issue +# with correct RIB (French-style national checksum) despite using +# the legacy format? Perhaps this is a mistranscribed number? +# http://www.radiomariacentrafrique.org/virement-bancaire.aspx +# ie. CF19 20001 00001 01401832401 40 +# The following two numbers work: +# http://fondationvoixducoeur.net/fr/pour-contribuer.html +# ie. CF4220002002003712551080145 and CF4220001004113717538890110 +# Since in the latter case the bank is the same as the former and +# the French structure, terminology and 2/3 correct is a fairly high +# correlation, we are going to assume that the first error is theirs. +# +# Implement the national checksum for a Central African Republic (CF) IBAN +function _iban_nationalchecksum_implementation_cf($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Chad (TD) IBAN +function _iban_nationalchecksum_implementation_td($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Comoros (KM) IBAN +function _iban_nationalchecksum_implementation_km($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Congo (CG) IBAN +function _iban_nationalchecksum_implementation_cg($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Djibouti (DJ) IBAN +function _iban_nationalchecksum_implementation_dj($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for an Equitorial Guinea (GQ) IBAN +function _iban_nationalchecksum_implementation_gq($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Gabon (GA) IBAN +function _iban_nationalchecksum_implementation_ga($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a Monaco (MC) IBAN +# (Credit: @gaetan-be) +function _iban_nationalchecksum_implementation_mc($iban,$mode) { + return _iban_nationalchecksum_implementation_fr($iban,$mode); +} + +# Implement the national checksum for a France (FR) IBAN +# (Credit: @gaetan-be, http://www.credit-card.be/BankAccount/ValidationRules.htm#FR_Validation and +# https://docs.oracle.com/cd/E18727_01/doc.121/e13483/T359831T498954.htm) +function _iban_nationalchecksum_implementation_fr($iban,$mode) { + if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution + # first, extract the BBAN + $bban = iban_get_bban_part($iban); + # convert to numeric form + $bban_numeric_form = _iban_nationalchecksum_implementation_fr_letters2numbers_helper($bban); + # if the result was null, something is horribly wrong + if(is_null($bban_numeric_form)) { return ''; } + # extract other parts + $bank = substr($bban_numeric_form,0,5); + $branch = substr($bban_numeric_form,5,5); + $account = substr($bban_numeric_form,10,11); + # actual implementation: mod97( (89 x bank number "Code banque") + (15 x branch code "Code guichet") + (3 x account number "Numéro de compte") ) + $sum = (89*($bank+0)) + ((15*($branch+0))); + $sum += (3*($account+0)); + $expected_nationalchecksum = 97 - ($sum % 97); + if(strlen($expected_nationalchecksum) == 1) { $expected_nationalchecksum = '0' . $expected_nationalchecksum; } + # return + if($mode=='find') { + return $expected_nationalchecksum; + } + elseif($mode=='set') { + return _iban_nationalchecksum_set($iban,$expected_nationalchecksum); + } + elseif($mode=='verify') { + return (iban_get_nationalchecksum_part($iban) == $expected_nationalchecksum); + } +} + +# Implement the national checksum for a Norway (NO) IBAN +# (NOTE: Built from description at https://docs.oracle.com/cd/E18727_01/doc.121/e13483/T359831T498954.htm, not well tested) +function _iban_nationalchecksum_implementation_no($iban,$mode) { + if($mode != 'set' && $mode != 'find' && $mode != 'verify') { return ''; } # blank value on return to distinguish from correct execution + # first, extract the BBAN + $bban = iban_get_bban_part($iban); + # then, the account + $account = iban_get_account_part($iban); + # existing checksum + $nationalchecksum = iban_get_nationalchecksum_part($iban); + # bban less checksum + $bban_less_checksum = substr($bban,0,strlen($bban)-strlen($nationalchecksum)); + # factor table + $factors = array(5,4,3,2,7,6,5,4,3,2); + # calculate checksum + $total = 0; + for($i=0;$i<10;$i++) { + $total += $bban_less_checksum[$i] * $factors[$i]; + } + $total += $nationalchecksum; + # mod11 + $remainder = $total % 11; + # to find the correct check digit, we add the remainder to the current check digit, + # mod10 (ie. rounding at 10, such that 10 = 0, 11 = 1, etc.) + $calculated_checksum = ($nationalchecksum + $remainder)%10; + if($mode == 'find') { + if($remainder == 0) { return $nationalchecksum; } + else { + return $calculated_checksum; + } + } + elseif($mode == 'set') { + return _iban_nationalchecksum_set($iban,$calculated_checksum); + } + elseif($mode == 'verify') { + if($remainder == 0) { return true; } + return false; + } +} + +# ISO/IEC 7064, MOD 11-2 +# @param $input string Must contain only characters ('0123456789'). +# @output A 1 character string containing '0123456789X', +# or '' (empty string) on failure due to bad input. +# (Credit: php-iso7064 @ https://github.com/globalcitizen/php-iso7064) +function _iso7064_mod11_2($input) { + $input = strtoupper($input); # normalize + if(!preg_match('/^[0123456789]+$/',$input)) { return ''; } # bad input + $modulus = 11; + $radix = 2; + $output_values = '0123456789X'; + $p = 0; + for($i=0; $i $d) { + $checksum .= $i %2 !== 0 ? $d * 2 : $d; + } + return array_sum(str_split($checksum)) % 10; +} + +# Verhoeff checksum +# (Credit: Adapted from Semyon Velichko's code at https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Verhoeff_Algorithm#PHP) +function _verhoeff($input) { + if($input == '' || preg_match('/[^0-9]/',$input)) { return ''; } # reject non-numeric input + $d = array( + array(0,1,2,3,4,5,6,7,8,9), + array(1,2,3,4,0,6,7,8,9,5), + array(2,3,4,0,1,7,8,9,5,6), + array(3,4,0,1,2,8,9,5,6,7), + array(4,0,1,2,3,9,5,6,7,8), + array(5,9,8,7,6,0,4,3,2,1), + array(6,5,9,8,7,1,0,4,3,2), + array(7,6,5,9,8,2,1,0,4,3), + array(8,7,6,5,9,3,2,1,0,4), + array(9,8,7,6,5,4,3,2,1,0) + ); + $p = array( + array(0,1,2,3,4,5,6,7,8,9), + array(1,5,7,6,2,8,3,0,9,4), + array(5,8,0,3,7,9,6,1,4,2), + array(8,9,1,6,0,4,3,5,2,7), + array(9,4,5,3,1,2,6,8,7,0), + array(4,2,8,6,5,7,3,9,0,1), + array(2,7,9,3,8,0,6,4,1,5), + array(7,0,4,6,9,1,3,2,5,8) + ); + $inv = array(0,4,3,2,1,5,6,7,8,9); + $r = 0; + foreach(array_reverse(str_split($input)) as $n => $N) { + $r = $d[$r][$p[($n+1)%8][$N]]; + } + return $inv[$r]; +} + +# Damm checksum +# (Credit: https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Damm_Algorithm#PHP) +function _damm($input) { + if($input=='' || preg_match('/[^0-9]/',$input)) { return ''; } # non-numeric input + // from http://www.md-software.de/math/DAMM_Quasigruppen.txt + $matrix = array( + array(0, 3, 1, 7, 5, 9, 8, 6, 4, 2), + array(7, 0, 9, 2, 1, 5, 4, 8, 6, 3), + array(4, 2, 0, 6, 8, 7, 1, 3, 5, 9), + array(1, 7, 5, 0, 9, 8, 3, 4, 2, 6), + array(6, 1, 2, 3, 0, 4, 5, 9, 7, 8), + array(3, 6, 7, 4, 2, 0, 9, 5, 8, 1), + array(5, 8, 6, 9, 7, 2, 0, 1, 3, 4), + array(8, 9, 4, 5, 3, 6, 2, 0, 1, 7), + array(9, 4, 3, 8, 6, 1, 7, 2, 0, 5), + array(2, 5, 8, 1, 4, 3, 6, 7, 9, 0), + ); + $checksum = 0; + for ($i=0; $i diff --git a/htdocs/includes/php-iban/registry.txt b/htdocs/includes/php-iban/registry.txt index ffe714139dd..1a7eb8f76f6 100644 --- a/htdocs/includes/php-iban/registry.txt +++ b/htdocs/includes/php-iban/registry.txt @@ -1,81 +1,117 @@ -country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|bban_bankid_stop_offset|bban_branchid_start_offset|bban_branchid_stop_offset|registry_edition|country_sepa -AA|IIBAN (Internet)|0011123Z5678|0011123Z5678|12!a|^[A-Z0-9]{12}$|12|AA120011123Z5678|AA2!n12!a|^AA(\d{2})([A-Z0-9]{12})$|16|0|3|||N/A|0 -AL|Albania|0000000235698741|212110090000000235698741|8!n16!c|^(\d{8})([A-Za-z0-9]{16})$|24|AL47212110090000000235698741|AL2!n8!n16!c|^AL(\d{2})(\d{8})([A-Za-z0-9]{16})$|28|0|2|3|6|2011-06-20|0 -AD|Andorra|2030200359100100|00012030200359100100|4!n4!n12!c|^(\d{4})(\d{4})([A-Za-z0-9]{12})$|20|AD1200012030200359100100|AD2!n4!n4!n12!c|^AD(\d{2})(\d{4})(\d{4})([A-Za-z0-9]{12})$|24|0|3|4|7|2011-06-20|0 -AT|Austria|19043-234573201|1904300234573201|5!n11!n|^(\d{5})(\d{11})$|16|AT611904300234573201|AT2!n5!n11!n|^AT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1 -AX|Aland Islands|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|AX2112345600000785|AX2!n6!n7!n1!n|^AX(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-09-05|1 -AZ|Azerbaijan|NABZ00000000137010001944|NABZ00000000137010001944|4!a20!c|^([A-Z]{4})([A-Za-z0-9]{20})$|24|AZ21NABZ00000000137010001944|AZ2!n4!a20!c|^AZ(\d{2})([A-Z]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0 -BH|Bahrain|00001299123456|BMAG00001299123456|4!a14!c|^([A-Z]{4})([A-Za-z0-9]{14})$|22|BH67BMAG00001299123456|BH2!n4!a14!c|^BH(\d{2})([A-Z]{4})([A-Za-z0-9]{14})$|22|0|3|||2012-05-29|0 -BE|Belgium|539-0075470-34|539007547034|3!n7!n2!n|^(\d{3})(\d{7})(\d{2})$|12|BE68539007547034|BE2!n3!n7!n2!n|^BE(\d{2})(\d{3})(\d{7})(\d{2})$|16|0|2|||2011-06-20|1 -BA|Bosnia and Herzegovina|199-044-00012002-79|1990440001200279|3!n3!n8!n2!n|^(\d{3})(\d{3})(\d{8})(\d{2})$|16|BA391290079401028494|BA2!n3!n3!n8!n2!n|^BA(\d{2})(\d{3})(\d{3})(\d{8})(\d{2})$|20|0|2|3|5|2011-06-20|0 -BR|Brazil|0009795493C1|00360305000010009795493P1|8!n5!n10!n1!a1!c|^(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|25|BR2300360305000010009795493P1BR1800000000141455123924100C2|BR2!n8!n5!n10!n1!a1!c|^BR(\d{2})(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|29|0|7|8|12|2013-06-20|0 -BG|Bulgaria|BNBG 9661 1020 3456 78|BNBG96611020345678|4!a4!n2!n8!c|^([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|18|BG80BNBG96611020345678|BG2!n4!a4!n2!n8!c|^BG(\d{2})([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|22|0|3|4|7|2011-06-20|1 -CR|Costa Rica|1026284066|15202001026284066|3!n14!n|^(\d{3})(\d{14})$|7|CR91202001026284066|CR2!n3!n14!n|^CR(\d{2})(\d{3})(\d{14})$|21|0|2|||2012-05-29|0 -HR|Croatia|1001005-1863000160|10010051863000160|7!n10!n|^(\d{7})(\d{10})$|17|HR1210010051863000160|HR2!n7!n10!n|^HR(\d{2})(\d{7})(\d{10})$|21|0|6|||2011-06-20|1 -CY|Cyprus|1200527600|002001280000001200527600|3!n5!n16!c|^(\d{3})(\d{5})([A-Za-z0-9]{16})$|24|CY17002001280000001200527600|CY2!n3!n5!n16!c|^CY(\d{2})(\d{3})(\d{5})([A-Za-z0-9]{16})$|28|0|2|3|7|2011-06-20|1 -CZ|Czech Republic|19-2000145399/0800|08000000192000145399|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|CZ6508000000192000145399|CZ2!n4!n6!n10!n|^CZ(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1 -DK|Denmark|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|DK5000400440116243|DK2!n4!n9!n1!n|^DK(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|1 -FO|Faroe Islands|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|FO2000400440116243|FO2!n4!n9!n1!n|^FO(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0 -GL|Greenland|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|GL2000400440116243|GL2!n4!n9!n1!n|^GL(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0 -DO|Dominican Republic|1212453611324|AGR00000001212453611324|4!c20!n|^([A-Za-z0-9]{4})(\d{20})$|24|DO28BAGR00000001212453611324|DO2!n4!c20!n|^DO(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2011-06-20|0 -EE|Estonia|221020145685|2200221020145685|2!n2!n11!n1!n|^(\d{2})(\d{2})(\d{11})(\d{1})$|16|EE382200221020145685|EE2!n2!n2!n11!n1!n|^EE(\d{2})(\d{2})(\d{2})(\d{11})(\d{1})$|20|0|1|||2011-06-20|1 -FI|Finland|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|FI2112345600000785|FI2!n6!n7!n1!n|^FI(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-08-05|1 -FR|France|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|FR1420041010050500013M02606|FR2!n5!n5!n11!c2!n|^FR(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -BL|Saint Barthelemy|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|BL9820041010050500013M02606|BL2!n5!n5!n11!c2!n|^BL(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0 -GF|French Guyana|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GF4120041010050500013M02606|GF2!n5!n5!n11!c2!n|^GF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -GP|Guadelope|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GP1120041010050500013M02606|GP2!n5!n5!n11!c2!n|^GP(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -MF|Saint Martin (French Part)|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MF9820041010050500013M02606|MF2!n5!n5!n11!c2!n|^MF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0 -MQ|Martinique|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MQ5120041010050500013M02606|MQ2!n5!n5!n11!c2!n|^MQ(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -RE|Reunion|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|RE4220041010050500013M02606|RE2!n5!n5!n11!c2!n|^RE(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -PF|French Polynesia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PF5720041010050500013M02606|PF2!n5!n5!n11!c2!n|^PF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 -TF|French Southern Territories|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|TF2120041010050500013M02606|TF2!n5!n5!n11!c2!n|^TF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 -YT|Mayotte|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|YT3120041010050500013M02606|YT2!n5!n5!n11!c2!n|^YT(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -NC|New Caledonia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|NC8420041010050500013M02606|NC2!n5!n5!n11!c2!n|^NC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 -PM|Saint Pierre et Miquelon|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PM3620041010050500013M02606|PM2!n5!n5!n11!c2!n|^PM(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1 -WF|Wallis and Futuna Islands|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|WF9120041010050500013M02606|WF2!n5!n5!n11!c2!n|^WF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 -GE|Georgia|0000000101904917|NB0000000101904917|2!a16!n|^([A-Z]{2})(\d{16})$|18|GE29NB0000000101904917|GE2!n2!a16!n|^GE(\d{2})([A-Z]{2})(\d{16})$|22|0|1|||2011-06-20|0 -DE|Germany|37040044-532013000|370400440532013000|8!n10!n|^(\d{8})(\d{10})$|18|DE89370400440532013000|DE2!n8!n10!n|^DE(\d{2})(\d{8})(\d{10})$|22|0|7|||2011-06-20|1 -GI|Gibraltar|0000 00007099 453|NWBK000000007099453|4!a15!c|^([A-Z]{4})([A-Za-z0-9]{15})$|19|GI75NWBK000000007099453|GI2!n4!a15!c|^GI(\d{2})([A-Z]{4})([A-Za-z0-9]{15})$|23|0|3|||2011-06-20|1 -GR|Greece|01250000000012300695|01101250000000012300695|3!n4!n16!c|^(\d{3})(\d{4})([A-Za-z0-9]{16})$|23|GR1601101250000000012300695|GR2!n3!n4!n16!c|^GR(\d{2})(\d{3})(\d{4})([A-Za-z0-9]{16})$|27|0|2|3|6|2011-06-20|1 -GT|Guatemala|01020000001210029690|TRAJ01020000001210029690|4!c20!c|^([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|24|GT82TRAJ01020000001210029690|GT2!n4!c20!c|^GT(\d{2})([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0 -HU|Hungary|11773016-11111018-00000000|117730161111101800000000|3!n4!n1!n15!n1!n|^(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|24|HU42117730161111101800000000|HU2!n3!n4!n1!n15!n1!n|^HU(\d{2})(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|28|0|2|3|6|2011-06-20|1 -IS|Iceland|0159-26-007654-551073-0339|0159260076545510730339|4!n2!n6!n10!n|^(\d{4})(\d{2})(\d{6})(\d{10})$|22|IS140159260076545510730339|IS2!n4!n2!n6!n10!n|^IS(\d{2})(\d{4})(\d{2})(\d{6})(\d{10})$|26|0|3|6|11|2011-06-20|1 -IE|Ireland|93-11-52 12345678|AIBK93115212345678|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|IE29AIBK93115212345678|IE2!n4!a6!n8!n|^IE(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1 -IL|Israel|10-800-99999999|100800000099999000|3!n3!n13!n|^(\d{3})(\d{3})(\d{13})$|19|IL620108000000099999999|IL2!n3!n3!n13!n|^IL(\d{2})(\d{3})(\d{3})(\d{13})$|23|0|2|3|5|2011-06-20|0 -IT|Italy|X 05428 11101 000000123456|X0542811101000000123456|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|IT60X0542811101000000123456|IT2!n1!a5!n5!n12!c|^IT(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1 -JO|Jordan|1310000302|CBJO0010000000000131000302|4!a4!n18!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|26|JO94CBJO0010000000000131000302|JO2!n4!a4!n18!c|^JO(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|30|0|3|4|7|2014-06-05|0 -KZ|Kazakhstan|KZ86 125K ZT50 0410 0100|125KZT5004100100|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|KZ07|KZ2!n3!n13!c|^KZ(\d{2})(\d{3})([A-Za-z0-9]{13})$||0|2|||2014-06-05|0 -KW|Kuwait|CBKU0000000000001234560101|CBKU0000000000001234560101|4!a22!c|^([A-Z]{4})([A-Za-z0-9]{22})$|26|KW81CBKU0000000000001234560101|KW2!n4!a22!n|^KW(\d{2})([A-Z]{4})(\d{22})$|30|0|3|||2011-06-20|0 -LV|Latvia|BANK 0000 4351 9500 1|BANK0000435195001|4!a13!c|^([A-Z]{4})([A-Za-z0-9]{13})$|17|LV80BANK0000435195001|LV2!n4!a13!c|^LV(\d{2})([A-Z]{4})([A-Za-z0-9]{13})$|21|0|3|||2011-06-20|1 -LB|Lebanon|01 001 901229114|0999 0000 0001 0019 0122 9114|4!n20!c|^(\d{4})([A-Za-z0-9]{20})$|24|LB62099900000001001901229114|LB2!n4!n20!c|^LB(\d{2})(\d{4})([A-Za-z0-9]{20})$|28|0|3|||2011-06-20|0 -LI|Liechtenstein|8810 2324013AA|088100002324013AA|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|19|LI21088100002324013AA|LI2!n5!n12!c|^LI(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2012-05-29|1 -LT|Lithuania|1000 0111 0100 1000|10000011101001000|5!n11!n|^(\d{5})(\d{11})$|16|LT121000011101001000|LT2!n5!n11!n|^LT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1 -LU|Luxembourg|0019 4006 4475 0000|0019400644750000|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|LU280019400644750000|LU2!n3!n13!c|^LU(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2011-06-20|1 -MK|Macedonia|300 0000000424 25|250120000058984|3!n10!c2!n|^(\d{3})([A-Za-z0-9]{10})(\d{2})$|15|MK07250120000058984|MK2!n3!n10!c2!n|^MK(\d{2})(\d{3})([A-Za-z0-9]{10})(\d{2})$|19|0|2|||2012-05-29|0 -MT|Malta|12345MTLCAST001S|MALT011000012345MTLCAST001S|4!a5!n18!c|^([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|27|MT84MALT011000012345MTLCAST001S|MT2!n4!a5!n18!c|^MT(\d{2})([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|31|0|3|4|8|2011-06-20|1 -MR|Mauritania|00020 00101 00001234567 53|00020001010000123456753|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|MR1300020001010000123456753|MR135!n5!n11!n2!n|^MR13(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2011-06-20|0 -MU|Mauritius|BOMM 0101 1010 3030 0200 000M UR|BOMM0101101030300200000MUR|4!a2!n2!n12!n3!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|26|MU17BOMM0101101030300200000MUR|MU2!n4!a2!n2!n12!n3!n3!a|^MU(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|30|0|5|6|7|2011-06-20|0 -MD|Moldova|00225100013104168|AG000225100013104168|2!c18!c|^([A-Za-z0-9]{2})([A-Za-z0-9]{18})$|20|MD24AG000225100013104168|MD2!n20!c|^MD(\d{2})([A-Za-z0-9]{20})$|24|0|1|||2012-09-09|0 -MC|Monaco|0011111000h|11222 00001 01234567890 30|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MC5811222000010123456789030|MC2!n5!n5!n11!c2!n|^MC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|1 -ME|Montenegro|505 0000123456789 51|505000012345678951|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|ME25505000012345678951|ME2!n3!n13!n2!n|^ME(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0 -NL|The Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2013-06-20|1 -NO|Norway|8601 11 17947|86011117947|4!n6!n1!n|^(\d{4})(\d{6})(\d{1})$|11|NO9386011117947|NO2!n4!n6!n1!n|^NO(\d{2})(\d{4})(\d{6})(\d{1})$|15|0|3|||2011-06-20|1 -PK|Pakistan|00260101036360|SCBL0000001123456702|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|PK36SCBL0000001123456702|PK2!n4!a16!c|^PK(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2012-05-29|0 -PL|Poland|61 1090 1014 0000 0712 1981 2874|109010140000071219812874|8!n16!n|^(\d{8})(\d{16})$|24|PL61109010140000071219812874|PL2!n8!n16n|^PL(\d{2})(\d{8})(\d{1,16})$|28|0|7|||2011-06-20|1 -PS|Palestine|400123456702|PALS000000000400123456702|4!a21!c|^([A-Z]{4})([A-Za-z0-9]{21})$|25|PS92PALS000000000400123456702|PS2!n4!a21!c|^PS(\d{2})([A-Z]{4})([A-Za-z0-9]{21})$|29|0|3|||2013-09-05|0 -PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2013-09-05|1 -QA|Qatar|QA58DOHB00001234567890ABCDEFG|DOHB00001234567890ABCDEFG|4!a4!n17!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|QA58DOHB00001234567890ABCDEFG|QA2!n4!a4!n17!c|^QA(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|0|3|4|7|2014-06-05|0 -RO|Romania|AAAA 1B31 0075 9384 0000|AAAA1B31007593840000|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|RO49AAAA1B31007593840000|RO2!n4!a16!c|^RO(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2011-06-20|1 -SM|San Marino|U032 2509 8000 0000 0270 100|U0322509800000000270100|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|SM86U0322509800000000270100|SM2!n1!a5!n5!n12!c|^SM(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|0|5|6|10|2011-06-20|1 -SA|Saudi Arabia|608010167519|80000000608010167519|2!n18!c|^(\d{2})([A-Za-z0-9]{18})$|20|SA0380000000608010167519|SA2!n2!n18!c|^SA(\d{2})(\d{2})([A-Za-z0-9]{18})$|24|0|1|||2012-05-29|0 -RS|Serbia|260-0056010016113-79|260005601001611379|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|RS35260005601001611379|RS2!n3!n13!n2!n|^RS(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0 -SK|Slovak Republic|19-8742637541/1200|12000000198742637541|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|SK3112000000198742637541|SK2!n4!n6!n10!n|^SK(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1 -SI|Slovenia|2633 0001 2039 086|263300012039086|5!n8!n2!n|^(\d{5})(\d{8})(\d{2})$|15|SI56191000000123438|SI2!n5!n8!n2!n|^SI(\d{2})(\d{5})(\d{8})(\d{2})$|19|0|1|2|4|2012-09-09|1 -ES|Spain|2100 0418 45 0200051332|21000418450200051332|4!n4!n1!n1!n10!n|^(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|20|ES9121000418450200051332|ES2!n4!n4!n1!n1!n10!n|^ES(\d{2})(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|24|0|3|4|7|2013-09-05|1 -SE|Sweden|1234 12 3456 1|5000 0000 0583 9825 7466|3!n16!n1!n|^(\d{3})(\d{16})(\d{1})$|20|SE4550000000058398257466|SE2!n3!n16!n1!n|^SE(\d{2})(\d{3})(\d{16})(\d{1})$|24|0|2|||2011-06-20|1 -CH|Switzerland|762 1162-3852.957|00762011623852957|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|CH9300762011623852957|CH2!n5!n12!c|^CH(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2011-06-20|1 -TN|Tunisia|10 006 0351835984788 31|10006035183598478831|2!n3!n13!n2!n|^(\d{2})(\d{3})(\d{13})(\d{2})$|20|TN5910006035183598478831|TN592!n3!n13!n2!n|^TN59(\d{2})(\d{3})(\d{13})(\d{2})$|24|0|1|2|4|2011-06-20|0 -TR|Turkey|0061 01299 1234567890123456789|0006100519786457841326|5!n1!c16!c|^(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|22|TR330006100519786457841326|TR2!n5!n1!c16!c|^TR(\d{2})(\d{5})([A-Za-z0-9]{1})([A-Za-z0-9]{16})$|26|0|4|||2011-06-20|0 -AE|United Arab Emirates|1234567890123456|0331234567890123456|3!n16!n|^(\d{3})(\d{16})$|19|AE070331234567890123456|AE2!n3!n16!n|^AE(\d{2})(\d{3})(\d{16})$|23|0|2|||2011-06-20|0 -GB|United Kingdom|60-16-13 31926819|NWBK60161331926819|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|GB29NWBK60161331926819|GB2!n4!a6!n8!n|^GB(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1 -VG|British Virgin Islands|00000 12 345 678 901|VPVG0000012345678901|4!a16!n|^([A-Z]{4})(\d{16})$|20|VG96VPVG0000012345678901|VG2!n4!a16!n|^VG(\d{2})([A-Z]{4})(\d{16})$|24|0|3|||2012-05-29|0 +country_code|country_name|domestic_example|bban_example|bban_format_swift|bban_format_regex|bban_length|iban_example|iban_format_swift|iban_format_regex|iban_length|bban_bankid_start_offset|bban_bankid_stop_offset|bban_branchid_start_offset|bban_branchid_stop_offset|registry_edition|country_sepa|swift_official|bban_checksum_start_offset|bban_checksum_stop_offset|country_code_iana|country_code_iso3166_1_alpha2|parent_registrar|currency_iso4217|central_bank_url|central_bank_name|membership +AL|Albania|0000000235698741|212110090000000235698741|8!n16!c|^(\d{8})([A-Za-z0-9]{16})$|24|AL47212110090000000235698741|AL2!n8!n16!c|^AL(\d{2})(\d{8})([A-Za-z0-9]{16})$|28|0|2|3|6|2011-06-20|0|1|7|7|al|AL||ALL|www.bankofalbania.org|Bank of Albania|non_member +DZ|Algeria|12341234123412341234|12341234123412341234|20!n|^[0-9]{20}$|20|DZ3512341234123412341234|DZ2!n20!n|^DZ(\d{2})(\d{20})$|24|||||2016-01-22|0|0|||dz|DZ||DZD|www.bank-of-algeria.dz|Bank of Algeria|non_member +AD|Andorra|2030200359100100|00012030200359100100|4!n4!n12!c|^(\d{4})(\d{4})([A-Za-z0-9]{12})$|20|AD1200012030200359100100|AD2!n4!n4!n12!c|^AD(\d{2})(\d{4})(\d{4})([A-Za-z0-9]{12})$|24|0|3|4|7|2011-06-20|1|1|||ad|AD||EUR|www.inaf.ad|Institut Nacional Andorrà de Finances|other_member +AO|Angola|123412341234123412341|123412341234123412341|21!n|^[0-9]{21}$|21|AO44123412341234123412341|AO2!n21!n|^AO(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||ao|AO||AOA|www.bna.ao|National Bank of Angola|non_member +AT|Austria|19043-234573201|1904300234573201|5!n11!n|^(\d{5})(\d{11})$|16|AT611904300234573201|AT2!n5!n11!n|^AT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1|1|||at|AT||EUR|www.oenb.at|Austrian National Bank|eu_member +AZ|Azerbaijan|NABZ00000000137010001944|NABZ00000000137010001944|4!a20!c|^([A-Z]{4})([A-Za-z0-9]{20})$|24|AZ21NABZ00000000137010001944|AZ2!n4!a20!c|^AZ(\d{2})([A-Z]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0|1|||az|AZ||AZN|www.cbar.az|The Central Bank of the Republic of Azerbaijan|non_member +BH|Bahrain|00001299123456|BMAG00001299123456|4!a14!c|^([A-Z]{4})([A-Za-z0-9]{14})$|18|BH67BMAG00001299123456|BH2!n4!a14!c|^BH(\d{2})([A-Z]{4})([A-Za-z0-9]{14})$|22|0|3|||2012-05-29|0|1|||bh|BH||BHD|www.cbb.gov.bh|Central Bank of Bahrain|non_member +BE|Belgium|539-0075470-34|539007547034|3!n7!n2!n|^(\d{3})(\d{7})(\d{2})$|12|BE68539007547034|BE2!n3!n7!n2!n|^BE(\d{2})(\d{3})(\d{7})(\d{2})$|16|0|2|||2011-06-20|1|1|10|11|be|BE||EUR|www.nbb.be|National Bank of Belgium|eu_member +BJ|Benin|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|BJ83A12312341234123412341234|BJ2!n1!a23!n|^BJ(\d{2})([A-Z]{1}[0-9]{23})$|28|||||2016-01-22|0|0|||bj|BJ||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +BA|Bosnia and Herzegovina|199-044-00012002-79|1990440001200279|3!n3!n8!n2!n|^(\d{3})(\d{3})(\d{8})(\d{2})$|16|BA391290079401028494|BA2!n3!n3!n8!n2!n|^BA(\d{2})(\d{3})(\d{3})(\d{8})(\d{2})$|20|0|2|3|5|2011-06-20|0|1|14|15|ba|BA||BAM|www.cbbh.ba|Central Bank of Bosnia and Herzegovina|non_member +BR|Brazil|0009795493C1|00360305000010009795493P1|8!n5!n10!n1!a1!c|^(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|25|BR9700360305000010009795493P1|BR2!n8!n5!n10!n1!a1!c|^BR(\d{2})(\d{8})(\d{5})(\d{10})([A-Z]{1})([A-Za-z0-9]{1})$|29|0|7|8|12|2013-06-20|0|1|||br|BR||BRL|www.bcb.gov.br|Central Bank of Brazil|non_member +VG|British Virgin Islands|00000 12 345 678 901|VPVG0000012345678901|4!a16!n|^([A-Z]{4})(\d{16})$|20|VG96VPVG0000012345678901|VG2!n4!a16!n|^VG(\d{2})([A-Z]{4})(\d{16})$|24|0|3|||2012-05-29|0|1|||vg|VG||USD|www.bvifsc.vg|The British Virgin Islands Financial Services Commission|non_member +BG|Bulgaria|BNBG 9661 1020 3456 78|BNBG96611020345678|4!a4!n2!n8!c|^([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|18|BG80BNBG96611020345678|BG2!n4!a4!n2!n8!c|^BG(\d{2})([A-Z]{4})(\d{4})(\d{2})([A-Za-z0-9]{8})$|22|0|3|4|7|2011-06-20|1|1|||bg|BG||BGN|www.bnb.bg|Bulgarian National Bank|eu_member +BF|Burkina Faso|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|BF4512341234123412341234123|BF2!n23!n|^BF(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||bf|BF||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +BI|Burundi|123412341234|123412341234|12!n|^[0-9]{12}$|12|BI33123412341234|BI2!n12!n|^BI(\d{2})(\d{12})$|16|||||2016-01-22|0|0|||bi|BI||BIF|www.brb.bi|Bank of the Republic of Burundi|non_member +BY|Belarus|3600 0000 0000 0Z00 AB00|NBRB 3600 0000 0000 0Z00 AB00|4!c4!n16!c|^([A-Za-z0-9]{4})(\d{4})([A-Za-z0-9]{16})$|24|BY13NBRB3600900000002Z00AB00|BY2!n4!c4!n16!c|^BY(\d{2})([A-Za-z0-9]{4})(\d{4})([A-Za-z0-9]{16})$|28|0|3|||2017-08-03|0|1|||by|BY||BYN|www.nbrb.by|National Bank of the Republic of Belarus|non_member +CM|Cameroon|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|CM1512341234123412341234123|CM2!n23!n|^CM(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||cm|CM||XAF|www.beac.int|Bank of Central African States|non_member +CV|Cape Verde|12341234123412341|12341234123412341|21!n|^[0-9]{21}$|21|CV05123412341234123412341|CV2!n21!n|^CV(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||cv|CV||CVE|www.bcv.cv|Bank of Cape Verde|non_member +CF|Central African Republic|0140183240140|20001000010140183240140|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|CF4220001000010120069700160|CF2!n5!n5!n11!n2!n|^CF(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|cf|CF||XAF|www.beac.int|Bank of Central African States|non_member +TD|Chad|37102538601 74|60003000203710253860174|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|TD8960003000203710253860174|TD2!n5!n5!n11!n2!n|^TD(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|cf|CF||XAF|www.beac.int|Bank of Central African States|non_member +KM|Comoros|00109044001 37|00005000010010904400137|5!n5!n13!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|KM4600005000010010904400137|KM2!n5!n5!n13!n2!n|^KM(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|km|KM||LMF|www.banque-comores.km|Banque Centrale des Comores|non_member +CG|Congo|10134513000|30011000101013451300019|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|CG3930013020003710721836132|CG2!n5!n5!n11!n2!n|^CG(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-01|0|1|21|23|cg|CG||CDF|www.bcc.cd|Central Bank of the Congo|non_member +CR|Costa Rica|02001026284066|015202001026284066|4!n14!n|^(\d{4})(\d{14})$|18|CR05015202001026284066|CR2!n4!n14!n|^CR(\d{2})(\d{4})(\d{14})$|22|0|3|||2012-05-29|0|1|||cr|CR||CRC|www.bccr.fi.cr|Central Bank of Costa Rica|non_member +CI|Côte d'Ivoire|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|CI77A12312341234123412341234|CI2!n1!a23!n|^CI(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||ci|CI||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +HR|Croatia|1001005-1863000160|10010051863000160|7!n10!n|^(\d{7})(\d{10})$|17|HR1210010051863000160|HR2!n7!n10!n|^HR(\d{2})(\d{7})(\d{10})$|21|0|6|||2011-06-20|1|1|||hr|HR||HRK|www.hnb.hr|Croatian National Bank|eu_member +CY|Cyprus|1200527600|002001280000001200527600|3!n5!n16!c|^(\d{3})(\d{5})([A-Za-z0-9]{16})$|24|CY17002001280000001200527600|CY2!n3!n5!n16!c|^CY(\d{2})(\d{3})(\d{5})([A-Za-z0-9]{16})$|28|0|2|3|7|2011-06-20|1|1|||cy|CY||EUR|www.centralbank.gov.cy|Central Bank of Cyprus|eu_member +CZ|Czech Republic|19-2000145399/0800|08000000192000145399|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|CZ6508000000192000145399|CZ2!n4!n6!n10!n|^CZ(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1|1|||cz|CZ||CZK|www.cnb.cz|Czech National Bank|eu_member +DK|Denmark|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|DK5000400440116243|DK2!n4!n9!n1!n|^DK(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|1|1|||dk|DK||DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)||eu_member +FO|Faroe Islands|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|FO2000400440116243|FO2!n4!n9!n1!n|^FO(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0|1|13|13|fo|FO|DK|DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)|non_member +GL|Greenland|0040 0440116243, 6460 0001631634, 6471 0001000206|00400440116243, 64600001631634, 64710001000206|4!n9!n1!n|^(\d{4})(\d{9})(\d{1})$|14|GL2000400440116243|GL2!n4!n9!n1!n|^GL(\d{2})(\d{4})(\d{9})(\d{1})$|18|0|3|||2011-06-20|0|1|||gl|GL|DK|DKK|www.nationalbanken.dk|National Bank of Denmark (Danmarks Nationalbank)|non_member +DJ|Djibouti|04099430200 08|10002010010409943020008|5!n5!n13!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|DJ2110002010010409943020008|DJ2!n5!n5!n13!n2!n|^DJ(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|dj|DJ||DJF|www.banque-centrale.dj|Central Bank of Djibouti|non_member +DO|Dominican Republic|1212453611324|AGR00000001212453611324|4!c20!n|^([A-Za-z0-9]{4})(\d{20})$|24|DO28BAGR00000001212453611324|DO2!n4!c20!n|^DO(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2011-06-20|0|1|||do|DO||DOP|www.bancentral.gov.do|Central Bank of the Dominican Republic|non_member +EG|Egypt|000263180002|0019000500000000263180002|4!n4!n17!n|(\d{4})(\d{4})(\d{17})|25|EG380019000500000000263180002|EG2!n4!n4!n17!n|^EG(\d{2})(\d{4})(\d{4})(\d{17})$|29|0|4|5|9|2020-01-01|0|0|||eg|EG||EGP|www.cbe.org.eg|Central Bank of Egypt|non_member +SV|El Salvador|00000000000000700025|CENR00000000000000700025|4!a20!n|^([A-Za-z0-9]{4})(\d{20})$|24|SV62CENR00000000000000700025|SV2!n4!a20!n|^SV(\d{2})([A-Za-z0-9]{4})(\d{20})$|28|0|3|||2017-08-03|0|1|||sv|SV||USD|www.bcr.gob.sv|Central Reserve Bank of El Salvador|non_member +GQ|Equitorial Guinea|37152281901 96|50002001003715228190196|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|GQ7050002001003715228190196|GQ2!n5!n5!n11!n2!n|^GQ(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|gq|GQ||XAF|www.beac.int|Bank of Central African States|non_member +EE|Estonia|221020145685|2200221020145685|2!n2!n11!n1!n|^(\d{2})(\d{2})(\d{11})(\d{1})$|16|EE382200221020145685|EE2!n2!n2!n11!n1!n|^EE(\d{2})(\d{2})(\d{2})(\d{11})(\d{1})$|20|0|1|||2011-06-20|1|1|15|15|ee|EE||EUR|www.eestipank.ee|Bank of Estonia|eu_member +FI|Finland|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|FI2112345600000785|FI2!n6!n7!n1!n|^FI(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-08-05|1|1|13|13|fi|FI||EUR|www.suomenpankki.fi|Bank of Finland|eu_member +AX|Åland Islands|123456-785|12345600000785|6!n7!n1!n|^(\d{6})(\d{7})(\d{1})$|14|AX2112345600000785|AX2!n6!n7!n1!n|^AX(\d{2})(\d{6})(\d{7})(\d{1})$|18|0|2|||2013-09-05|1|1|||ax|AX|FI|EUR|www.suomenpankki.fi|Bank of Finland|eu_member +FR|France|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|FR1420041010050500013M02606|FR2!n5!n5!n11!c2!n|^FR(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|fr|FR||EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +GF|French Guiana|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GF4120041010050500013M02606|GF2!n5!n5!n11!c2!n|^GF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|gf|GF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +PF|French Polynesia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PF5720041010050500013M02606|PF2!n5!n5!n11!c2!n|^PF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|pf|PF|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member +TF|French Southern Territories|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|TF2120041010050500013M02606|TF2!n5!n5!n11!c2!n|^TF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|tf|TF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member +GP|Guadelope|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|GP1120041010050500013M02606|GP2!n5!n5!n11!c2!n|^GP(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|gp|GP|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +MQ|Martinique|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MQ5120041010050500013M02606|MQ2!n5!n5!n11!c2!n|^MQ(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|mq|MQ|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +YT|Mayotte|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|YT3120041010050500013M02606|YT2!n5!n5!n11!c2!n|^YT(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|yt|YT|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +NC|New Caledonia|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|NC8420041010050500013M02606|NC2!n5!n5!n11!c2!n|^NC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|nc|NC|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member +RE|Réunion|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|RE4220041010050500013M02606|RE2!n5!n5!n11!c2!n|^RE(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|re|RE|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +BL|Saint Barthélemy|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|BL6820041010050500013M02606|BL2!n5!n5!n11!c2!n|^BL(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0|1|21|22||BL|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member +MF|Saint Martin (French Part)|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MF8420041010050500013M02606|MF2!n5!n5!n11!c2!n|^MF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-02-08|0|1|21|22||MF|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|eu_member +PM|Saint-Pierre and Miquelon|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|PM3620041010050500013M02606|PM2!n5!n5!n11!c2!n|^PM(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2013-08-28|1|1|21|22|pm|PM|FR|EUR|www.banque-france.fr|Bank of France (Banque de France)|other_member +WF|Wallis and Futuna|20041 01005 0500013M026 06|20041010050500013M02606|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|WF9120041010050500013M02606|WF2!n5!n5!n11!c2!n|^WF(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|0|1|21|22|wf|WF|FR|XPF|www.ieom.fr|Overseas Issuing Institute (Institut d'émission d'Outre-Mer)|other_member +GA|Gabon|15200001069 63|42001007341520000106963|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|GA2142001007341520000106963|GA2!n5!n5!n11!n2!n|^GA(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2017-08-03|0|0|21|23|ga|GA||XAF|www.beac.int|Bank of Central African States|non_member +GE|Georgia|0000000101904917|NB0000000101904917|2!a16!n|^([A-Z]{2})(\d{16})$|18|GE29NB0000000101904917|GE2!n2!a16!n|^GE(\d{2})([A-Z]{2})(\d{16})$|22|0|1|||2011-06-20|0|1|||ge|GE||GEL|www.nbg.gov.ge|National Bank of Georgia|non_member +DE|Germany|37040044-532013000|370400440532013000|8!n10!n|^(\d{8})(\d{10})$|18|DE89370400440532013000|DE2!n8!n10!n|^DE(\d{2})(\d{8})(\d{10})$|22|0|7|||2011-06-20|1|1|||de|DE||EUR|www.bundesbank.de|Deutsche Bundesbank|eu_member +GI|Gibraltar|0000 00007099 453|NWBK000000007099453|4!a15!c|^([A-Z]{4})([A-Za-z0-9]{15})$|19|GI75NWBK000000007099453|GI2!n4!a15!c|^GI(\d{2})([A-Z]{4})([A-Za-z0-9]{15})$|23|0|3|||2011-06-20|1|1|||gi|GI||GIP|www.gibraltar.gov.gi|Government of Gibraltar|other_member +GR|Greece|01250000000012300695|01101250000000012300695|3!n4!n16!c|^(\d{3})(\d{4})([A-Za-z0-9]{16})$|23|GR1601101250000000012300695|GR2!n3!n4!n16!c|^GR(\d{2})(\d{3})(\d{4})([A-Za-z0-9]{16})$|27|0|2|3|6|2011-06-20|1|1|||gr|GR||EUR|www.nbg.gr|National Bank of Greece|eu_member +GT|Guatemala|01020000001210029690|TRAJ01020000001210029690|4!c20!c|^([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|24|GT82TRAJ01020000001210029690|GT2!n4!c20!c|^GT(\d{2})([A-Za-z0-9]{4})([A-Za-z0-9]{20})$|28|0|3|||2012-05-29|0|1|||gt|GT||GTQ|www.banguat.gob.gt|Bank of Guatemala|non_member +GW|Guinea-Bissau|0181800637601|GW1430010181800637601|2!c2!n4!n11!n2!n|^([A-Za-z0-9]{2}\d{2})(\d{4})(\d{11})(\d{2})$|21|GW04GW1430010181800637601|GW2!n2!c2!n4!n11!n2!n|^GW(\d{2})([A-Za-z0-9]{2}\d{2})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2017-08-03|0|0|||gw|GW||XOF|www.bceao.int|Central Bank of West African States|non_member +HN|Honduras|123124|PISA00000000000000123124|4!a20!n|^([A-Za-z]{4})(\d{20})$|24|HN54PISA00000000000000123124|HN2!n4!a20!n|^HN(\d{2})([A-Za-z]{4})(\d{20})$|28|0|3|||2017-08-03|0|0|||hn|HN||HNL|www.bch.hn|Central Bank of Honduras|non_member +HU|Hungary|11773016-11111018-00000000|117730161111101800000000|3!n4!n1!n15!n1!n|^(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|24|HU42117730161111101800000000|HU2!n3!n4!n1!n15!n1!n|^HU(\d{2})(\d{3})(\d{4})(\d{1})(\d{15})(\d{1})$|28|0|2|3|6|2011-06-20|1|1|23|23|hu|HU||HUF|english.mnb.hu|Magyar Nemzeti Bank (Central Bank of Hungary)|eu_member +IS|Iceland|0159-26-007654-551073-0339|0159260076545510730339|4!n2!n6!n10!n|^(\d{4})(\d{2})(\d{6})(\d{10})$|22|IS140159260076545510730339|IS2!n4!n2!n6!n10!n|^IS(\d{2})(\d{4})(\d{2})(\d{6})(\d{10})$|26|0|3|6|11|2011-06-20|1|1|||is|IS||ISK|www.sedlabanki.is|Central Bank of Iceland|efta_member +AA|IIBAN (Internet)|0011123Z5678|0011123Z5678|12!a|^[A-Z0-9]{12}$|12|AA110011123Z5678|AA2!n12!a|^AA(\d{2})([A-Z0-9]{12})$|16|0|3||||0|0|||||||||non_member +IR|Iran|1234123412341234123412|123412341234123412|22!n|^[0-9]{22}$|22|IR081234123412341234123412|IR2!n22!n|^IR(\d{2})(\d{22})$|26|||||2016-01-22|0|0|||ir|IR||IRR|www.cbi.ir|The Central Bank of the Islamic Republic of Iran|non_member +IQ|Iraq|123456789012|NBIQ850123456789012|4!a3!n12!n|^([A-Za-z]{4})(\d{3})(\d{12})$|19|IQ98NBIQ850123456789012|IQ2!n4!a3!n12!n|^IQ(\d{2})([A-Za-z]{4})(\d{3})(\d{12})$|23|0|3|4|6|2017-08-03|0|1|||iq|IQ||IQD|www.cbi.iq|Central Bank of Iraq|non_member +IE|Ireland|93-11-52 12345678|AIBK93115212345678|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|IE29AIBK93115212345678|IE2!n4!a6!n8!n|^IE(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1|1|||ie|IE||EUR|www.centralbank.ie|Central Bank and Financial Services Authority of Ireland|eu_member +IL|Israel|10-800-99999999|010800000099999999|3!n3!n13!n|^(\d{3})(\d{3})(\d{13})$|19|IL620108000000099999999|IL2!n3!n3!n13!n|^IL(\d{2})(\d{3})(\d{3})(\d{13})$|23|0|2|3|5|2011-06-20|0|1|||il|IL||ILS|www.bankisrael.org.il|Bank of Israel|non_member +IT|Italy|X 05428 11101 000000123456|X0542811101000000123456|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|IT60X0542811101000000123456|IT2!n1!a5!n5!n12!c|^IT(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|1|5|6|10|2011-06-20|1|1|0|0|it|IT||EUR|www.bancaditalia.it|Bank of Italy|eu_member +JO|Jordan|1310000302|CBJO0010000000000131000302|4!a4!n18!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|26|JO94CBJO0010000000000131000302|JO2!n4!a4!n18!c|^JO(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{18})$|30|0|3|4|7|2014-06-05|0|1|||jo|JO||JOD|www.cbj.gov.jo|Central Bank of Jordan|non_member +KZ|Kazakhstan|KZ86125KZT5004100100|125KZT5004100100|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|KZ86125KZT5004100100|KZ2!n3!n13!c|^KZ(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2014-06-05|0|1|||kz|KZ||KZT|www.nationalbank.kz|National Bank of Kazakhstan|non_member +XK|Kosovo|1212 0123456789 06|1212012345678906|4!n10!n2!n|^(\d{4})(\d{10})(\d{2})$|16|XK051212012345678906|XK2!n4!n10!n2!n|^XK(\d{2})(\d{4})(\d{10})(\d{2})$|20|0|1|2|3|2016-01-21|0|1||||||EUR|www.bqk-kos.org|Central Bank of the Republic of Kosovo (Banka Qendrore e Kosovës)|non_member +KW|Kuwait|CBKU0000000000001234560101|CBKU0000000000001234560101|4!a22!c|^([A-Z]{4})([A-Za-z0-9]{22})$|26|KW81CBKU0000000000001234560101|KW2!n4!a22!c|^KW(\d{2})([A-Z]{4})([A-Za-z0-9]{22})$|30|0|3|||2016-01-21|0|1|||kw|KW||KWD|www.cbk.gov.kw|Central Bank of Kuwait|non_member +LV|Latvia|BANK 0000 4351 9500 1|BANK0000435195001|4!a13!c|^([A-Z]{4})([A-Za-z0-9]{13})$|17|LV80BANK0000435195001|LV2!n4!a13!c|^LV(\d{2})([A-Z]{4})([A-Za-z0-9]{13})$|21|0|3|||2011-06-20|1|1|||lv|LV||EUR|www.bank.lv/lat/main/all|Bank of Latvia|eu_member +LB|Lebanon|01 001 901229114|0999 0000 0001 0019 0122 9114|4!n20!c|^(\d{4})([A-Za-z0-9]{20})$|24|LB62099900000001001901229114|LB2!n4!n20!c|^LB(\d{2})(\d{4})([A-Za-z0-9]{20})$|28|0|3|||2011-06-20|0|1|||lb|LB||LBP|www.bdl.gov.lb|Central Bank of Lebanon|non_member +LI|Liechtenstein|8810 2324013AA|088100002324013AA|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|LI21088100002324013AA|LI2!n5!n12!c|^LI(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2012-05-29|1|1|||li|LI||CHF|www.llb.li|National Bank of Liechtenstein (Liechtensteinische Landesbank)|efta_member +LT|Lithuania|1000 0111 0100 1000|10000011101001000|5!n11!n|^(\d{5})(\d{11})$|16|LT121000011101001000|LT2!n5!n11!n|^LT(\d{2})(\d{5})(\d{11})$|20|0|4|||2011-06-20|1|1|||lt|LT||EUR|www.lb.lt|Bank of Lithuania|eu_member +LU|Luxembourg|0019 4006 4475 0000|0019400644750000|3!n13!c|^(\d{3})([A-Za-z0-9]{13})$|16|LU280019400644750000|LU2!n3!n13!c|^LU(\d{2})(\d{3})([A-Za-z0-9]{13})$|20|0|2|||2011-06-20|1|1|14|15|lu|LU||EUR|www.bcl.lu|Central Bank of Luxembourg|eu_member +MK|Macedonia|300 0000000424 25|250120000058984|3!n10!c2!n|^(\d{3})([A-Za-z0-9]{10})(\d{2})$|15|MK07250120000058984|MK2!n3!n10!c2!n|^MK(\d{2})(\d{3})([A-Za-z0-9]{10})(\d{2})$|19|0|2|||2012-05-29|0|1|13|14|mk|MK||MKD|www.nbrm.mk|National Bank of the Republic of Macedonia|non_member +MG|Madagascar|12341234123412341234123|12341234123412341234123|23!n|^[0-9]{23}$|23|MG4012341234123412341234123|MG2!n23!n|^MG(\d{2})(\d{23})$|27|||||2016-01-22|0|0|||mg|MG||MGA|www.banque-centrale.mg|Central Bank of Madagascar|non_member +ML|Mali|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|ML75A12312341234123412341234|ML2!n1!a23!n|^ML(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||ml|ML||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +MT|Malta|12345MTLCAST001S|MALT011000012345MTLCAST001S|4!a5!n18!c|^([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|27|MT84MALT011000012345MTLCAST001S|MT2!n4!a5!n18!c|^MT(\d{2})([A-Z]{4})(\d{5})([A-Za-z0-9]{18})$|31|0|3|4|8|2011-06-20|1|1|||mt|MT||EUR|www.centralbankmalta.org|Central Bank of Malta|eu_member +MR|Mauritania|00020 00101 00001234567 53|00020001010000123456753|5!n5!n11!n2!n|^(\d{5})(\d{5})(\d{11})(\d{2})$|23|MR1300020001010000123456753|MR2!n5!n5!n11!n2!n|^MR(\d{2})(\d{5})(\d{5})(\d{11})(\d{2})$|27|0|4|5|9|2016-06-11|0|1|21|22|mr|MR||MRO|www.bcm.mr|Central Bank of Mauritania|non_member +MU|Mauritius|BOMM 0101 1010 3030 0200 000M UR|BOMM0101101030300200000MUR|4!a2!n2!n12!n3!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|26|MU17BOMM0101101030300200000MUR|MU2!n4!a2!n2!n12!n3!n3!a|^MU(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{12})(\d{3})([A-Z]{3})$|30|0|5|6|7|2011-06-20|0|1|||mu|MU||MUR|www.bom.mu|Bank of Mauritius|non_member +MD|Moldova|00225100013104168|AG000225100013104168|2!c18!c|^([A-Za-z0-9]{2})([A-Za-z0-9]{18})$|20|MD24AG000225100013104168|MD2!n2!c18!c|^MD(\d{2})([A-Za-z0-9]{20})$|24|0|1|||2012-09-09|0|1|||md|MD||MDL|www.bnm.org|National Bank of Moldova|non_member +MC|Monaco|0011111000h|11222 00001 01234567890 30|5!n5!n11!c2!n|^(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|23|MC5811222000010123456789030|MC2!n5!n5!n11!c2!n|^MC(\d{2})(\d{5})(\d{5})([A-Za-z0-9]{11})(\d{2})$|27|0|4|5|9|2011-06-20|1|1|21|22|mc|MC||EUR|||other_member +ME|Montenegro|505 0000123456789 51|505000012345678951|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|ME25505000012345678951|ME2!n3!n13!n2!n|^ME(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0|1|16|17|me|ME||EUR|www.cb-mn.org|Central Bank of Montenegro|non_member +MA|Morocco|00012050005349 21|011519000001205000534921|3!n5!n14!n2!n|^(\d{3})(\d{5})(\d{14})(\d{2})$|26|MA64011519000001205000534921|MA2!n3!n5!n14!n2!n|^MA(\d{2})(\d{3})(\d{5})(\d{14})(\d{2})$|28|0|2|3|7|2017-08-03|0|0|22|24|ma|MA||MAD|www.bkam.ma|Bank Al-Maghrib|non_member +MZ|Mozambique|12341234123412341|12341234123412341|21!n|^[0-9]{21}$|21|MZ97123412341234123412341|MZ2!n21!n|^MZ(\d{2})(\d{21})$|25|||||2016-01-22|0|0|||mz|MZ||MZN|www.bancomoc.mz|Bank of Mozambique|non_member +NL|Netherlands|041 71 64 300|ABNA0417164300|4!a10!n|^([A-Z]{4})(\d{10})$|14|NL91ABNA0417164300|NL2!n4!a10!n|^NL(\d{2})([A-Z]{4})(\d{10})$|18|0|3|4|3|2013-06-20|1|1|||nl|NL||EUR|www.dnb.nl|Netherlands Bank|eu_member +NI|Nicaragua|3123123|BAMC000000000000000003123123|28!n|^([A-Za-z]{4})(\d{24})$|28|NI92BAMC000000000000000003123123|NI2!n4!a24!n|^NI(\d{2})([A-Za-z]{4})(\d{24})$|32|0|3|||2017-08-03|0|0|||ni|NI||NIO|www.bcn.gob.ni|Central Bank of Nicaragua|non_member +NE|Niger|01303050002 68|NE0380100100130305000268|2!a3!n5!n12!n2!n|^([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|23|NE58NE0380100100130305000268|NE2!n2!a3!n5!n12!n2!n|^NE(\d{2})([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|28|0|4|5|9|2017-08-03|0|0|22|23|ne|NE||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +NO|Norway|8601 11 17947|86011117947|4!n6!n1!n|^(\d{4})(\d{6})(\d{1})$|11|NO9386011117947|NO2!n4!n6!n1!n|^NO(\d{2})(\d{4})(\d{6})(\d{1})$|15|0|3|||2011-06-20|1|1|10|10|no|NO||NOK|www.norges-bank.no|Central Bank of Norway (Norges Bank)|efta_member +PK|Pakistan|00260101036360|SCBL0000001123456702|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|PK36SCBL0000001123456702|PK2!n4!a16!c|^PK(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2012-05-29|0|1|||pk|PK||PKR|www.sbp.org.pk|State Bank of Pakistan|non_member +PS|Palestine|400123456702|PALS000000000400123456702|4!a21!c|^([A-Z]{4})([A-Za-z0-9]{21})$|25|PS92PALS000000000400123456702|PS2!n4!a21!c|^PS(\d{2})([A-Z]{4})([A-Za-z0-9]{21})$|29|0|3|||2013-09-05|0|1|||ps|PS||ILS|www.pma.ps|Palestine Monetary Authority|non_member +PL|Poland|61 1090 1014 0000 0712 1981 2874|109010140000071219812874|8!n16!n|^(\d{8})(\d{16})$|24|PL61109010140000071219812874|PL2!n8!n16!n|^PL(\d{2})(\d{8})(\d{16})$|28|0|7|||2011-06-20|1|1|7|7|pl|PL||PLN|www.nbp.pl|National Bank of Poland|eu_member +PT|Portugal|0002.0123.12345678901.54|000201231234567890154|4!n4!n11!n2!n|^(\d{4})(\d{4})(\d{11})(\d{2})$|21|PT50000201231234567890154|PT2!n4!n4!n11!n2!n|^PT(\d{2})(\d{4})(\d{4})(\d{11})(\d{2})$|25|0|3|4|7|2013-09-05|1|1|19|20|pt|PT||EUR|www.bportugal.pt|Bank of Portugal|eu_member +QA|Qatar|QA58DOHB00001234567890ABCDEFG|DOHB00001234567890ABCDEFG|4!a4!n17!c|^([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|25|QA58DOHB00001234567890ABCDEFG|QA2!n4!a4!n17!c|^QA(\d{2})([A-Z]{4})(\d{4})([A-Za-z0-9]{17})$|29|0|3|4|7|2014-06-05|0|1|||qa|QA||QAR|www.qcb.gov.qa|Qatar Central Bank|non_member +RO|Romania|AAAA 1B31 0075 9384 0000|AAAA1B31007593840000|4!a16!c|^([A-Z]{4})([A-Za-z0-9]{16})$|20|RO49AAAA1B31007593840000|RO2!n4!a16!c|^RO(\d{2})([A-Z]{4})([A-Za-z0-9]{16})$|24|0|3|||2011-06-20|1|1|||ro|RO||RON|www.bnro.ro|National Bank of Romania|eu_member +LC|Saint Lucia|0001 0001 0012 0012 0002 3015|HEMM000100010012001200023015|4!a24!c|^([A-Z]{4})([A-Za-z0-9]{24})$|28|LC55HEMM000100010012001200023015|LC2!n4!a24!c|^LC(\d{2})([A-Z]{4})([A-Za-z0-9]{24})$|32|0|3|||2016-04-15|0|1|||lc|LC||XCD|www.eccb-centralbank.org|Eastern Caribbean Central Bank|non_member +SM|San Marino|U032 2509 8000 0000 0270 100|U0322509800000000270100|1!a5!n5!n12!c|^([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|23|SM86U0322509800000000270100|SM2!n1!a5!n5!n12!c|^SM(\d{2})([A-Z]{1})(\d{5})(\d{5})([A-Za-z0-9]{12})$|27|1|5|6|10|2011-06-20|1|1|0|0|sm|SM||EUR|www.bcsm.sm|Central Bank of the Republic of San Marino|other_member +ST|São Tomé and Príncipe|518453101|0001000100518453101|8!n11!n2!n|^(\d{8})(\d{11})(\d{2})$|21|ST68000100010051845310112|ST2!n8!n11!n2!n|^ST(\d{2})(\d{8})(\d{11})(\d{2})$|25|0|3|4|7|2016-01-21|0|1|||st|ST||STD|www.bcstp.st|Central Bank of São Tomé and Príncipe|non_member +SA|Saudi Arabia|608010167519|80000000608010167519|2!n18!c|^(\d{2})([A-Za-z0-9]{18})$|20|SA0380000000608010167519|SA2!n2!n18!c|^SA(\d{2})(\d{2})([A-Za-z0-9]{18})$|24|0|1|||2012-05-29|0|1|||sa|SA||SAR|www.sama.gov.sa|Saudi Arabian Monetary Agency|non_member +SN|Senegal|A12312341234123412341234|A12312341234123412341234|1!a23!n|^[A-Z]{1}[0-9]{23}$|24|SN15A12312341234123412341234|SN2!n1!a23!n|^SN(\d{2})([A-Z]{1})(\d{23})$|28|||||2016-01-22|0|0|||sn|SN||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +RS|Serbia|260-0056010016113-79|260005601001611379|3!n13!n2!n|^(\d{3})(\d{13})(\d{2})$|18|RS35260005601001611379|RS2!n3!n13!n2!n|^RS(\d{2})(\d{3})(\d{13})(\d{2})$|22|0|2|||2011-06-20|0|1|16|17|rs|RS||RSD|www.nbs.rs|National Bank of Serbia|non_member +SC|Seychelles|0000000000001497|SSCB11010000000000001497USD|4!a2!n2!n16!n3!a|^([A-Z]{4})(\d{2})(\d{2})(\d{16})([A-Z]{3})$|27|SC18SSCB11010000000000001497USD|SC2!n4!a2!n2!n16!n3!a|^SC(\d{2})([A-Z]{4})(\d{2})(\d{2})(\d{16})([A-Z]{3})$|31|0|3|4|7|2020-01-01|0|1|||sc|SC||SCR|www.cbs.sc|Central Bank of Seychelles|non_member +SK|Slovakia|19-8742637541/1200|12000000198742637541|4!n6!n10!n|^(\d{4})(\d{6})(\d{10})$|20|SK3112000000198742637541|SK2!n4!n6!n10!n|^SK(\d{2})(\d{4})(\d{6})(\d{10})$|24|0|3|4|9|2011-06-20|1|1|19|19|sk|SK||EUR|www.nbs.sk|National Bank of Slovakia|eu_member +SI|Slovenia|2633 0001 2039 086|263300012039086|5!n8!n2!n|^(\d{5})(\d{8})(\d{2})$|15|SI56191000000123438|SI2!n5!n8!n2!n|^SI(\d{2})(\d{5})(\d{8})(\d{2})$|19|0|1|2|4|2012-09-09|1|1|13|14|si|SI||EUR|www.bsi.si|Bank of Slovenia|eu_member +ES|Spain|2100 0418 45 0200051332|21000418450200051332|4!n4!n1!n1!n10!n|^(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|20|ES9121000418450200051332|ES2!n4!n4!n1!n1!n10!n|^ES(\d{2})(\d{4})(\d{4})(\d{1})(\d{1})(\d{10})$|24|0|3|4|7|2013-09-05|1|1|8|9|es|ES||EUR|www.bde.es|Bank of Spain|eu_member +SE|Sweden|1234 12 3456 1|5000 0000 0583 9825 7466|3!n16!n1!n|^(\d{3})(\d{16})(\d{1})$|20|SE4550000000058398257466|SE2!n3!n16!n1!n|^SE(\d{2})(\d{3})(\d{16})(\d{1})$|24|0|2|||2011-06-20|1|1|19|19|se|SE||SEK|www.riksbank.com|Bank of Sweden (Sveriges Riksbank)|eu_member +CH|Switzerland|762 1162-3852.957|00762011623852957|5!n12!c|^(\d{5})([A-Za-z0-9]{12})$|17|CH9300762011623852957|CH2!n5!n12!c|^CH(\d{2})(\d{5})([A-Za-z0-9]{12})$|21|0|4|||2011-06-20|1|1|||ch|CH||CHF|www.snb.ch|Swiss National Bank|efta_member +TL|Timor-Leste|008 00123456789101 57|0080012345678910157|3!n 14!n 2!n|^(\d{3})(\d{14})(\d{2})$|19|TL380080012345678910157|TL2!n3!n14!n2!n|^TL(\d{2})(\d{3})(\d{14})(\d{2})$|23|0|3|4|6|2016-01-21|0|1|17|18|tl|TL||USD|www.bancocentral.tl|Central Bank of Timor-Leste (Banco Central de Timor-Leste)|non_member +TG|Togo|43103465004000 70|TG0090604310346500400070|2!a3!n5!n12!n2!n|^([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|26|TG53TG0090604310346500400070|TG2!n2!a3!n5!n12!n2!n|^TG(\d{2})([A-Za-z]{2}\d{3})(\d{5})(\d{12})(\d{2})$|28|0|4|5|9|2017-08-03|0|0|22|24|tg|TG||XOF|www.bceao.int|Central Bank of West African States (BCEAO)|non_member +TN|Tunisia|10 006 0351835984788 31|10006035183598478831|2!n3!n13!n2!n|^(\d{2})(\d{3})(\d{13})(\d{2})$|20|TN5910006035183598478831|TN2!n2!n3!n13!n2!n|^TN(\d{2})(\d{2})(\d{3})(\d{13})(\d{2})$|24|0|1|2|4|2011-06-20|0|1|18|19|tn|TN||TND|www.bct.gov.tn|Central Bank of Tunisia|non_member +TR|Turkey|TR33 0006 1005 1978 6457 8413 26|0006100519786457841326|5!n1!n16!c|^(\d{5})(\d{1})([A-Za-z0-9]{16})$|22|TR330006100519786457841326|TR2!n5!n1!n16!c|^TR(\d{2})(\d{5})(\d{1})([A-Za-z0-9]{16})$|26|0|4|||2016-01-21|0|1|||tr|TR||TRY|www.tcmb.gov.tr|Central Bank of the Republic of Turkey|non_member +UA|Ukraine|3996220000026007233566001|3996220000026007233566001|6!n19!c|^[0-9]{6}[A-Za-z0-9]{19}$|25|UA213996220000026007233566001|UA2!n6!n19!c|^UA(\d{2})(\d{6})([A-Za-z0-9]{19})$|29|0|5|||2016-01-22|0|0|||ua|UA||UAH|www.bank.gov.ua|National Bank of Ukraine|non_member +AE|United Arab Emirates|1234567890123456|0331234567890123456|3!n16!n|^(\d{3})(\d{16})$|19|AE070331234567890123456|AE2!n3!n16!n|^AE(\d{2})(\d{3})(\d{16})$|23|0|2|||2011-06-20|0|1|||ae|AE||AED|www.centralbank.ae|Central Bank of the United Arab Emirates|non_member +GB|United Kingdom|60-16-13 31926819|NWBK60161331926819|4!a6!n8!n|^([A-Z]{4})(\d{6})(\d{8})$|18|GB29NWBK60161331926819|GB2!n4!a6!n8!n|^GB(\d{2})([A-Z]{4})(\d{6})(\d{8})$|22|0|3|4|9|2011-06-20|1|1|||uk|GB||GBP|www.bankofengland.co.uk|Bank of England|other_member diff --git a/htdocs/install/mysql/data/llx_c_asset_disposal_type.sql b/htdocs/install/mysql/data/llx_c_asset_disposal_type-asset.sql similarity index 100% rename from htdocs/install/mysql/data/llx_c_asset_disposal_type.sql rename to htdocs/install/mysql/data/llx_c_asset_disposal_type-asset.sql diff --git a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql index 35bf589b2f0..d35797c3750 100644 --- a/htdocs/install/mysql/migration/15.0.0-16.0.0.sql +++ b/htdocs/install/mysql/migration/15.0.0-16.0.0.sql @@ -51,7 +51,8 @@ -- VPGSQL8.2 ALTER TABLE llx_c_payment_term ALTER COLUMN rowid SET DEFAULT nextval('llx_c_payment_term_rowid_seq'); -- VPGSQL8.2 SELECT setval('llx_c_payment_term_rowid_seq', MAX(rowid)) FROM llx_c_payment_term; - +ALTER TABLE llx_entrepot ADD COLUMN barcode varchar(180) DEFAULT NULL; +ALTER TABLE llx_entrepot ADD COLUMN fk_barcode_type integer DEFAULT NULL; ALTER TABLE llx_c_transport_mode ADD UNIQUE INDEX uk_c_transport_mode (code, entity); @@ -650,3 +651,11 @@ ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN ext_payment_id varchar INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES (140, 'PCN2020-LUXEMBURG', 'Plan comptable normalisé 2020 Luxembourgeois', 1); +ALTER TABLE llx_cronjob MODIFY COLUMN label varchar(255) NOT NULL; + +-- We need to keep only the PurgeDeleteTemporaryFilesShort with params = 'tempfilsold+logfiles' +DELETE FROM llx_cronjob WHERE label = 'PurgeDeleteTemporaryFilesShort' AND params = 'tempfilesold'; + +ALTER TABLE llx_cronjob DROP INDEX uk_cronjob; +ALTER TABLE llx_cronjob ADD UNIQUE INDEX uk_cronjob (label, entity); + diff --git a/htdocs/install/mysql/migration/16.0.0-17.0.0.sql b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql new file mode 100644 index 00000000000..dad3712d3f3 --- /dev/null +++ b/htdocs/install/mysql/migration/16.0.0-17.0.0.sql @@ -0,0 +1,45 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 16.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table; +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex; +-- To make pk to be auto increment (mysql): +-- -- VMYSQL4.3 ALTER TABLE llx_table ADD PRIMARY KEY(rowid); +-- -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. +-- To rebuild sequence for postgresql after insert by forcing id autoincrement fields: +-- -- VPGSQL8.2 SELECT dol_util_rebuild_sequences(); + + + +-- Missing in v16 or lower + + + + +-- v17 + +ALTER TABLE llx_facture ADD COLUMN close_missing_amount double(24, 8) after close_code; + +ALTER TABLE llx_facture_fourn ADD COLUMN close_missing_amount double(24, 8) after close_code; diff --git a/htdocs/install/mysql/tables/llx_cronjob.key.sql b/htdocs/install/mysql/tables/llx_cronjob.key.sql index d0fac214ba0..a1d7587e217 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.key.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.key.sql @@ -21,3 +21,5 @@ ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datelastrun (datelastrun); ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datenextrun (datenextrun); ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_datestart (datestart); ALTER TABLE llx_cronjob ADD INDEX idx_cronjob_dateend (dateend); + +ALTER TABLE llx_cronjob ADD UNIQUE INDEX uk_cronjob (label, entity); diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index 69d30d924e8..27e8a31cc9a 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -24,7 +24,7 @@ CREATE TABLE llx_cronjob tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, jobtype varchar(10) NOT NULL, -- 'method', 'function' or 'command' - label text NOT NULL, + label varchar(255) NOT NULL, command varchar(255), classesname varchar(255), -- when jobtype is 'method', name of the class file containing the method. objectname varchar(255), diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index b2e814c15c6..4b93106e0d4 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -35,6 +35,8 @@ create table llx_entrepot fk_pays integer DEFAULT 0, phone varchar(20), -- phone number fax varchar(20), -- fax number + barcode varchar(180) DEFAULT NULL, -- barcode + fk_barcode_type integer DEFAULT NULL, -- barcode type warehouse_usage integer DEFAULT 1, -- 1=internal, 2=external (virtual warehouse or stock out of company) statut tinyint DEFAULT 1, -- 1 open, 0 close fk_user_author integer, diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 8c7e2db385c..3e8ac2b7a50 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -48,6 +48,7 @@ create table llx_facture remise real DEFAULT 0, -- remise totale calculee close_code varchar(16), -- Code motif cloture sans paiement complet + close_missing_amount double(24,8), -- Amount missing when closing with a not complete payment close_note varchar(128), -- Commentaire cloture sans paiement complet total_tva double(24,8) DEFAULT 0, -- amount total tva apres remise totale diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 9ceff4e4fa9..3a304567beb 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -44,6 +44,7 @@ create table llx_facture_fourn remise double(24,8) DEFAULT 0, close_code varchar(16), -- Code motif cloture sans paiement complet + close_missing_amount double(24,8), -- Amount missing when closing with a not complete payment close_note varchar(128), -- Commentaire cloture sans paiement complet tva double(24,8) DEFAULT 0, diff --git a/htdocs/install/step4.php b/htdocs/install/step4.php index c8be975c19f..1bd7665f52a 100644 --- a/htdocs/install/step4.php +++ b/htdocs/install/step4.php @@ -80,7 +80,7 @@ $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf if ($db->ok) { print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index 3f0142915a0..88ef801625e 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -862,27 +862,11 @@ class KnowledgeRecord extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/langs/am_ET/externalsite.lang b/htdocs/langs/am_ET/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/am_ET/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/am_ET/ftp.lang b/htdocs/langs/am_ET/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/am_ET/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ar_DZ/externalsite.lang b/htdocs/langs/ar_DZ/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ar_DZ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ar_DZ/ftp.lang b/htdocs/langs/ar_DZ/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/ar_DZ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area -FTPAreaDesc=This screen shows a view of an FTP et SFTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions -FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ar_JO/externalsite.lang b/htdocs/langs/ar_JO/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ar_JO/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ar_JO/ftp.lang b/htdocs/langs/ar_JO/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/ar_JO/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area -FTPAreaDesc=This screen shows a view of an FTP et SFTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions -FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ar_SA/externalsite.lang b/htdocs/langs/ar_SA/externalsite.lang deleted file mode 100644 index ac4d267c40d..00000000000 --- a/htdocs/langs/ar_SA/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=إعداد رابط لموقع خارجي -ExternalSiteURL=رابط موقع خارجي لمحتوى إطار داخلي في لغة توصيف النص التشعبي -ExternalSiteModuleNotComplete=لم يتم تهيئة نموذج الموقع الخارجي بصورة صحيحة. -ExampleMyMenuEntry=مُدخل قائمتي diff --git a/htdocs/langs/ar_SA/ftp.lang b/htdocs/langs/ar_SA/ftp.lang deleted file mode 100644 index 042bbfee564..00000000000 --- a/htdocs/langs/ar_SA/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=إعداد نموذج عميل بروتوكول نقل الملفات -NewFTPClient=إعداد إتصال بروتوكول نقل الملفات جديد -FTPArea=منطقة بروتوكول نقل الملفات -FTPAreaDesc=هذه الشاشة تظهر لك المحتوى محتوى خادم بروتوكول نقل الملفات -SetupOfFTPClientModuleNotComplete=إعداد نموذج عميل بروتوكول نقل الملفات يبدو أنة غير مكتمل -FTPFeatureNotSupportedByYourPHP=بي اتش بي الخاص بك لا يدعم وظائف بروتوكول نقل الملفات -FailedToConnectToFTPServer=فشل الاتصال بخادم بروتوكول نقل الملفات ( الخادم%s ، منفذ%s) -FailedToConnectToFTPServerWithCredentials=فشل في تسجيل الدخول إلى خادم بروتوكول نقل الملفات مع تعريف الدخول / كلمة المرور المحددة -FTPFailedToRemoveFile=فشل لإزالة الملف %s . -FTPFailedToRemoveDir=فشل إزالة المسار %s (راجع الأذونات وهذا المسار فارغ). -FTPPassiveMode=الوضع السلبي -ChooseAFTPEntryIntoMenu=اختيار مدخل بروتوكول نقل البيانات في القائمة ... -FailedToGetFile=فشل في الحصول على الملفات %s diff --git a/htdocs/langs/ar_SY/externalsite.lang b/htdocs/langs/ar_SY/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ar_SY/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ar_SY/ftp.lang b/htdocs/langs/ar_SY/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/ar_SY/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area -FTPAreaDesc=This screen shows a view of an FTP et SFTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions -FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/az_AZ/externalsite.lang b/htdocs/langs/az_AZ/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/az_AZ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/az_AZ/ftp.lang b/htdocs/langs/az_AZ/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/az_AZ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/bg_BG/externalsite.lang b/htdocs/langs/bg_BG/externalsite.lang deleted file mode 100644 index 5b2ff52c0f8..00000000000 --- a/htdocs/langs/bg_BG/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Настройка на линк към външен сайт -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Модула Външен сайт не е конфигуриран правилно. -ExampleMyMenuEntry=Мой елемент на меню diff --git a/htdocs/langs/bg_BG/ftp.lang b/htdocs/langs/bg_BG/ftp.lang deleted file mode 100644 index d74dec3de67..00000000000 --- a/htdocs/langs/bg_BG/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Настройка на модул FTP клиент -NewFTPClient=Настройка на нова FTP връзка -FTPArea=Секция с FTP -FTPAreaDesc=Този екран ви показва съдържанието на FTP сървъра -SetupOfFTPClientModuleNotComplete=Настройката на клиентския FTP модул изглежда непълна -FTPFeatureNotSupportedByYourPHP=Вашият PHP не поддържа FTP функции -FailedToConnectToFTPServer=Неуспешно свързване с FTP сървър (сървър %s, порт %s) -FailedToConnectToFTPServerWithCredentials=Неуспешно влизане в FTP сървър с дефинираните потребителско име / парола -FTPFailedToRemoveFile=Неуспешно премахване на файл %s. -FTPFailedToRemoveDir=Неуспешно премахване на директория %s: проверете правата и дали директорията е празна. -FTPPassiveMode=Пасивен режим -ChooseAFTPEntryIntoMenu=Изберете FTP сайт от менюто... -FailedToGetFile=Неуспешно получаване на файлове %s diff --git a/htdocs/langs/bn_BD/externalsite.lang b/htdocs/langs/bn_BD/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/bn_BD/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bn_BD/ftp.lang b/htdocs/langs/bn_BD/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/bn_BD/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/bn_IN/externalsite.lang b/htdocs/langs/bn_IN/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/bn_IN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bn_IN/ftp.lang b/htdocs/langs/bn_IN/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/bn_IN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/bs_BA/externalsite.lang b/htdocs/langs/bs_BA/externalsite.lang deleted file mode 100644 index 54a33f638e8..00000000000 --- a/htdocs/langs/bs_BA/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Podesi link za eksterni web sajt -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul ExternalSite nije konfigurisan kako treba. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/bs_BA/ftp.lang b/htdocs/langs/bs_BA/ftp.lang deleted file mode 100644 index 924bd5389f3..00000000000 --- a/htdocs/langs/bs_BA/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Postavke modula FTP klijent -NewFTPClient=Postavke nove FTP konekcije -FTPArea=Područje za FTP -FTPAreaDesc=Ovaj prozor prikazuje sadržaj FTP servera -SetupOfFTPClientModuleNotComplete=Postavke modula FTP klijent nisu završene -FTPFeatureNotSupportedByYourPHP=Vaš PHP ne podržava FTP funkcije -FailedToConnectToFTPServer=Neuspjelo povezivanje na FTP server (server %s port %s) -FailedToConnectToFTPServerWithCredentials=Neuspio login na FTP server sa definisanim login/šifra -FTPFailedToRemoveFile=Neuspjelo uklanjanje fajla %s. -FTPFailedToRemoveDir=Neuspjelo uklanjanje direktorija %s (Provjerite dozvole i da li je direktorij prazan) -FTPPassiveMode=Pasivni način -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ca_ES/externalsite.lang b/htdocs/langs/ca_ES/externalsite.lang deleted file mode 100644 index 4547f3e3c70..00000000000 --- a/htdocs/langs/ca_ES/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configuració de l'enllaç a la pàgina web externa -ExternalSiteURL=URL del lloc extern del contingut iframe HTML -ExternalSiteModuleNotComplete=El mòdul Lloc web extern no ha estat configurat correctament. -ExampleMyMenuEntry=La meva entrada del menú diff --git a/htdocs/langs/ca_ES/ftp.lang b/htdocs/langs/ca_ES/ftp.lang deleted file mode 100644 index 54903cb63c4..00000000000 --- a/htdocs/langs/ca_ES/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuració del mòdul client FTP -NewFTPClient=Nova connexió client FTP -FTPArea=Àrea FTP -FTPAreaDesc=Aquesta pantalla presenta una vista de servidor FTP -SetupOfFTPClientModuleNotComplete=La configuració del mòdul de client FTP sembla incompleta -FTPFeatureNotSupportedByYourPHP=El seu PHP no suporta les funcions FTP -FailedToConnectToFTPServer=No s'ha pogut connectar amb el servidor FTP (servidor: %s, port %s) -FailedToConnectToFTPServerWithCredentials=No s'ha pogut connectar amb el login/contrasenya FTP configurats -FTPFailedToRemoveFile=No s'ha pogut suprimir el fitxer %s. -FTPFailedToRemoveDir=No s'ha pogut suprimir la carpeta %s (Comproveu els permisos i que el directori està buit). -FTPPassiveMode=Mode passiu -ChooseAFTPEntryIntoMenu=Tria una entrada FTP en el menú... -FailedToGetFile=Error obtenint els fitxers %s diff --git a/htdocs/langs/cs_CZ/externalsite.lang b/htdocs/langs/cs_CZ/externalsite.lang deleted file mode 100644 index 2a75cea4aa9..00000000000 --- a/htdocs/langs/cs_CZ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Nastavení odkazu na externí webové stránky -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul Externí stránky nebyl správně nakonfigurován. -ExampleMyMenuEntry=Moje menu vstup diff --git a/htdocs/langs/cs_CZ/ftp.lang b/htdocs/langs/cs_CZ/ftp.lang deleted file mode 100644 index e2717b25503..00000000000 --- a/htdocs/langs/cs_CZ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Nastavení modulu FTP klienta -NewFTPClient=Nastavit nové FTP připojení -FTPArea=FTP oblast -FTPAreaDesc=Tato obrazovka zobrazí náhled FTP serveru -SetupOfFTPClientModuleNotComplete=Zdá se že nastavení FTP klienta není kompletní -FTPFeatureNotSupportedByYourPHP=Vaše PHP nepodporuje FTP funkce -FailedToConnectToFTPServer=Nepodařilo se připojit k FTP serveru (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Nepodařilo se přihlásit k FTP serveru pod zadaným uživatelským jménem a heslem -FTPFailedToRemoveFile=Nepodařilo se odstranit soubor %s. -FTPFailedToRemoveDir=Nepodařilo se odstranit adresář %s (Zkontrolujte oprávnění a zda adresář je prázdný). -FTPPassiveMode=Pasivní režim -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/cy_GB/externalsite.lang b/htdocs/langs/cy_GB/externalsite.lang deleted file mode 100644 index 399925afb89..00000000000 --- a/htdocs/langs/cy_GB/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Gosod dolen i wefan allanol -ExternalSiteURL=URL Gwefan Allanol o gynnwys HTML iframe -ExternalSiteModuleNotComplete=Nid oedd Module ExternalSite wedi'i ffurfweddu'n gywir. -ExampleMyMenuEntry=Fy nghofnod ar y ddewislen diff --git a/htdocs/langs/cy_GB/ftp.lang b/htdocs/langs/cy_GB/ftp.lang deleted file mode 100644 index 699368df37b..00000000000 --- a/htdocs/langs/cy_GB/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Gosod modiwl Cleient FTP neu SFTP -NewFTPClient=Gosodiad cysylltiad FTP/FTPS newydd -FTPArea=Ardal FTP/FTPS -FTPAreaDesc=Mae'r sgrin hon yn dangos golwg o weinydd FTP et SFTP. -SetupOfFTPClientModuleNotComplete=Mae'n ymddangos bod gosodiad y modiwl cleient FTP neu SFTP yn anghyflawn -FTPFeatureNotSupportedByYourPHP=Nid yw eich PHP yn cefnogi swyddogaethau FTP neu SFTP -FailedToConnectToFTPServer=Wedi methu cysylltu â'r gweinydd (gweinydd %s, porthladd %s) -FailedToConnectToFTPServerWithCredentials=Wedi methu mewngofnodi i'r gweinydd gyda mewngofnodi/cyfrinair diffiniedig -FTPFailedToRemoveFile=Wedi methu tynnu ffeil %s . -FTPFailedToRemoveDir=Wedi methu dileu cyfeiriadur %s : gwirio caniatadau a bod y cyfeiriadur yn wag. -FTPPassiveMode=Modd goddefol -ChooseAFTPEntryIntoMenu=Dewiswch wefan FTP/SFTP o'r ddewislen... -FailedToGetFile=Wedi methu cael ffeiliau %s diff --git a/htdocs/langs/da_DK/externalsite.lang b/htdocs/langs/da_DK/externalsite.lang deleted file mode 100644 index e9f24884e46..00000000000 --- a/htdocs/langs/da_DK/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Opsæt link til ekstern hjemmeside -ExternalSiteURL=Ekstern websteds-URL for HTML iframe-indhold -ExternalSiteModuleNotComplete=Modul ExternalSite blev ikke konfigureret korrekt. -ExampleMyMenuEntry=Min menu indgang diff --git a/htdocs/langs/da_DK/ftp.lang b/htdocs/langs/da_DK/ftp.lang deleted file mode 100644 index f0b6c58f7ab..00000000000 --- a/htdocs/langs/da_DK/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Opsætning af FTP- eller SFTP-klientmodul -NewFTPClient=Ny FTP / FTPS-forbindelsesopsætning -FTPArea=FTP / FTPS-område -FTPAreaDesc=Dette skærmbillede viser en FTP et SFTP-server. -SetupOfFTPClientModuleNotComplete=Opsætningen af FTP- eller SFTP-klientmodulet ser ud til at være ufuldstændig -FTPFeatureNotSupportedByYourPHP=Din PHP understøtter ikke FTP- eller SFTP-funktioner -FailedToConnectToFTPServer=Der kunne ikke oprettes forbindelse til serveren (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Kunne ikke logge ind på serveren med defineret login / adgangskode -FTPFailedToRemoveFile=Kunne ikke fjerne filen %s. -FTPFailedToRemoveDir=Kunne ikke fjerne biblioteket%s: Kontroller tilladelser, og at biblioteket er tomt. -FTPPassiveMode=Passiv mode -ChooseAFTPEntryIntoMenu=Vælg et FTP / SFTP-sted i menuen ... -FailedToGetFile=Kunne ikke hente filer %s diff --git a/htdocs/langs/de_AT/externalsite.lang b/htdocs/langs/de_AT/externalsite.lang deleted file mode 100644 index a3871bced11..00000000000 --- a/htdocs/langs/de_AT/externalsite.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Verknüpfung zur externen Website einrichten -ExampleMyMenuEntry=Mein Menüeintrag diff --git a/htdocs/langs/de_CH/externalsite.lang b/htdocs/langs/de_CH/externalsite.lang deleted file mode 100644 index 9577afd0918..00000000000 --- a/htdocs/langs/de_CH/externalsite.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteModuleNotComplete=Module ExternalSite wurde nicht richtig konfiguriert. diff --git a/htdocs/langs/de_CH/ftp.lang b/htdocs/langs/de_CH/ftp.lang deleted file mode 100644 index 5062bcc5001..00000000000 --- a/htdocs/langs/de_CH/ftp.lang +++ /dev/null @@ -1,12 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -NewFTPClient=Neue FTP-Verbindungseinstellungen -FTPArea=FTP-Übersicht -FTPAreaDesc=Die Ansicht zeigt einen FTP Server -SetupOfFTPClientModuleNotComplete=Hoppla, das Setup dieses FTP-Client - Moduls ist unvollständig. -FTPFeatureNotSupportedByYourPHP=Ihre PHP unterstützt keine FTP-Funktionen -FailedToConnectToFTPServer=Konnte keine Verbindung zum FTP-Server aufbauen (Server %s, Port %s) -FailedToConnectToFTPServerWithCredentials=Anmeldung am FTP-Server mit dem eingegebenen Benutzername/Passwort-Paar fehlgeschlagen -FTPFailedToRemoveFile=Konnte Datei %s nicht entfernen. -FTPFailedToRemoveDir=Ich kann das Verzeichnis %s nicht löschen.. Prüfe, ob du die Löschberechtigung hast und stelle sicher, dass es leer ist. -ChooseAFTPEntryIntoMenu=Wähle eine FTP - Site im Menu aus. -FailedToGetFile=Folgende Dateien konnten nicht geladen werden: %s diff --git a/htdocs/langs/de_DE/externalsite.lang b/htdocs/langs/de_DE/externalsite.lang deleted file mode 100644 index 3c38524c7b8..00000000000 --- a/htdocs/langs/de_DE/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Konfigurations-Link auf externe Website -ExternalSiteURL=URL der externen Seite zur Einbettung in einen HTML-iframe -ExternalSiteModuleNotComplete=Modul ExternalSite wurde nicht richtig konfiguriert. -ExampleMyMenuEntry=Mein Menü-Eintrag diff --git a/htdocs/langs/de_DE/ftp.lang b/htdocs/langs/de_DE/ftp.lang deleted file mode 100644 index c60e50f9251..00000000000 --- a/htdocs/langs/de_DE/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Einrichtung des FTP- oder SFTP-Client-Moduls -NewFTPClient=Neue FTP / FTPS-Verbindungs-Konfiguration -FTPArea=FTP / FTPS-Bereich -FTPAreaDesc=Dieser Bildschirm zeigt eine Ansicht eines FTP- und SFTP-Servers. -SetupOfFTPClientModuleNotComplete=Die Konfiguration des FTP- oder SFTP-Client-Moduls scheint unvollständig zu sein -FTPFeatureNotSupportedByYourPHP=Ihr PHP unterstützt keine FTP- oder SFTP-Funktionen -FailedToConnectToFTPServer=Verbindung zum Server fehlgeschlagen (Server %s, Port %s) -FailedToConnectToFTPServerWithCredentials=Anmeldung am Server mit definiertem Login / Passwort fehlgeschlagen -FTPFailedToRemoveFile=Konnte Datei %s nicht entfernen. Überprüfen Sie die Berechtigungen. -FTPFailedToRemoveDir=Konnte Verzeichnis %s nicht entfernen. Überprüfen Sie die Berechtigungen und ob das Verzeichnis leer ist. -FTPPassiveMode=Passives FTP -ChooseAFTPEntryIntoMenu=Wählen Sie eine FTP / SFTP-Seite aus dem Menü ... -FailedToGetFile=Folgende Datei(en) konnte(n) nicht geladen werden: %s diff --git a/htdocs/langs/el_GR/externalsite.lang b/htdocs/langs/el_GR/externalsite.lang deleted file mode 100644 index c456ea335ee..00000000000 --- a/htdocs/langs/el_GR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Ρύθμιση συνδέσμου σε εξωτερικό ιστότοπο -ExternalSiteURL=Διεύθυνση URL εξωτερικού ιστότοπου περιεχομένου HTML iframe -ExternalSiteModuleNotComplete=Η ενότητα Εξωτερικός Ιστότοπος δεν έχει ρυθμιστεί σωστά. -ExampleMyMenuEntry=Το μενού μου diff --git a/htdocs/langs/el_GR/ftp.lang b/htdocs/langs/el_GR/ftp.lang deleted file mode 100644 index 265c008b7e3..00000000000 --- a/htdocs/langs/el_GR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Ρύθμιση μονάδας FTP ή SFTP Client -NewFTPClient=Ρύθμιση νέας σύνδεσης FTP/FTPS -FTPArea=Περιοχή FTP/FTPS -FTPAreaDesc=Αυτή η οθόνη εμφανίζει μια προβολή ενός διακομιστή FTP και SFTP. -SetupOfFTPClientModuleNotComplete=Η εγκατάσταση της μονάδας πελάτη FTP ή SFTP φαίνεται να είναι ελλιπής -FTPFeatureNotSupportedByYourPHP=Η PHP σας δεν υποστηρίζει λειτουργίες FTP ή SFTP -FailedToConnectToFTPServer=Απέτυχε η σύνδεση με τον διακομιστή (διακομιστής %s, θύρα %s) -FailedToConnectToFTPServerWithCredentials=Απέτυχε η σύνδεση στο διακομιστή με καθορισμένη σύνδεση/κωδικό πρόσβασης -FTPFailedToRemoveFile=Αποτυχία διαγραφής αρχείου%s. -FTPFailedToRemoveDir=Αποτυχία κατάργησης του καταλόγου %s : ελέγξτε τα δικαιώματα και ότι ο κατάλογος είναι κενός. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Επιλέξτε μια τοποθεσία FTP/SFTP από το μενού... -FailedToGetFile=Αποτυχία λήψης αρχείων %s diff --git a/htdocs/langs/en_GB/externalsite.lang b/htdocs/langs/en_GB/externalsite.lang deleted file mode 100644 index 1febedb9fed..00000000000 --- a/htdocs/langs/en_GB/externalsite.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteModuleNotComplete=Module "External Site" was not configured properly. diff --git a/htdocs/langs/en_GB/ftp.lang b/htdocs/langs/en_GB/ftp.lang deleted file mode 100644 index f1ea309c715..00000000000 --- a/htdocs/langs/en_GB/ftp.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPFailedToRemoveFile=Failed to delete file %s. diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 0f85c4b1c33..b059cc9952a 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -161,7 +161,7 @@ BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank accoun ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties, break ability to search on a part of value) ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. -ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, what is the period selected by default ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -182,7 +182,7 @@ DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit -UseAuxiliaryAccountOnCustomerDeposit=Use sub-accounts on customer deposit lines +UseAuxiliaryAccountOnCustomerDeposit=Store customer account as individual account in subsidiary ledger for lines of down payments (if disabled, individual account for down payment lines will remain empty) ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for the bought products (used if not defined in the product sheet) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) @@ -427,6 +427,7 @@ SorryThisModuleIsNotCompatibleWithTheExperimentalFeatureOfSituationInvoices=Sorr AccountancyErrorMismatchLetterCode=Mismatch in reconcile code AccountancyErrorMismatchBalanceAmount=The balance (%s) is not equal to 0 AccountancyErrorLetteringBookkeeping=Errors have occurred concerning the transactions: %s +ErrorAccountNumberAlreadyExists=The accounting number %s already exists ## Import ImportAccountingEntries=Accounting entries diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index bec98616b11..6b48c8f5787 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -2277,9 +2277,9 @@ INVOICE_ADD_ZATCA_QR_CODEMore=Some Arabic countries need this QR Code on their i INVOICE_ADD_SWISS_QR_CODE=Show the swiss QR-Bill code on invoices UrlSocialNetworksDesc=Url link of social network. Use {socialid} for the variable part that contains the social network ID. IfThisCategoryIsChildOfAnother=If this category is a child of another one - DarkThemeMode=Dark theme mode AlwaysDisabled=Always disabled AccordingToBrowser=According to browser AlwaysEnabled=Always Enabled -DoesNotWorkWithAllThemes=Will not work with all themes \ No newline at end of file +DoesNotWorkWithAllThemes=Will not work with all themes +NoName=No name diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index c4a964b6b62..71b16f24506 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -60,13 +60,14 @@ NatureOfThirdParty=Nature of Third party NatureOfContact=Nature of Contact Address=Address State=State/Province +StateId=State ID StateCode=State/Province code StateShort=State Region=Region Region-State=Region - State Country=Country CountryCode=Country code -CountryId=Country id +CountryId=Country ID Phone=Phone PhoneShort=Phone Skype=Skype diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 2857d7a3f54..c50ccc810cf 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -92,6 +92,7 @@ ErrorModuleRequireJavascript=Javascript must not be disabled to have this featur ErrorPasswordsMustMatch=Both typed passwords must match each other ErrorContactEMail=A technical error occured. Please, contact administrator to following email %s and provide the error code %s in your message, or add a screen copy of this page. ErrorWrongValueForField=Field %s: '%s' does not match regex rule %s +ErrorHtmlInjectionForField=Field %s: The value '%s' contains a malicious data not allowed ErrorFieldValueNotIn=Field %s: '%s' is not a value found in field %s of %s ErrorFieldRefNotIn=Field %s: '%s' is not a %s existing ref ErrorsOnXLines=%s errors found diff --git a/htdocs/langs/en_US/externalsite.lang b/htdocs/langs/en_US/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/en_US/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/en_US/ftp.lang b/htdocs/langs/en_US/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/en_US/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area -FTPAreaDesc=This screen shows a view of an FTP et SFTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions -FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 22060706a36..1c205f48f46 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -35,7 +35,8 @@ DateEndSubscription=End date of membership EndSubscription=End of membership SubscriptionId=Contribution ID WithoutSubscription=Without contribution -MemberId=Member id +MemberId=Member Id +MemberRef=Member Ref NewMember=New member MemberType=Member type MemberTypeId=Member type id diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index b17ab4fdeb2..792070e3d43 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - loan +IdModule= Module id ModuleBuilderDesc=This tool must be used only by experienced users or developers. It provides utilities to build or edit your own module. Documentation for alternative manual development is here. EnterNameOfModuleDesc=Enter the name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) EnterNameOfObjectDesc=Enter the name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...). The CRUD class file, but also API file, pages to list/add/edit/delete object and SQL files will be generated. diff --git a/htdocs/langs/en_US/oauth.lang b/htdocs/langs/en_US/oauth.lang index dda6f1bdf73..08f7956f455 100644 --- a/htdocs/langs/en_US/oauth.lang +++ b/htdocs/langs/en_US/oauth.lang @@ -9,12 +9,13 @@ HasAccessToken=A token was generated and saved into local database NewTokenStored=Token received and saved ToCheckDeleteTokenOnProvider=Click here to check/delete authorization saved by %s OAuth provider TokenDeleted=Token deleted -RequestAccess=Click here to request/renew access and receive a new token to save +RequestAccess=Click here to request/renew access and receive a new token DeleteAccess=Click here to delete token UseTheFollowingUrlAsRedirectURI=Use the following URL as the Redirect URI when creating your credentials with your OAuth provider: -ListOfSupportedOauthProviders=Enter the credentials provided by your OAuth2 provider. Only supported OAuth2 providers are listedd here. These services may be used by other modules that need OAuth2 authentication. -OAuthSetupForLogin=Page to generate an OAuth token +ListOfSupportedOauthProviders=Add your OAuth2 token providers. Then, go on your OAuth provider admin page to create/get an OAuth ID and Secret and save them here. Once done, switch on the other tab to generate your token. +OAuthSetupForLogin=Page to manage (generate/delete) OAuth tokens SeePreviousTab=See previous tab +OAuthProvider=OAuth provider OAuthIDSecret=OAuth ID and Secret TOKEN_REFRESH=Token Refresh Present TOKEN_EXPIRED=Token expired @@ -23,10 +24,13 @@ TOKEN_DELETE=Delete saved token OAUTH_GOOGLE_NAME=OAuth Google service OAUTH_GOOGLE_ID=OAuth Google Id OAUTH_GOOGLE_SECRET=OAuth Google Secret -OAUTH_GOOGLE_DESC=Go to this page then "Credentials" to create OAuth credentials OAUTH_GITHUB_NAME=OAuth GitHub service OAUTH_GITHUB_ID=OAuth GitHub Id OAUTH_GITHUB_SECRET=OAuth GitHub Secret -OAUTH_GITHUB_DESC=Go to this page then "Register a new application" to create OAuth credentials +OAUTH_URL_FOR_CREDENTIAL=Go to this page to create or get your OAuth ID and Secret OAUTH_STRIPE_TEST_NAME=OAuth Stripe Test -OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live \ No newline at end of file +OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live +OAUTH_ID=OAuth ID +OAUTH_SECRET=OAuth secret +OAuthProviderAdded=OAuth provider added +AOAuthEntryForThisProviderAndLabelAlreadyHasAKey=An OAuth entry for this provider and label already exists \ No newline at end of file diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index a4261f8e62c..aa7dd934ede 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - orders +OrderExists=An order was already open linked to this proposal, so no other order was created automatically OrdersArea=Customers orders area SuppliersOrdersArea=Purchase orders area OrderCard=Order card diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 9857ad821ed..e533dc71fa5 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -304,3 +304,24 @@ ConfirmBtnCommonContent = Are you sure you want to "%s" ? ConfirmBtnCommonTitle = Confirm your action CloseDialog = Close Autofill = Autofill + +# externalsite +ExternalSiteSetup=Setup link to external website +ExternalSiteURL=External Site URL of HTML iframe content +ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. +ExampleMyMenuEntry=My menu entry + +# FTP +FTPClientSetup=FTP or SFTP Client module setup +NewFTPClient=New FTP/FTPS connection setup +FTPArea=FTP/FTPS Area +FTPAreaDesc=This screen shows a view of an FTP et SFTP server. +SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete +FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions +FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) +FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password +FTPFailedToRemoveFile=Failed to remove file %s. +FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. +FTPPassiveMode=Passive mode +ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... +FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/es_AR/externalsite.lang b/htdocs/langs/es_AR/externalsite.lang deleted file mode 100644 index b7942f1500e..00000000000 --- a/htdocs/langs/es_AR/externalsite.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Establezca un enlace al sitio web externo -ExternalSiteModuleNotComplete=El módulo SitioExterno no fue configurado apropiadamente. diff --git a/htdocs/langs/es_AR/ftp.lang b/htdocs/langs/es_AR/ftp.lang deleted file mode 100644 index 2ccb645c797..00000000000 --- a/htdocs/langs/es_AR/ftp.lang +++ /dev/null @@ -1,13 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración de módulo de cliente FTP -NewFTPClient=Configuración de nueva conexión FTP -FTPArea=Area FTP -FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP. -SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP parece estar incompleta -FTPFeatureNotSupportedByYourPHP=Tu versión de PHP no soporta funciones FTP -FailedToConnectToFTPServer=Error al conectar al servidor FTP (servidor %s, puerto %s) -FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor FTP con el usuario/contraseña definidos -FTPFailedToRemoveFile=Error al remover archivo %s. -FTPFailedToRemoveDir=Error al remover carpeta %s: revise los permisos y que la carpeta esté vacía. -ChooseAFTPEntryIntoMenu=Elija un sitio FTP desde el menú... -FailedToGetFile=Error al obtener archivos %s diff --git a/htdocs/langs/es_CL/externalsite.lang b/htdocs/langs/es_CL/externalsite.lang deleted file mode 100644 index d9fc1b5c46b..00000000000 --- a/htdocs/langs/es_CL/externalsite.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Enlace de configuración al sitio web externo -ExternalSiteModuleNotComplete=El módulo ExternalSite no se configuró correctamente. diff --git a/htdocs/langs/es_CL/ftp.lang b/htdocs/langs/es_CL/ftp.lang deleted file mode 100644 index 57e90e9ac58..00000000000 --- a/htdocs/langs/es_CL/ftp.lang +++ /dev/null @@ -1,13 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración del módulo FTP Client -NewFTPClient=Nueva configuración de conexión FTP -FTPArea=Área de FTP -FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP. -SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP parece estar incompleta -FTPFeatureNotSupportedByYourPHP=Su PHP no es compatible con funciones de FTP -FailedToConnectToFTPServer=Error al conectarse al servidor FTP (servidor %s, puerto %s) -FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor FTP con inicio de sesión / contraseña definidos -FTPFailedToRemoveFile=Falló al eliminar el archivo %s. -FTPFailedToRemoveDir=Error al eliminar el directorio %s : verifique los permisos y que el directorio esté vacío. -ChooseAFTPEntryIntoMenu=Elija un sitio FTP del menú ... -FailedToGetFile=Error al obtener los archivos %s diff --git a/htdocs/langs/es_CO/externalsite.lang b/htdocs/langs/es_CO/externalsite.lang deleted file mode 100644 index d29b234afae..00000000000 --- a/htdocs/langs/es_CO/externalsite.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteURL=URL del sitio externo del iframe HTML -ExampleMyMenuEntry=Mi entrada en el menú diff --git a/htdocs/langs/es_CO/ftp.lang b/htdocs/langs/es_CO/ftp.lang deleted file mode 100644 index f021b8f4b8b..00000000000 --- a/htdocs/langs/es_CO/ftp.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPFeatureNotSupportedByYourPHP=Su PHP no es compatible con las funciones FTP o SFTP -FailedToConnectToFTPServerWithCredentials=No se pudo ingresar al servidor con el usuario/contraseña definidos -FTPFailedToRemoveFile=No se pudo eliminar el archivo %s . -FTPFailedToRemoveDir=No se pudo eliminar el directorio %s : verifique los permisos y que el directorio esté vacío. diff --git a/htdocs/langs/es_EC/externalsite.lang b/htdocs/langs/es_EC/externalsite.lang deleted file mode 100644 index 2ebc56b30e5..00000000000 --- a/htdocs/langs/es_EC/externalsite.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar enlace a un sitio web externo -ExternalSiteModuleNotComplete=El módulo SitioExterno no estaba configurado correctamente. -ExampleMyMenuEntry=Mi entrada en el menú diff --git a/htdocs/langs/es_EC/ftp.lang b/htdocs/langs/es_EC/ftp.lang deleted file mode 100644 index 6a3ad20d130..00000000000 --- a/htdocs/langs/es_EC/ftp.lang +++ /dev/null @@ -1,12 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -NewFTPClient=Nueva configuración de conexión FTP -FTPArea=Área de FTP -FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP. -SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP parece estar incompleta -FTPFeatureNotSupportedByYourPHP=Su PHP no admite funciones FTP -FailedToConnectToFTPServer=Error al conectarse al servidor FTP (servidor%s, puerto%s) -FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor FTP con nombre de usuario/contraseña definidos -FTPFailedToRemoveFile=Error al eliminar el archivo %s. -FTPFailedToRemoveDir=Error al eliminar el directorio %s: verifique los permisos y que el directorio esté vacío. -ChooseAFTPEntryIntoMenu=Elija un sitio FTP del menú ... -FailedToGetFile=Error al obtener los archivos %s diff --git a/htdocs/langs/es_ES/externalsite.lang b/htdocs/langs/es_ES/externalsite.lang deleted file mode 100644 index d66d608abbf..00000000000 --- a/htdocs/langs/es_ES/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configuración del enlace al sitio web externo -ExternalSiteURL=URL del sitio externo de contenido de iframe HTML -ExternalSiteModuleNotComplete=El módulo Sitio web externo no ha sido configurado correctamente. -ExampleMyMenuEntry=Mi entrada de menú diff --git a/htdocs/langs/es_ES/ftp.lang b/htdocs/langs/es_ES/ftp.lang deleted file mode 100644 index 4dcb9e6c0ce..00000000000 --- a/htdocs/langs/es_ES/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración del módulo de cliente FTP o SFTP -NewFTPClient=Nueva configuración de conexión FTP / FTPS -FTPArea=Área FTP / FTPS -FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP y SFTP. -SetupOfFTPClientModuleNotComplete=La configuración del módulo de cliente FTP o SFTP parece estar incompleta -FTPFeatureNotSupportedByYourPHP=Su PHP no admite funciones FTP o SFTP -FailedToConnectToFTPServer=No se pudo conectar al servidor (servidor %s, puerto %s) -FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor con inicio de sesión/contraseña definidos -FTPFailedToRemoveFile=No se pudo eliminar el archivo %s. -FTPFailedToRemoveDir=No se pudo eliminar el directorio %s (Compruebe los permisos y que el directorio está vacío). -FTPPassiveMode=Modo pasivo -ChooseAFTPEntryIntoMenu=Elija un sitio FTP / SFTP del menú ... -FailedToGetFile=No se pudieron obtener los archivos %s diff --git a/htdocs/langs/es_MX/externalsite.lang b/htdocs/langs/es_MX/externalsite.lang deleted file mode 100644 index 0576f5b0be1..00000000000 --- a/htdocs/langs/es_MX/externalsite.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar vínculo a un sitio web externo -ExternalSiteModuleNotComplete=El módulo ExternalSite no estaba configurado correctamente. -ExampleMyMenuEntry=Mi entrada en el menú diff --git a/htdocs/langs/es_MX/ftp.lang b/htdocs/langs/es_MX/ftp.lang deleted file mode 100644 index 68ba0a1ab91..00000000000 --- a/htdocs/langs/es_MX/ftp.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración del módulo Cliente FTP -NewFTPClient=Configuración de nueva conexión FTP -FTPAreaDesc=Esta pantalla muestra una vista de un servidor FTP -SetupOfFTPClientModuleNotComplete=La configuración del módulo Cliente FTP parece estar incompleta -FailedToConnectToFTPServer=Error al conectarse al servidor FTP (servidor %s, puerto %s) -FailedToConnectToFTPServerWithCredentials=Error al iniciar sesión en el servidor FTP con el login/password definidos -FTPFailedToRemoveFile=Error al eliminar el archivo %s . -FTPFailedToRemoveDir=Error al eliminar el directorio %s : verifique los permisos y que el directorio esté vacío. -ChooseAFTPEntryIntoMenu=Elija un sitio FTP del menú... -FailedToGetFile=Error al obtener archivos %s diff --git a/htdocs/langs/es_PE/externalsite.lang b/htdocs/langs/es_PE/externalsite.lang deleted file mode 100644 index 5250a01cd56..00000000000 --- a/htdocs/langs/es_PE/externalsite.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar enlace al sitio web externo -ExternalSiteModuleNotComplete=El modulo Sitio Web Externo no esta configurado apropiadamente -ExampleMyMenuEntry=Mi entrada al menú diff --git a/htdocs/langs/et_EE/externalsite.lang b/htdocs/langs/et_EE/externalsite.lang deleted file mode 100644 index 7295cbd8936..00000000000 --- a/htdocs/langs/et_EE/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Seadista link välisele lehele -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=ExternalSite moodul ei ole õigesti seadistatud. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/et_EE/ftp.lang b/htdocs/langs/et_EE/ftp.lang deleted file mode 100644 index d945955a986..00000000000 --- a/htdocs/langs/et_EE/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP kliendi mooduli seadistamine -NewFTPClient=Uue FTP ühenduse seadistamine -FTPArea=FTP ala -FTPAreaDesc=See ekraan näitab FTP serveri vaate sisu -SetupOfFTPClientModuleNotComplete=FTP kliendi mooduli seadistus ei paista olevat täielik -FTPFeatureNotSupportedByYourPHP=Sinu PHP ei toeta FTP funktsioone -FailedToConnectToFTPServer=FTP serveriga ühenduse loomine ebaõnnestus (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Määratletud kasutajanime/parooliga FTP serverisse sisse logimine ebaõnnestus -FTPFailedToRemoveFile=Faili %s kustutamine ebaõnnestus. -FTPFailedToRemoveDir=Kausta %s kustutamine ebaõnnestus (kontrolli õigusi ja seda, et kataloog on tühi). -FTPPassiveMode=Passiivne režiim -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/eu_ES/externalsite.lang b/htdocs/langs/eu_ES/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/eu_ES/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/eu_ES/ftp.lang b/htdocs/langs/eu_ES/ftp.lang deleted file mode 100644 index 8d58b5e69db..00000000000 --- a/htdocs/langs/eu_ES/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP bezero modulua konfiguratu -NewFTPClient=FTP konexio berria konfiguratu -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/fa_IR/externalsite.lang b/htdocs/langs/fa_IR/externalsite.lang deleted file mode 100644 index 8fde4592056..00000000000 --- a/htdocs/langs/fa_IR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=تنظیم پیوند به وبگاه بیرونی -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=واحد ExternalSite  به درستی پیکربندی نشده است -ExampleMyMenuEntry=عنوان فهرست من diff --git a/htdocs/langs/fa_IR/ftp.lang b/htdocs/langs/fa_IR/ftp.lang deleted file mode 100644 index 83a59f293b6..00000000000 --- a/htdocs/langs/fa_IR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=برپاسازی واحد متقاضی FTP -NewFTPClient=برپاسازی اتصال جدید FTP -FTPArea=بخش FTP -FTPAreaDesc=این صفحه نمائی از سرور FTP را نمایش می‌دهد. -SetupOfFTPClientModuleNotComplete=ظاهرا برپاسازی واحد متقاضی FTP ناقص است -FTPFeatureNotSupportedByYourPHP=PHP شما از توابع FTP پشتیبانی نمی‌کن -FailedToConnectToFTPServer=امکان اتصال به سرور FTP نبود (سرور %s، درگاه %s) -FailedToConnectToFTPServerWithCredentials=امکان ورود به سرور FTP با نام‌ورود/گذرواژه تعریف شده نبود -FTPFailedToRemoveFile=حذف فایل %s مقدور نبود -FTPFailedToRemoveDir=حذف پوشۀ %s مقدور نبود: مجوزها را بررسی کرده و مطمئن شوید پوشه خالی است. -FTPPassiveMode=حالت انفعالی -ChooseAFTPEntryIntoMenu=یک سایت FTP از فهرست انتخاب کنید... -FailedToGetFile=عدم امکان دریافت فایل‌های %s diff --git a/htdocs/langs/fi_FI/externalsite.lang b/htdocs/langs/fi_FI/externalsite.lang deleted file mode 100644 index 1926b6e7f01..00000000000 --- a/htdocs/langs/fi_FI/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup linkki ulkoiseen sivustoon -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Ulkoisen sivuston Moduuli ei ole oikein konfiguroitu. -ExampleMyMenuEntry=Omassa valikossa diff --git a/htdocs/langs/fi_FI/ftp.lang b/htdocs/langs/fi_FI/ftp.lang deleted file mode 100644 index ea3b84ad187..00000000000 --- a/htdocs/langs/fi_FI/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client-moduuli asennus -NewFTPClient=Uusi FTP-yhteys asetukset -FTPArea=FTP Area -FTPAreaDesc=Tämä ruutu näyttää sisällön FTP-palvelimen mieltä -SetupOfFTPClientModuleNotComplete=Asennus ja FTP-moduuli näyttää ole täydellinen -FTPFeatureNotSupportedByYourPHP=PHP ei tue FTP toiminnot -FailedToConnectToFTPServer=Yhteyden muodostaminen epäonnistui FTP-palvelimen (palvelin %s, portti %s) -FailedToConnectToFTPServerWithCredentials=Epäonnistui kirjautua FTP-palvelimeen on määritelty / salasana -FTPFailedToRemoveFile=Ole poistanut tiedoston %s. -FTPFailedToRemoveDir=Ole poistanut hakemistoon %s (Tarkista oikeudet ja että hakemisto on tyhjä). -FTPPassiveMode=Passiivisena -ChooseAFTPEntryIntoMenu=Valitse FTP osoite valikosta -FailedToGetFile=Tiedostojen %s lataus epäonnistui diff --git a/htdocs/langs/fr_CA/externalsite.lang b/htdocs/langs/fr_CA/externalsite.lang deleted file mode 100644 index 01d000d22e0..00000000000 --- a/htdocs/langs/fr_CA/externalsite.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Lien de configuration vers un site Web externe -ExternalSiteModuleNotComplete=Module ExternalSite n'a pas été configuré correctement. -ExampleMyMenuEntry=Entrée de mon menu diff --git a/htdocs/langs/fr_CA/ftp.lang b/htdocs/langs/fr_CA/ftp.lang deleted file mode 100644 index 7b50188c38b..00000000000 --- a/htdocs/langs/fr_CA/ftp.lang +++ /dev/null @@ -1,11 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuration du module client FTP -FTPArea=Zone FTP -FTPAreaDesc=Cet écran vous montre le contenu d'une vue du serveur FTP -SetupOfFTPClientModuleNotComplete=La configuration du module client FTP semble ne pas être complète -FailedToConnectToFTPServer=Impossible de se connecter au serveur FTP (serveur %s, port %s) -FailedToConnectToFTPServerWithCredentials=Échec de la connexion au serveur FTP avec login / mot de passe défini -FTPFailedToRemoveFile=Impossible d'enlever le fichier %s. -FTPFailedToRemoveDir=Impossible de supprimer le répertoire %s (Vérifiez les autorisations et ce répertoire est vide). -ChooseAFTPEntryIntoMenu=Choisissez une entrée FTP dans le menu ... -FailedToGetFile=Impossible d'obtenir des fichiers %s diff --git a/htdocs/langs/fr_FR/externalsite.lang b/htdocs/langs/fr_FR/externalsite.lang deleted file mode 100644 index 04f3ebd8fc8..00000000000 --- a/htdocs/langs/fr_FR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configuration du lien vers le site externe -ExternalSiteURL=URL du site externe du contenu iFrame HTML -ExternalSiteModuleNotComplete=La configuration du module "Site externe" est incomplète. -ExampleMyMenuEntry=Mon entrée de menu diff --git a/htdocs/langs/fr_FR/ftp.lang b/htdocs/langs/fr_FR/ftp.lang deleted file mode 100644 index b28f7f57e03..00000000000 --- a/htdocs/langs/fr_FR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuration du module Client FTP -NewFTPClient=Nouvelle configuration de connexion FTP -FTPArea=Espace FTP -FTPAreaDesc=Cet écran vous présente une vue de serveur FTP -SetupOfFTPClientModuleNotComplete=La configuration du module Client FTP semble incomplète -FTPFeatureNotSupportedByYourPHP=Votre PHP ne prend pas en charge les fonctions FTP -FailedToConnectToFTPServer=Échec de connexion au serveur FTP (serveur: %s, port %s) -FailedToConnectToFTPServerWithCredentials=Échec de connexion avec l'identifiant/mot de passe FTP configuré -FTPFailedToRemoveFile=Échec suppression fichier %s. -FTPFailedToRemoveDir=Échec suppression répertoire %s (Vérifiez les permissions et que le répertoire soit vide). -FTPPassiveMode=Mode passif -ChooseAFTPEntryIntoMenu=Choisissez une entrée FTP dans le menu... -FailedToGetFile=Echec à la récupération du fichier %s diff --git a/htdocs/langs/gl_ES/externalsite.lang b/htdocs/langs/gl_ES/externalsite.lang deleted file mode 100644 index 660ce32365c..00000000000 --- a/htdocs/langs/gl_ES/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configuración da ligazón ao sitio web externo -ExternalSiteURL=URL do sitio externo do contido iframe HTML -ExternalSiteModuleNotComplete=O módulo do sitio externo non foi configurado correctamente. -ExampleMyMenuEntry=O meu menú de entrada diff --git a/htdocs/langs/gl_ES/ftp.lang b/htdocs/langs/gl_ES/ftp.lang deleted file mode 100644 index ec3838e9007..00000000000 --- a/htdocs/langs/gl_ES/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuración do módulo cliente FTP ou SFTP -NewFTPClient=Nova configuración de conexión FTP/SFTP -FTPArea=Área FTP/SFTP -FTPAreaDesc=Esta pantalla amosa unha vista dun servidor FTP/SFTP -SetupOfFTPClientModuleNotComplete=A configuración do módulo cliente FTP ou SFTP parece estar imcompleta -FTPFeatureNotSupportedByYourPHP=O seu PHP non soporta funcións FTP/SFTP' -FailedToConnectToFTPServer=Fallo ao conectar ao servidor (servidor %s, porto %s) -FailedToConnectToFTPServerWithCredentials=Fallo ao iniciar sesión no servidor co inicio de sesión/contrasinal -FTPFailedToRemoveFile=Non foi posible eliminar o ficheiro %s. -FTPFailedToRemoveDir=Non foi posible eliminar o directorio %s (Comprobe os permisos e que o directorio está baleiro). -FTPPassiveMode=Modo pasivo -ChooseAFTPEntryIntoMenu=Escolla un sitio FTP/SFTM no menú ... -FailedToGetFile=Non foi posible acadar os ficheiros %s diff --git a/htdocs/langs/he_IL/externalsite.lang b/htdocs/langs/he_IL/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/he_IL/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/he_IL/ftp.lang b/htdocs/langs/he_IL/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/he_IL/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/hi_IN/externalsite.lang b/htdocs/langs/hi_IN/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/hi_IN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/hi_IN/ftp.lang b/htdocs/langs/hi_IN/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/hi_IN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/hr_HR/externalsite.lang b/htdocs/langs/hr_HR/externalsite.lang deleted file mode 100644 index 1c3fb21742a..00000000000 --- a/htdocs/langs/hr_HR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Postavljanje linkova na vanjske web stranice -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul ExternalSite nije ispravno podešen. -ExampleMyMenuEntry=Moj izbornik unos diff --git a/htdocs/langs/hr_HR/ftp.lang b/htdocs/langs/hr_HR/ftp.lang deleted file mode 100644 index f44222fdeba..00000000000 --- a/htdocs/langs/hr_HR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Postavljanje modula FTP ili SFTP klijenta -NewFTPClient=Nova postavka FTP/FTPS veze -FTPArea=FTP/FTPS sučelje -FTPAreaDesc=Ovaj zaslon prikazuje prikaz FTP i SFTP poslužitelja. -SetupOfFTPClientModuleNotComplete=Čini se da postavljanje FTP ili SFTP klijentskog modula nije dovršeno -FTPFeatureNotSupportedByYourPHP=Vaš PHP ne podržava FTP ili SFTP funkcije -FailedToConnectToFTPServer=Povezivanje s poslužiteljem nije uspjelo (poslužitelj %s, port %s) -FailedToConnectToFTPServerWithCredentials=Prijava na poslužitelj s definiranom prijavom/lozinkom nije uspjela -FTPFailedToRemoveFile=Neuspješno brisanje datoteke %s. -FTPFailedToRemoveDir=Uklanjanje direktorija %s nije uspjelo: provjerite dopuštenja i je li direktorij prazan. -FTPPassiveMode=Pasivni mod -ChooseAFTPEntryIntoMenu=Odaberite FTP/SFTP stranicu s izbornika... -FailedToGetFile=Neuspješno preuzimanje datoteka %s diff --git a/htdocs/langs/hu_HU/externalsite.lang b/htdocs/langs/hu_HU/externalsite.lang deleted file mode 100644 index 73ab6fbae3a..00000000000 --- a/htdocs/langs/hu_HU/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Külső weboldalra mutató link beállítása -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Az ExternalSite modul nincs megfelelően beállítva. -ExampleMyMenuEntry=A menüpontom diff --git a/htdocs/langs/hu_HU/ftp.lang b/htdocs/langs/hu_HU/ftp.lang deleted file mode 100644 index 9d666b1ade1..00000000000 --- a/htdocs/langs/hu_HU/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Kliens modul beállítása -NewFTPClient=Új FTP kapcsolat beállítása -FTPArea=FTP terület -FTPAreaDesc=A képernyő egy FTP-kiszolgáló egy nézetét mutatja. -SetupOfFTPClientModuleNotComplete=Az FTP kliens modul telepítése hiányosnak tűnik -FTPFeatureNotSupportedByYourPHP=A PHP beállítása nem támogatja az FTP funkciókat -FailedToConnectToFTPServer=Nem sikerült csatlakozni az FTP szerverhez (szerver %s, port %s) -FailedToConnectToFTPServerWithCredentials=Nem sikerült bejelentkezni FTP szerverre a megadott felhasználó névvel/jelszóval. -FTPFailedToRemoveFile=Nem sikerült eltávolítani: %s. -FTPFailedToRemoveDir=Az %s könyvtár eltávolítása nem sikerült: ellenőrizze az engedélyeket és hogy a könyvtár üres. -FTPPassiveMode=Passzív mód -ChooseAFTPEntryIntoMenu=Válasszon FTP-helyet a menüből ... -FailedToGetFile=Nem sikerült a %s fájlokat letölteni diff --git a/htdocs/langs/id_ID/externalsite.lang b/htdocs/langs/id_ID/externalsite.lang deleted file mode 100644 index d634bdb6786..00000000000 --- a/htdocs/langs/id_ID/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Atur tautan ke situs web eksternal -ExternalSiteURL=URL Situs Eksternal dari konten iframe HTML -ExternalSiteModuleNotComplete=Modul ExternalSite tidak dikonfigurasi dengan benar. -ExampleMyMenuEntry=Entri menu saya diff --git a/htdocs/langs/id_ID/ftp.lang b/htdocs/langs/id_ID/ftp.lang deleted file mode 100644 index 41f331bbf14..00000000000 --- a/htdocs/langs/id_ID/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Pengaturan modul Klien FTP atau SFTP -NewFTPClient=Pengaturan koneksi FTP / FTPS baru -FTPArea=Area FTP / FTPS -FTPAreaDesc=Layar ini menunjukkan tampilan server FTP dan SFTP. -SetupOfFTPClientModuleNotComplete=Penyiapan modul klien FTP atau SFTP tampaknya tidak lengkap -FTPFeatureNotSupportedByYourPHP=PHP Anda tidak mendukung fungsi FTP atau SFTP -FailedToConnectToFTPServer=Gagal terhubung ke server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Gagal masuk ke server dengan login / kata sandi yang ditentukan -FTPFailedToRemoveFile=Gagal menghapus file%s . -FTPFailedToRemoveDir=Gagal menghapus direktori%s : periksa izin dan direktori tersebut kosong. -FTPPassiveMode=Mode pasif -ChooseAFTPEntryIntoMenu=Pilih situs FTP/SFTP dari menu... -FailedToGetFile=Gagal mendapatkan file %s diff --git a/htdocs/langs/is_IS/externalsite.lang b/htdocs/langs/is_IS/externalsite.lang deleted file mode 100644 index 871f44e7367..00000000000 --- a/htdocs/langs/is_IS/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Skipulag tengjast ytri vef -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/is_IS/ftp.lang b/htdocs/langs/is_IS/ftp.lang deleted file mode 100644 index b5a002890ed..00000000000 --- a/htdocs/langs/is_IS/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Viðskiptavinur mát skipulag -NewFTPClient=Nýr FTP tengingu skipulag -FTPArea=FTP svæði -FTPAreaDesc=Þessi skjár sýnir þér innihald FTP þjóninum að skoða -SetupOfFTPClientModuleNotComplete=Uppsetning á FTP viðskiptavinur eining virðist ekki vera heill -FTPFeatureNotSupportedByYourPHP=Your PHP styður ekki FTP aðgerðir -FailedToConnectToFTPServer=Tókst ekki að tengjast FTP miðlara (miðlara %s, höfn %s) -FailedToConnectToFTPServerWithCredentials=Ekki tókst að skrá þig inn á FTP þjóninum með skilgreint tenging / lykilorð -FTPFailedToRemoveFile=Ekki tókst að fjarlægja skrá %s. -FTPFailedToRemoveDir=Ekki tókst að fjarlægja skrá %s (Athugaðu heimildir og skrá er tóm). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/it_IT/externalsite.lang b/htdocs/langs/it_IT/externalsite.lang deleted file mode 100644 index 8be64cda26a..00000000000 --- a/htdocs/langs/it_IT/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Imposta collegamento a sito esterno -ExternalSiteURL=URL del sito esterno del contenuto iframe HTML -ExternalSiteModuleNotComplete=Il modulo ExternalSite non è configurato correttamente. -ExampleMyMenuEntry=La mia voce di menu diff --git a/htdocs/langs/it_IT/ftp.lang b/htdocs/langs/it_IT/ftp.lang deleted file mode 100644 index e641576f638..00000000000 --- a/htdocs/langs/it_IT/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configurazione del modulo client FTP o SFTP -NewFTPClient=Nuova configurazione della connessione FTP/FTPS -FTPArea=Area FTP/FTPS -FTPAreaDesc=Questa schermata mostra una vista di un server FTP e SFTP. -SetupOfFTPClientModuleNotComplete=La configurazione del modulo client FTP o SFTP sembra essere incompleta -FTPFeatureNotSupportedByYourPHP=Il tuo PHP non supporta le funzioni FTP o SFTP -FailedToConnectToFTPServer=Impossibile connettersi al server (server %s, porta %s) -FailedToConnectToFTPServerWithCredentials=Impossibile accedere al server con login/password definiti -FTPFailedToRemoveFile=Impossibile rimuovere il file %s -FTPFailedToRemoveDir=Impossibile rimuovere la directory %s (Controlla i permessi e che la directory sia vuota) -FTPPassiveMode=Modalità passiva -ChooseAFTPEntryIntoMenu=Scegli un sito FTP/SFTP dal menu... -FailedToGetFile=Errore nell'accesso ai file %s diff --git a/htdocs/langs/ja_JP/externalsite.lang b/htdocs/langs/ja_JP/externalsite.lang deleted file mode 100644 index 7be2ce5f257..00000000000 --- a/htdocs/langs/ja_JP/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=外部ウェブサイトへのリンクを設定 -ExternalSiteURL=HTMLiframeコンテンツの外部サイトURL -ExternalSiteModuleNotComplete=モジュールExternalSite(外部サイト)が正しく構成されていない。 -ExampleMyMenuEntry=私のメニューエントリ diff --git a/htdocs/langs/ja_JP/ftp.lang b/htdocs/langs/ja_JP/ftp.lang deleted file mode 100644 index a455763d587..00000000000 --- a/htdocs/langs/ja_JP/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTPまたはSFTPクライアントモジュールの設定 -NewFTPClient=新規FTP / FTPS接続の設定 -FTPArea=FTP / FTPSエリア -FTPAreaDesc=この画面には、FTPおよびSFTPサーバのビューが表示される。 -SetupOfFTPClientModuleNotComplete=FTPまたはSFTPクライアントモジュールの設定が不完全なようだ -FTPFeatureNotSupportedByYourPHP=お使いのPHPはFTPまたはSFTP機能をサポートしていない -FailedToConnectToFTPServer=サーバ(サーバ%s、ポート%s)への接続に失敗した -FailedToConnectToFTPServerWithCredentials=定義されたログイン/パスワードでサーバにログインできなかった -FTPFailedToRemoveFile=ファイルの%sを削除できなかった。 -FTPFailedToRemoveDir=ディレクトリ%s の削除に失敗した:権限を確認し、ディレクトリが空であることを確認すること。 -FTPPassiveMode=パッシブモード -ChooseAFTPEntryIntoMenu=メニューからFTP / SFTPサイトを選択する... -FailedToGetFile=ファイル%sの取得に失敗した diff --git a/htdocs/langs/ka_GE/externalsite.lang b/htdocs/langs/ka_GE/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ka_GE/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ka_GE/ftp.lang b/htdocs/langs/ka_GE/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/ka_GE/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/kk_KZ/externalsite.lang b/htdocs/langs/kk_KZ/externalsite.lang deleted file mode 100644 index a087c46078f..00000000000 --- a/htdocs/langs/kk_KZ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Сыртқы веб -сайтқа сілтеме орнату -ExternalSiteURL=HTML iframe мазмұнының сыртқы сайт URL мекенжайы -ExternalSiteModuleNotComplete=ExternalSite модулі дұрыс конфигурацияланбаған. -ExampleMyMenuEntry=Менің мәзірге кіру diff --git a/htdocs/langs/kk_KZ/ftp.lang b/htdocs/langs/kk_KZ/ftp.lang deleted file mode 100644 index 9d586217aae..00000000000 --- a/htdocs/langs/kk_KZ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP немесе SFTP клиент модулін орнату -NewFTPClient=Жаңа FTP/FTPS қосылымын орнату -FTPArea=FTP/FTPS аймағы -FTPAreaDesc=Бұл экран FTP және SFTP серверінің көрінісін көрсетеді. -SetupOfFTPClientModuleNotComplete=FTP немесе SFTP клиенттік модулін орнату аяқталмаған сияқты -FTPFeatureNotSupportedByYourPHP=Сіздің PHP FTP немесе SFTP функцияларын қолдамайды -FailedToConnectToFTPServer=Серверге қосылу мүмкін болмады (%s сервері, %s порты) -FailedToConnectToFTPServerWithCredentials=Анықталған логин/парольмен серверге кіру сәтсіз аяқталды -FTPFailedToRemoveFile= %s файлы жойылмады. -FTPFailedToRemoveDir= %s каталогын жою мүмкін болмады: рұқсаттарды тексеріңіз және каталог бос екенін тексеріңіз. -FTPPassiveMode=Пассивті режим -ChooseAFTPEntryIntoMenu=Мәзірден FTP/SFTP сайтын таңдаңыз ... -FailedToGetFile=%s файлдары алынбады diff --git a/htdocs/langs/km_KH/externalsite.lang b/htdocs/langs/km_KH/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/km_KH/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/km_KH/ftp.lang b/htdocs/langs/km_KH/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/km_KH/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/kn_IN/externalsite.lang b/htdocs/langs/kn_IN/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/kn_IN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/kn_IN/ftp.lang b/htdocs/langs/kn_IN/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/kn_IN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ko_KR/externalsite.lang b/htdocs/langs/ko_KR/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ko_KR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ko_KR/ftp.lang b/htdocs/langs/ko_KR/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/ko_KR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/lo_LA/externalsite.lang b/htdocs/langs/lo_LA/externalsite.lang deleted file mode 100644 index e28d475a5e9..00000000000 --- a/htdocs/langs/lo_LA/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=ຕັ້ງການເຊື່ອມຕໍ່ກັບເວັບໄຊທ external ພາຍນອກ -ExternalSiteURL=URL ເວັບໄຊພາຍນອກຂອງເນື້ອຫາ iframe ຂອງ HTML -ExternalSiteModuleNotComplete=ໂມດູນ ExternalSite ບໍ່ໄດ້ຖືກຕັ້ງຄ່າຢ່າງຖືກຕ້ອງ. -ExampleMyMenuEntry=ລາຍການເມນູຂອງຂ້ອຍ diff --git a/htdocs/langs/lo_LA/ftp.lang b/htdocs/langs/lo_LA/ftp.lang deleted file mode 100644 index d675b92a370..00000000000 --- a/htdocs/langs/lo_LA/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=ການຕັ້ງຄ່າໂມດູນລູກຄ້າ FTP ຫຼື SFTP -NewFTPClient=ການຕັ້ງຄ່າການເຊື່ອມຕໍ່ FTP/FTPS ໃ່ -FTPArea=ພື້ນທີ່ FTP/FTPS -FTPAreaDesc=ໜ້າ ຈໍນີ້ສະແດງໃຫ້ເຫັນມຸມມອງຂອງເຊີບເວີ FTP ແລະ SFTP. -SetupOfFTPClientModuleNotComplete=ການຕັ້ງຄ່າໂມດູນລູກຄ້າ FTP ຫຼື SFTP ເບິ່ງຄືວ່າບໍ່ສົມບູນ -FTPFeatureNotSupportedByYourPHP=PHP ຂອງເຈົ້າບໍ່ຮອງຮັບຟັງຊັນ FTP ຫຼື SFTP -FailedToConnectToFTPServer=ເຊື່ອມຕໍ່ກັບເຊີບເວີບໍ່ໄດ້ (ເຊີບເວີ %s, ຜອດ %s) -FailedToConnectToFTPServerWithCredentials=ເຂົ້າສູ່ລະບົບເຊີບເວີບໍ່ສໍາເລັດດ້ວຍການເຂົ້າສູ່ລະບົບ/ລະຫັດຜ່ານທີ່ກໍານົດໄວ້ -FTPFailedToRemoveFile=ລຶບໄຟລ a %s ບໍ່ ສຳ ເລັດ. -FTPFailedToRemoveDir=ການລຶບບັນຊີລາຍຊື່ %s ລົ້ມເຫລວ: ກວດເບິ່ງການອະນຸຍາດແລະວ່າບັນຊີລາຍການຫວ່າງເປົ່າ. -FTPPassiveMode=ໂiveດຕົວຕັ້ງຕົວຕີ -ChooseAFTPEntryIntoMenu=ເລືອກເວັບໄຊ FTP/SFTP ຈາກເມນູ ... -FailedToGetFile=ຮັບເອົາໄຟລ a %s ບໍ່ ສຳ ເລັດ diff --git a/htdocs/langs/lt_LT/externalsite.lang b/htdocs/langs/lt_LT/externalsite.lang deleted file mode 100644 index 863500a456c..00000000000 --- a/htdocs/langs/lt_LT/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Nustatymų nuoroda į išorinę interneto svetainę -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modulis ExternalSite nebuvo tinkamai sukonfigūruotas. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/lt_LT/ftp.lang b/htdocs/langs/lt_LT/ftp.lang deleted file mode 100644 index 9470fed927c..00000000000 --- a/htdocs/langs/lt_LT/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP kliento modulio nustatymai -NewFTPClient=Naujo FTP prisijungimo nustatymai -FTPArea=FTP sritis -FTPAreaDesc=Šis ekranas rodo FTP serverio vaizdo turinį -SetupOfFTPClientModuleNotComplete=FTP kliento modulio nustatymai yra nepilni -FTPFeatureNotSupportedByYourPHP=Jūsų PHP nepalaiko FTP funkcijos -FailedToConnectToFTPServer=Nepavyko prisijungti prie FTP serverio (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Nepavyko prisijungti prie FTP serverio su nustatytu prisijungimo vardu/slaptažodžiu -FTPFailedToRemoveFile=Nepavyko pašalinti failo %s. -FTPFailedToRemoveDir=Nepavyko pašalinti direktorijos %s (patikrinkite leidimus ir, kad katalogas yra tuščias). -FTPPassiveMode=Pasyvus būdas -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/lv_LV/externalsite.lang b/htdocs/langs/lv_LV/externalsite.lang deleted file mode 100644 index 23725bd616a..00000000000 --- a/htdocs/langs/lv_LV/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Ārējo vietņu iestatīšana -ExternalSiteURL=HTML iframe satura ārējās vietnes URL -ExternalSiteModuleNotComplete=Modulis ExternalSite nav pareizi konfigurēts. -ExampleMyMenuEntry=Manas izvēlnes ieraksti diff --git a/htdocs/langs/lv_LV/ftp.lang b/htdocs/langs/lv_LV/ftp.lang deleted file mode 100644 index 6fcdaf66e4b..00000000000 --- a/htdocs/langs/lv_LV/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP vai SFTP klienta moduļa iestatīšana -NewFTPClient=Jauna FTP / FTPS savienojuma iestatīšana -FTPArea=FTP/FTPS sadaļa -FTPAreaDesc=Šajā ekrānā tiek parādīts FTP un SFTP servera skats. -SetupOfFTPClientModuleNotComplete=Šķiet, ka FTP vai SFTP klienta moduļa iestatīšana nav pilnīga -FTPFeatureNotSupportedByYourPHP=Jūsu PHP neatbalsta FTP vai SFTP funkcijas -FailedToConnectToFTPServer=Neizdevās izveidot savienojumu ar serveri (serveris %s, ports %s) -FailedToConnectToFTPServerWithCredentials=Neizdevās pieteikties serverī ar noteiktu pieteikšanās vārdu / paroli -FTPFailedToRemoveFile=Neizdevās noņemt failu %s. -FTPFailedToRemoveDir=Neizdevās noņemt direktoriju %s: pārbaudīt atļaujas un ka katalogs ir tukšs. -FTPPassiveMode=Pasīvais režīms -ChooseAFTPEntryIntoMenu=Izvēlnē izvēlieties FTP / SFTP vietni ... -FailedToGetFile=Neizdevās iegūt failus %s diff --git a/htdocs/langs/mk_MK/externalsite.lang b/htdocs/langs/mk_MK/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/mk_MK/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/mk_MK/ftp.lang b/htdocs/langs/mk_MK/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/mk_MK/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/mn_MN/externalsite.lang b/htdocs/langs/mn_MN/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/mn_MN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/mn_MN/ftp.lang b/htdocs/langs/mn_MN/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/mn_MN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/my_MM/externalsite.lang b/htdocs/langs/my_MM/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/my_MM/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/my_MM/ftp.lang b/htdocs/langs/my_MM/ftp.lang deleted file mode 100644 index 254a2a698ce..00000000000 --- a/htdocs/langs/my_MM/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP or SFTP Client module setup -NewFTPClient=New FTP/FTPS connection setup -FTPArea=FTP/FTPS Area -FTPAreaDesc=This screen shows a view of an FTP et SFTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions -FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/nb_NO/externalsite.lang b/htdocs/langs/nb_NO/externalsite.lang deleted file mode 100644 index 33870ea4a45..00000000000 --- a/htdocs/langs/nb_NO/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Oppsett av lenke til ekstern nettside -ExternalSiteURL=URL for eksternt nettsted for HTML iframe-innhold -ExternalSiteModuleNotComplete=Modulen Ekstern Side ble ikke riktig konfigurert. -ExampleMyMenuEntry=Meny overskrift diff --git a/htdocs/langs/nb_NO/ftp.lang b/htdocs/langs/nb_NO/ftp.lang deleted file mode 100644 index ea8d66feb00..00000000000 --- a/htdocs/langs/nb_NO/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Oppset av FTP-klient modulen -NewFTPClient=Nytt oppsett av FTP- tilkobling -FTPArea=FTP område -FTPAreaDesc=Denne skjermen viser innholdet på en FTP server visning -SetupOfFTPClientModuleNotComplete=Oppsett av FTP-klient modul synes å være ufullstendig -FTPFeatureNotSupportedByYourPHP=Din PHP støtter ikke FTP-funksjoner -FailedToConnectToFTPServer=Kunne ikke koble til FTP-server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Klarte ikke å logge inn på FTP-server med angitt brukernavn og passord -FTPFailedToRemoveFile=Klarte ikke å fjerne filen %s. -FTPFailedToRemoveDir=Kunne ikke fjerne katalogen %s (Sjekk tillatelser, og at katalogen er tom). -FTPPassiveMode=Passiv modus -ChooseAFTPEntryIntoMenu=Velg FTP i meny... -FailedToGetFile=Kunne ikke hente filene %s diff --git a/htdocs/langs/ne_NP/externalsite.lang b/htdocs/langs/ne_NP/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/ne_NP/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/ne_NP/ftp.lang b/htdocs/langs/ne_NP/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/ne_NP/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/nl_BE/externalsite.lang b/htdocs/langs/nl_BE/externalsite.lang deleted file mode 100644 index 4f3aab4c69f..00000000000 --- a/htdocs/langs/nl_BE/externalsite.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link naar externe website -ExternalSiteModuleNotComplete=Module ExternalSite werd niet correct geconfigureerd. diff --git a/htdocs/langs/nl_BE/ftp.lang b/htdocs/langs/nl_BE/ftp.lang deleted file mode 100644 index df4c0ad6757..00000000000 --- a/htdocs/langs/nl_BE/ftp.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -ChooseAFTPEntryIntoMenu=Kies een FTP toegang in het menu... -FailedToGetFile=Mislukt om de bestanden te ontvangen %s diff --git a/htdocs/langs/nl_NL/externalsite.lang b/htdocs/langs/nl_NL/externalsite.lang deleted file mode 100644 index a5de68679db..00000000000 --- a/htdocs/langs/nl_NL/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Instellingen voor de link naar een externe website -ExternalSiteURL=Externe site-URL van HTML-iframe-inhoud -ExternalSiteModuleNotComplete=Module Externe Site werd niet correct geconfigureerd. -ExampleMyMenuEntry=Mijn menu-item diff --git a/htdocs/langs/nl_NL/ftp.lang b/htdocs/langs/nl_NL/ftp.lang deleted file mode 100644 index 6d3bee48b51..00000000000 --- a/htdocs/langs/nl_NL/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP of SFTP Client module setup -NewFTPClient=Nieuwe FTP/SFTP connectie instellen -FTPArea=FTP/SFTP omgeving -FTPAreaDesc=Dit scherm geeft een voorbeeld van een FTP of SFTP server weer -SetupOfFTPClientModuleNotComplete=De setup van de FTP- of SFTP-clientmodule lijkt niet volledig -FTPFeatureNotSupportedByYourPHP=Uw PHP ondersteunt geen FTP- of SFTP-functies -FailedToConnectToFTPServer=Kan geen verbinding maken met server (server%s, poort%s) -FailedToConnectToFTPServerWithCredentials=Inloggen op server met gedefinieerde login / wachtwoord is mislukt -FTPFailedToRemoveFile=Bestand %s kon niet verwijderd worden. -FTPFailedToRemoveDir=Kan map %s niet verwijderen: controleer de machtigingen en of de map leeg is. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Kies een FTP / SFTP-site uit het menu ... -FailedToGetFile=%sBestanden niet ontvangen diff --git a/htdocs/langs/pl_PL/externalsite.lang b/htdocs/langs/pl_PL/externalsite.lang deleted file mode 100644 index 1f03b277a8b..00000000000 --- a/htdocs/langs/pl_PL/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Skonfiguruj link do zewnętrznej strony internetowej -ExternalSiteURL=Adres URL witryny zewnętrznej z treścią elementu iframe HTML -ExternalSiteModuleNotComplete=Moduł zewnętrznej strony internetowej nie został skonfigurowany poprawny -ExampleMyMenuEntry=Moje wejścia do menu diff --git a/htdocs/langs/pl_PL/ftp.lang b/htdocs/langs/pl_PL/ftp.lang deleted file mode 100644 index 6142d4b1928..00000000000 --- a/htdocs/langs/pl_PL/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Konfiguracja modułu klienta FTP -NewFTPClient=Konfiguracja nowego połączenia FTP -FTPArea=Obszar FTP -FTPAreaDesc=Ten ekran pokazuje zawartość widoku serwera FTP -SetupOfFTPClientModuleNotComplete=Konfiguracja modułu klienta FTP wydaje się być niekompletna -FTPFeatureNotSupportedByYourPHP=PHP nie obsługuje funkcji FTP -FailedToConnectToFTPServer=Nie udało się połączyć z serwerem FTP (%s serwera, %s port) -FailedToConnectToFTPServerWithCredentials=Nie udało się zalogować do serwera FTP ze zdefiniowanym użytkownikiem/hasłem -FTPFailedToRemoveFile=Nie udało się usunąć pliku %s. -FTPFailedToRemoveDir=Nie udało się usunąć katalogu %s (Sprawdź uprawnienia i czy katalog jest pusty) -FTPPassiveMode=Tryb pasywny -ChooseAFTPEntryIntoMenu=Wybierz pozycję FTP w menu... -FailedToGetFile=Nie można pobrać plików %s diff --git a/htdocs/langs/pt_BR/externalsite.lang b/htdocs/langs/pt_BR/externalsite.lang deleted file mode 100644 index 31cdbccc008..00000000000 --- a/htdocs/langs/pt_BR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar linque para o website externo -ExternalSiteURL=URL de site externo com conteúdo HTML iframe -ExternalSiteModuleNotComplete=O módulo SiteExterno não foi configurado corretamente. -ExampleMyMenuEntry=Minha entrada do menu diff --git a/htdocs/langs/pt_BR/ftp.lang b/htdocs/langs/pt_BR/ftp.lang deleted file mode 100644 index bbee2149a4e..00000000000 --- a/htdocs/langs/pt_BR/ftp.lang +++ /dev/null @@ -1,13 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configuração do módulo cliente FTP -NewFTPClient=Nova configuração da conexão FTP -FTPArea=Área FTP -FTPAreaDesc=Esta tela mostra uma visão de um servidor FTP. -SetupOfFTPClientModuleNotComplete=A configuração do módulo do cliente FTP parece estar incompleta -FTPFeatureNotSupportedByYourPHP=Seu PHP não suporta as funções de FTP -FailedToConnectToFTPServer=Falha na conexão ao servidor FTP (server% s, porta% s) -FailedToConnectToFTPServerWithCredentials=Falha ao efetuar login no servidor FTP com login/senha -FTPFailedToRemoveFile=Falha ao remover o arquivo %s. -FTPFailedToRemoveDir=Falha ao remover a pasta %s : Verifique as permissões e que a pasta está vazia -ChooseAFTPEntryIntoMenu=Escolha um Site FTP do menu ... -FailedToGetFile=Falha ao obter arquivos %s diff --git a/htdocs/langs/pt_PT/externalsite.lang b/htdocs/langs/pt_PT/externalsite.lang deleted file mode 100644 index 8f9247e1b7e..00000000000 --- a/htdocs/langs/pt_PT/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configurar hiperligação para o site da Web externo -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=O módulo Site Externo não está configurado correctamente. -ExampleMyMenuEntry=Minha entrada de menu diff --git a/htdocs/langs/pt_PT/ftp.lang b/htdocs/langs/pt_PT/ftp.lang deleted file mode 100644 index 554d68c65f5..00000000000 --- a/htdocs/langs/pt_PT/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configurar módulo de Cliente FTP -NewFTPClient=Nova configuração de ligação de FTP -FTPArea=Área de FTP -FTPAreaDesc=Este ecrã mostra o seu conteúdo de uma visualização do servidor FTP -SetupOfFTPClientModuleNotComplete=A configuração do módulo de cliente FTP parece não estar concluída -FTPFeatureNotSupportedByYourPHP=A sua versão do PHP não suporta as funções FTP -FailedToConnectToFTPServer=Não foi possível ligar ao servidor FTP (servidor: %s, porta: %s) -FailedToConnectToFTPServerWithCredentials=Não foi possível iniciar a sessão no servidor FTP com o nome/senha definidos -FTPFailedToRemoveFile=Falha ao remover o ficheiro: %s. -FTPFailedToRemoveDir=Não foi possível ao remover a diretoria: %s (Verifique as permissões e se a diretoria está sem dados). -FTPPassiveMode=Modo passivo -ChooseAFTPEntryIntoMenu=Escolha uma entrada de FTP no menu... -FailedToGetFile=Falha a obter os ficheiros%s diff --git a/htdocs/langs/ro_RO/externalsite.lang b/htdocs/langs/ro_RO/externalsite.lang deleted file mode 100644 index 1b2e130a3d5..00000000000 --- a/htdocs/langs/ro_RO/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Link-ul de instalare pentru site-ul extern -ExternalSiteURL=URL-ul site-ului extern care va fi conținut în iframe HTML -ExternalSiteModuleNotComplete=Modulul Site extern nu a fost configurat corespunzător. -ExampleMyMenuEntry=Intrare în Meniul meu diff --git a/htdocs/langs/ro_RO/ftp.lang b/htdocs/langs/ro_RO/ftp.lang deleted file mode 100644 index 0b169059064..00000000000 --- a/htdocs/langs/ro_RO/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Configurarea modulului client FTP -NewFTPClient=Creează o nouă conexiune FTP -FTPArea=FTP -FTPAreaDesc=Acest ecran afișează conţinutul unui server FTP -SetupOfFTPClientModuleNotComplete=Configurarea clientului FTP pare incompletă -FTPFeatureNotSupportedByYourPHP=Versiunea PHP a dvs. nu are suport pentru funcţii FTP -FailedToConnectToFTPServer=Conectarea la serverul FTP a eșuat (server: %s, port: %s) -FailedToConnectToFTPServerWithCredentials=Autentificarea la serverul FTP a eșuat folosind utilizatorul / parola definite -FTPFailedToRemoveFile=Fișierul %s nu poate fi șters. -FTPFailedToRemoveDir=Directorul %s nu poate fi șters (Verificaţi permisiunile şi faptul că directorul este gol). -FTPPassiveMode=Mod pasiv -ChooseAFTPEntryIntoMenu=Alegeți o intrare FTP în meniul ... -FailedToGetFile=Nu se pot da fișierele %s diff --git a/htdocs/langs/ru_RU/externalsite.lang b/htdocs/langs/ru_RU/externalsite.lang deleted file mode 100644 index ed73de12a39..00000000000 --- a/htdocs/langs/ru_RU/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Установка ссылки на внешний веб-сайт -ExternalSiteURL=URL-адрес внешнего сайта HTML-содержимого iframe -ExternalSiteModuleNotComplete=Модуль ВнешнийСайт не был надлежащим образом настроен. -ExampleMyMenuEntry=Пункт "Моё меню" diff --git a/htdocs/langs/ru_RU/ftp.lang b/htdocs/langs/ru_RU/ftp.lang deleted file mode 100644 index a90aec934de..00000000000 --- a/htdocs/langs/ru_RU/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Настройка модуля FTP или SFTP-клиента -NewFTPClient=Настройка нового соединения FTP/FTPS -FTPArea=Область FTP/FTPS -FTPAreaDesc=На этом экране показан вид сервера FTP и SFTP. -SetupOfFTPClientModuleNotComplete=Настройка клиентского модуля FTP или SFTP кажется незавершенной. -FTPFeatureNotSupportedByYourPHP=Ваш PHP не поддерживает функции FTP или SFTP -FailedToConnectToFTPServer=Не удалось подключиться к серверу (сервер %s, порт %s) -FailedToConnectToFTPServerWithCredentials=Не удалось войти на сервер с определенным логином/паролем -FTPFailedToRemoveFile=Не удалось удалить файл %s. -FTPFailedToRemoveDir=Не удалось удалить каталог %s: проверьте разрешения и убедитесь, что каталог пуст. -FTPPassiveMode=Пассивный режим -ChooseAFTPEntryIntoMenu=Выберите сайт FTP/SFTP в меню ... -FailedToGetFile=Не удалось получить файлы %s diff --git a/htdocs/langs/sk_SK/externalsite.lang b/htdocs/langs/sk_SK/externalsite.lang deleted file mode 100644 index 97c6ec00e38..00000000000 --- a/htdocs/langs/sk_SK/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Nastavenie odkaz na externé webové stránky -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul ExternalSite nebol správne nakonfigurovaný. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sk_SK/ftp.lang b/htdocs/langs/sk_SK/ftp.lang deleted file mode 100644 index 541f0eadf5b..00000000000 --- a/htdocs/langs/sk_SK/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP klient modul nastavenia -NewFTPClient=Nový FTP nastavenie pripojenia -FTPArea=FTP priestor -FTPAreaDesc=Táto obrazovka zobrazí obsah FTP servera pohľadu -SetupOfFTPClientModuleNotComplete=Nastavenie FTP klienta modulu Zdá sa, že nie je kompletná -FTPFeatureNotSupportedByYourPHP=Vaše PHP nepodporuje FTP funkcie -FailedToConnectToFTPServer=Nepodarilo sa pripojiť k FTP serveru (server %s, prístav %s) -FailedToConnectToFTPServerWithCredentials=Nepodarilo sa prihlásiť k FTP serveru s definovanou login / heslo -FTPFailedToRemoveFile=Nepodarilo sa odstrániť súbor %s. -FTPFailedToRemoveDir=Nepodarilo sa odstrániť adresár %s (Skontrolujte oprávnenia a že adresár je prázdny). -FTPPassiveMode=Pasívny režim -ChooseAFTPEntryIntoMenu=Pridajte položku FTP do menu -FailedToGetFile=Získanie súborov %s zlyhalo diff --git a/htdocs/langs/sl_SI/externalsite.lang b/htdocs/langs/sl_SI/externalsite.lang deleted file mode 100644 index e2794de1ed6..00000000000 --- a/htdocs/langs/sl_SI/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup se povezujejo na zunanji strani -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul za zunanjo stran ni bil konfiguriran pravilno -ExampleMyMenuEntry=Moj menijski vnos diff --git a/htdocs/langs/sl_SI/ftp.lang b/htdocs/langs/sl_SI/ftp.lang deleted file mode 100644 index 3598a816c8c..00000000000 --- a/htdocs/langs/sl_SI/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Nastavitev modula FTP Client -NewFTPClient=Nastavitev nove FTP povezave -FTPArea=Področje FTP -FTPAreaDesc=Na zaslonu je prikazana vsebina izgleda FTP strežnika -SetupOfFTPClientModuleNotComplete=Kaže, da nastavitev modula FTP client ni popolna -FTPFeatureNotSupportedByYourPHP=Vaš PHP ne podpira FTP funkcij -FailedToConnectToFTPServer=Neuspešna povezava s FTP strežnikom (strežnik %s, port %s) -FailedToConnectToFTPServerWithCredentials=Neuspešna prijava na FTP strežnik z določenim uporabniškim imenom/geslom -FTPFailedToRemoveFile=Neuspešna odstranitev datoteke %s. -FTPFailedToRemoveDir=Neuspešna odstranitev mape %s (Preverite dovoljenja in če je ta mapa prazna). -FTPPassiveMode=Pasivni način -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/sq_AL/externalsite.lang b/htdocs/langs/sq_AL/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/sq_AL/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sq_AL/ftp.lang b/htdocs/langs/sq_AL/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/sq_AL/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/sr_RS/externalsite.lang b/htdocs/langs/sr_RS/externalsite.lang deleted file mode 100644 index 7f81e5e93ed..00000000000 --- a/htdocs/langs/sr_RS/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Podesi link ka eksternom sajtu -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Modul eksterni sajt nije ispravno konfigurisan. -ExampleMyMenuEntry=Stavka iz mog menija diff --git a/htdocs/langs/sr_RS/ftp.lang b/htdocs/langs/sr_RS/ftp.lang deleted file mode 100644 index 15cb044156d..00000000000 --- a/htdocs/langs/sr_RS/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Podešavanja FTP Client modula -NewFTPClient=Nova FTP konekcija -FTPArea=Oblast FTP -FTPAreaDesc=Ovaj ekran vam prikazuje sadržaj FTP servera -SetupOfFTPClientModuleNotComplete=Podešavanja FTP client modula nisu potpuna -FTPFeatureNotSupportedByYourPHP=Vaša verzija PHP-a ne omogućava korišćenje FTP-a -FailedToConnectToFTPServer=Greška u konekcij na FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Pogrešan login/password za konekciju na FTP server -FTPFailedToRemoveFile=Greška prilikom brisanja fajla %s. -FTPFailedToRemoveDir=Greška prilkom brisanja foldera %s (proverite prava i da li je flder pazan). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Izaberite FTP stavku u meniju... -FailedToGetFile=Greška prilikom preuzimanja fajlova %s diff --git a/htdocs/langs/sv_SE/externalsite.lang b/htdocs/langs/sv_SE/externalsite.lang deleted file mode 100644 index bb812b412ed..00000000000 --- a/htdocs/langs/sv_SE/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup länk till extern webbplats -ExternalSiteURL=Extern webbadress för HTML för iframe-innehåll -ExternalSiteModuleNotComplete=Modul ExternalSite var inte korrekt konfigurerad. -ExampleMyMenuEntry=Min meny posten diff --git a/htdocs/langs/sv_SE/ftp.lang b/htdocs/langs/sv_SE/ftp.lang deleted file mode 100644 index d556f413bfc..00000000000 --- a/htdocs/langs/sv_SE/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP- eller SFTP-klientmodulinställning -NewFTPClient=Ny FTP / FTPS-anslutningsinstallation -FTPArea=FTP / FTPS-område -FTPAreaDesc=Denna skärm visar en vy av en FTP et SFTP-server. -SetupOfFTPClientModuleNotComplete=Installationen av FTP- eller SFTP-klientmodulen verkar vara ofullständig -FTPFeatureNotSupportedByYourPHP=Din PHP stöder inte FTP- eller SFTP-funktioner -FailedToConnectToFTPServer=Det gick inte att ansluta till servern (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Det gick inte att logga in på servern med definierat inloggning / lösenord -FTPFailedToRemoveFile=Misslyckades med att ta bort fil %s. -FTPFailedToRemoveDir=Misslyckades med att ta bort katalogen %s : kolla behörigheter och att katalogen är tom. -FTPPassiveMode=Passivt läge -ChooseAFTPEntryIntoMenu=Välj en FTP / SFTP-webbplats från menyn ... -FailedToGetFile=Filhämtning misslyckades %s diff --git a/htdocs/langs/sw_SW/externalsite.lang b/htdocs/langs/sw_SW/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/sw_SW/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/sw_SW/ftp.lang b/htdocs/langs/sw_SW/ftp.lang deleted file mode 100644 index 8ecb0c55cad..00000000000 --- a/htdocs/langs/sw_SW/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen show you content of a FTP server view -SetupOfFTPClientModuleNotComplete=Setup of FTP client module seems to be not complete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s (Check permissions and that directory is empty). -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/ta_IN/externalsite.lang b/htdocs/langs/ta_IN/externalsite.lang deleted file mode 100644 index cc877ee68b4..00000000000 --- a/htdocs/langs/ta_IN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=வெளிப்புற இணையதளத்திற்கான இணைப்பை அமைக்கவும் -ExternalSiteURL=HTML iframe உள்ளடக்கத்தின் வெளிப்புற தள URL -ExternalSiteModuleNotComplete=ExternalSite தொகுதி சரியாக உள்ளமைக்கப்படவில்லை. -ExampleMyMenuEntry=எனது மெனு பதிவு diff --git a/htdocs/langs/ta_IN/ftp.lang b/htdocs/langs/ta_IN/ftp.lang deleted file mode 100644 index e05341534fd..00000000000 --- a/htdocs/langs/ta_IN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP அல்லது SFTP கிளையண்ட் தொகுதி அமைவு -NewFTPClient=புதிய FTP/FTPS இணைப்பு அமைப்பு -FTPArea=FTP/FTPS பகுதி -FTPAreaDesc=இந்தத் திரையானது FTP மற்றும் SFTP சேவையகத்தின் காட்சியைக் காட்டுகிறது. -SetupOfFTPClientModuleNotComplete=FTP அல்லது SFTP கிளையன்ட் தொகுதியின் அமைவு முழுமையடையவில்லை -FTPFeatureNotSupportedByYourPHP=உங்கள் PHP FTP அல்லது SFTP செயல்பாடுகளை ஆதரிக்காது -FailedToConnectToFTPServer=சேவையகத்துடன் இணைக்க முடியவில்லை (சர்வர் %s, port %s) -FailedToConnectToFTPServerWithCredentials=வரையறுக்கப்பட்ட உள்நுழைவு/கடவுச்சொல் மூலம் சர்வரில் உள்நுழைவதில் தோல்வி -FTPFailedToRemoveFile= %s கோப்பை அகற்ற முடியவில்லை. -FTPFailedToRemoveDir=கோப்பகத்தை அகற்றுவதில் தோல்வி -FTPPassiveMode=செயலற்ற பயன்முறை -ChooseAFTPEntryIntoMenu=மெனுவிலிருந்து FTP/SFTP தளத்தைத் தேர்வு செய்யவும்... -FailedToGetFile=%s கோப்புகளைப் பெறுவதில் தோல்வி diff --git a/htdocs/langs/tg_TJ/externalsite.lang b/htdocs/langs/tg_TJ/externalsite.lang deleted file mode 100644 index 9d2064b2e93..00000000000 --- a/htdocs/langs/tg_TJ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Пайвастшавӣ ба вебсайти беруна -ExternalSiteURL=URL -и сайти берунии мундариҷаи HTML iframe -ExternalSiteModuleNotComplete=Модули ExternalSite дуруст танзим нашудааст. -ExampleMyMenuEntry=Вуруди менюи ман diff --git a/htdocs/langs/tg_TJ/ftp.lang b/htdocs/langs/tg_TJ/ftp.lang deleted file mode 100644 index 85090f61c8d..00000000000 --- a/htdocs/langs/tg_TJ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Танзими модули мизоҷи FTP ё SFTP -NewFTPClient=Танзимоти нави пайвастшавии FTP/FTPS -FTPArea=Минтақаи FTP/FTPS -FTPAreaDesc=Ин экран намуди сервери FTP ва SFTP -ро нишон медиҳад. -SetupOfFTPClientModuleNotComplete=Танзимоти модули муштарии FTP ё SFTP ба назар мерасад -FTPFeatureNotSupportedByYourPHP=PHP -и шумо вазифаҳои FTP ё SFTP -ро пуштибонӣ намекунад -FailedToConnectToFTPServer=Ба сервер пайваст нашуд (сервер %s, порти %s) -FailedToConnectToFTPServerWithCredentials=Воридшавӣ ба сервер бо логин/пароли муайяншуда ноком шуд -FTPFailedToRemoveFile=Файли %s нест карда нашуд. -FTPFailedToRemoveDir=Феҳристи %s нест карда нашуд: иҷозатҳоро тафтиш кунед ва феҳрист холӣ аст. -FTPPassiveMode=Ҳолати ғайрифаъол -ChooseAFTPEntryIntoMenu=Аз меню сайти FTP/SFTP -ро интихоб кунед ... -FailedToGetFile=Файлҳои %s гирифта нашуданд diff --git a/htdocs/langs/th_TH/externalsite.lang b/htdocs/langs/th_TH/externalsite.lang deleted file mode 100644 index f650f17c22f..00000000000 --- a/htdocs/langs/th_TH/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=การติดตั้งการเชื่อมโยงไปยังเว็บไซต์ภายนอก -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=โมดูล ExternalSite ไม่ได้กำหนดค่าอย่างถูกต้อง -ExampleMyMenuEntry=รายการเมนู diff --git a/htdocs/langs/th_TH/ftp.lang b/htdocs/langs/th_TH/ftp.lang deleted file mode 100644 index e7a78ac1a66..00000000000 --- a/htdocs/langs/th_TH/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=การติดตั้งโมดูล FTP ไคลเอนต์ -NewFTPClient=การตั้งค่าการเชื่อมต่อใหม่ FTP -FTPArea=พื้นที่ FTP -FTPAreaDesc=หน้าจอนี้จะแสดงให้คุณเห็นเนื้อหาในมุมมองของ FTP เซิร์ฟเวอร์ -SetupOfFTPClientModuleNotComplete=การติดตั้งโมดูลลูกค้า FTP ดูเหมือนว่าจะไม่สมบูรณ์ -FTPFeatureNotSupportedByYourPHP=PHP ของคุณไม่สนับสนุนฟังก์ชั่น FTP -FailedToConnectToFTPServer=ล้มเหลวในการเชื่อมต่อกับเซิร์ฟเวอร์ FTP (เซิร์ฟเวอร์% s พอร์ต% s) -FailedToConnectToFTPServerWithCredentials=ล้มเหลวในการเข้าสู่เซิร์ฟเวอร์ FTP ที่มีกำหนดเข้าสู่ระบบ / รหัสผ่าน -FTPFailedToRemoveFile=ไม่สามารถลบไฟล์% s -FTPFailedToRemoveDir=ไม่สามารถลบไดเรกทอรี% s (สิทธิ์ตรวจสอบไดเรกทอรีที่ว่างเปล่า) -FTPPassiveMode=โหมด Passive -ChooseAFTPEntryIntoMenu=Choose a FTP entry into menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/tr_TR/externalsite.lang b/htdocs/langs/tr_TR/externalsite.lang deleted file mode 100644 index 43f6d94f301..00000000000 --- a/htdocs/langs/tr_TR/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Dış web sitesine bağlantı ayarla -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Dış Web Sitesi modülü doğru yapılandırılmamış. -ExampleMyMenuEntry=Menü girişim diff --git a/htdocs/langs/tr_TR/ftp.lang b/htdocs/langs/tr_TR/ftp.lang deleted file mode 100644 index e771e1006e1..00000000000 --- a/htdocs/langs/tr_TR/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP İstemcisi modülü kurulumu -NewFTPClient=Yeni FTP bağlantı kurulumu -FTPArea=FTP Alanı -FTPAreaDesc=Bu ekran bir FTP sunucusunun görünümünü sergiler. -SetupOfFTPClientModuleNotComplete=FTP istemci modülünün kurulumu eksik görünüyor -FTPFeatureNotSupportedByYourPHP=PHP'niz FTP işlevlerini desteklemiyor -FailedToConnectToFTPServer=FTP sunucusuna bağlanamadı (sunucu %s, port %s) -FailedToConnectToFTPServerWithCredentials=Tanımlı kullanıcı adı/parola ile FTP sunucusunda oturum açılamadı -FTPFailedToRemoveFile=%s dosyası kaldırılamadı. -FTPFailedToRemoveDir=%s dizini kaldırılamadı: izinleri kontrol edin ve dizinin boş olduğundan emin olun. -FTPPassiveMode=Pasif mod -ChooseAFTPEntryIntoMenu=Menüden bir FTP sitesi seçin... -FailedToGetFile=%s dosyaları alınamadı diff --git a/htdocs/langs/uk_UA/externalsite.lang b/htdocs/langs/uk_UA/externalsite.lang deleted file mode 100644 index 3f7497d77f1..00000000000 --- a/htdocs/langs/uk_UA/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Налаштування посилання на зовнішній веб-сайт -ExternalSiteURL=URL-адреса зовнішнього сайту вмісту iframe HTML -ExternalSiteModuleNotComplete=Модуль ExternalSite неправильно налаштовано. -ExampleMyMenuEntry=Мій запис в меню diff --git a/htdocs/langs/uk_UA/ftp.lang b/htdocs/langs/uk_UA/ftp.lang deleted file mode 100644 index d2a3df365ab..00000000000 --- a/htdocs/langs/uk_UA/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Налаштування модуля клієнта FTP або SFTP -NewFTPClient=Нове налаштування з’єднання FTP/FTPS -FTPArea=Зона FTP/FTPS -FTPAreaDesc=Цей екран показує вигляд сервера FTP та SFTP. -SetupOfFTPClientModuleNotComplete=Налаштування клієнтського модуля FTP або SFTP здається неповним -FTPFeatureNotSupportedByYourPHP=Ваш PHP не підтримує функції FTP або SFTP -FailedToConnectToFTPServer=Не вдалося підключитися до сервера (сервер %s, порт %s) -FailedToConnectToFTPServerWithCredentials=Не вдалося ввійти на сервер із визначеним логіном/паролем -FTPFailedToRemoveFile=Не вдалося видалити файл %s . -FTPFailedToRemoveDir=Не вдалося видалити каталог %s : перевірте дозволи та переконайтеся, що каталог порожній. -FTPPassiveMode=Пасивний режим -ChooseAFTPEntryIntoMenu=Виберіть у меню сайт FTP/SFTP... -FailedToGetFile=Не вдалося отримати файли %s diff --git a/htdocs/langs/ur_PK/externalsite.lang b/htdocs/langs/ur_PK/externalsite.lang deleted file mode 100644 index 6663e35aa30..00000000000 --- a/htdocs/langs/ur_PK/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=بیرونی ویب سائٹ کا لنک سیٹ کریں۔ -ExternalSiteURL=HTML iframe مواد کا بیرونی سائٹ URL -ExternalSiteModuleNotComplete=ماڈیول ExternalSite کو صحیح طریقے سے کنفیگر نہیں کیا گیا تھا۔ -ExampleMyMenuEntry=میرا مینو اندراج diff --git a/htdocs/langs/ur_PK/ftp.lang b/htdocs/langs/ur_PK/ftp.lang deleted file mode 100644 index 26c4647aa20..00000000000 --- a/htdocs/langs/ur_PK/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP یا SFTP کلائنٹ ماڈیول سیٹ اپ -NewFTPClient=نیا FTP/FTPS کنکشن سیٹ اپ -FTPArea=FTP/FTPS ایریا -FTPAreaDesc=یہ اسکرین FTP اور SFTP سرور کا منظر دکھاتی ہے۔ -SetupOfFTPClientModuleNotComplete=FTP یا SFTP کلائنٹ ماڈیول کا سیٹ اپ نامکمل لگتا ہے۔ -FTPFeatureNotSupportedByYourPHP=آپ کا پی ایچ پی FTP یا SFTP فنکشنز کو سپورٹ نہیں کرتا ہے۔ -FailedToConnectToFTPServer=سرور سے منسلک ہونے میں ناکام (سرور %s، پورٹ %s) -FailedToConnectToFTPServerWithCredentials=متعین لاگ ان/پاس ورڈ کے ساتھ سرور میں لاگ ان کرنے میں ناکام -FTPFailedToRemoveFile=فائل کو ہٹانے میں ناکام %s ۔ -FTPFailedToRemoveDir=ڈائرکٹری کو ہٹانے میں ناکام %s : اجازتیں چیک کریں اور یہ کہ ڈائرکٹری خالی ہے۔ -FTPPassiveMode=غیر فعال موڈ -ChooseAFTPEntryIntoMenu=مینو سے ایک FTP/SFTP سائٹ منتخب کریں... -FailedToGetFile=فائلیں %s حاصل کرنے میں ناکام diff --git a/htdocs/langs/uz_UZ/externalsite.lang b/htdocs/langs/uz_UZ/externalsite.lang deleted file mode 100644 index db049960d45..00000000000 --- a/htdocs/langs/uz_UZ/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Tashqi veb-saytga havolani o'rnatish -ExternalSiteURL=HTML iframe tarkibidagi tashqi sayt URL manzili -ExternalSiteModuleNotComplete=ExternalSite moduli to'g'ri sozlanmagan. -ExampleMyMenuEntry=Mening yozuvim diff --git a/htdocs/langs/uz_UZ/ftp.lang b/htdocs/langs/uz_UZ/ftp.lang deleted file mode 100644 index 4c409340eca..00000000000 --- a/htdocs/langs/uz_UZ/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP yoki SFTP Client modulini sozlash -NewFTPClient=FTP / FTPS ulanishini yangi sozlash -FTPArea=FTP / FTPS maydoni -FTPAreaDesc=Ushbu ekran FTP va SFTP serverining ko'rinishini ko'rsatadi. -SetupOfFTPClientModuleNotComplete=FTP yoki SFTP mijoz modulini sozlash tugallanmaganga o'xshaydi -FTPFeatureNotSupportedByYourPHP=Sizning PHP-da FTP yoki SFTP funktsiyalari qo'llab-quvvatlanmaydi -FailedToConnectToFTPServer=Serverga ulanib bo'lmadi (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Belgilangan login / parol bilan serverga kirishda xatolik yuz berdi -FTPFailedToRemoveFile= %s faylini o'chirib bo'lmadi. -FTPFailedToRemoveDir= %s katalogini o'chirib bo'lmadi: ruxsatlarni tekshiring va katalog bo'sh. -FTPPassiveMode=Passiv rejim -ChooseAFTPEntryIntoMenu=Menyudan FTP / SFTP saytini tanlang ... -FailedToGetFile=%s fayllari olinmadi diff --git a/htdocs/langs/vi_VN/externalsite.lang b/htdocs/langs/vi_VN/externalsite.lang deleted file mode 100644 index 9292c2606ba..00000000000 --- a/htdocs/langs/vi_VN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Thiết lập liên kết đến trang web bên ngoài -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Mô-đun trang web bên ngoài được cấu hình không đúng. -ExampleMyMenuEntry=Mục menu của tôi diff --git a/htdocs/langs/vi_VN/ftp.lang b/htdocs/langs/vi_VN/ftp.lang deleted file mode 100644 index 0070a8d2da6..00000000000 --- a/htdocs/langs/vi_VN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=Cài đặt máy trạm FTP -NewFTPClient=Tạo thiết lập FTP -FTPArea=Kết nối FTP -FTPAreaDesc=Màn hình này hiển thị chế độ xem của máy chủ FTP. -SetupOfFTPClientModuleNotComplete=Việc thiết lập mô đun máy khách FTP dường như chưa hoàn tất -FTPFeatureNotSupportedByYourPHP=PHP của bạn không hỗ trợ chức năng FTP -FailedToConnectToFTPServer=Không thể kết nối đến máy chủ FTP (máy chủ% s, cổng% s) -FailedToConnectToFTPServerWithCredentials=Không thể đăng nhập vào máy chủ FTP với tên đăng nhập / mật khẩu đã được khai báo -FTPFailedToRemoveFile=Không thể xóa bỏ các tập tin %s. -FTPFailedToRemoveDir=Không thể xóa thư mục %s : kiểm tra quyền và thư mục đó là rỗng. -FTPPassiveMode=Chế độ thụ động -ChooseAFTPEntryIntoMenu=Chọn một trang FTP từ menu ... -FailedToGetFile=Lỗi khi tải tệp tin %s diff --git a/htdocs/langs/zh_CN/externalsite.lang b/htdocs/langs/zh_CN/externalsite.lang deleted file mode 100644 index 5ad169c8784..00000000000 --- a/htdocs/langs/zh_CN/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=设置链接到外部网站 -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=外部网站模块配置不正确。 -ExampleMyMenuEntry=我的菜单选项 diff --git a/htdocs/langs/zh_CN/ftp.lang b/htdocs/langs/zh_CN/ftp.lang deleted file mode 100644 index 31efb1c5f66..00000000000 --- a/htdocs/langs/zh_CN/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP客户端模块设置 -NewFTPClient=新建FTP链接 -FTPArea=FTP 区 -FTPAreaDesc=这个屏幕显示您的FTP服务器查看内容 -SetupOfFTPClientModuleNotComplete=模块的FTP客户端安装程序似乎是不完整 -FTPFeatureNotSupportedByYourPHP=您的PHP不支持FTP功能 -FailedToConnectToFTPServer=无法连接到FTP服务器(服务器%s,港口%s) -FailedToConnectToFTPServerWithCredentials=无法登录到FTP服务器的定义登陆/密码 -FTPFailedToRemoveFile=无法删除文件%s。 -FTPFailedToRemoveDir=无法删除目录%s(检查权限和目录是空的)。 -FTPPassiveMode=被动模式 -ChooseAFTPEntryIntoMenu=在菜单中选择一个FTP选项 -FailedToGetFile=获取文件失败 %s diff --git a/htdocs/langs/zh_HK/externalsite.lang b/htdocs/langs/zh_HK/externalsite.lang deleted file mode 100644 index 452100c65b3..00000000000 --- a/htdocs/langs/zh_HK/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Setup link to external website -ExternalSiteURL=External Site URL of HTML iframe content -ExternalSiteModuleNotComplete=Module ExternalSite was not configured properly. -ExampleMyMenuEntry=My menu entry diff --git a/htdocs/langs/zh_HK/ftp.lang b/htdocs/langs/zh_HK/ftp.lang deleted file mode 100644 index d80b87c2715..00000000000 --- a/htdocs/langs/zh_HK/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/zh_TW/externalsite.lang b/htdocs/langs/zh_TW/externalsite.lang deleted file mode 100644 index 55d5e5c1226..00000000000 --- a/htdocs/langs/zh_TW/externalsite.lang +++ /dev/null @@ -1,5 +0,0 @@ -# Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=設定連結到外部網站 -ExternalSiteURL=HTML iframe 內容的外部網站網址 -ExternalSiteModuleNotComplete=外部網站模組設定不正確。 -ExampleMyMenuEntry=我的選單條目 diff --git a/htdocs/langs/zh_TW/ftp.lang b/htdocs/langs/zh_TW/ftp.lang deleted file mode 100644 index 55a1c5ada56..00000000000 --- a/htdocs/langs/zh_TW/ftp.lang +++ /dev/null @@ -1,14 +0,0 @@ -# Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP客戶端模組設定 -NewFTPClient=新的FTP連接設定 -FTPArea=FTP區域 -FTPAreaDesc=此畫面顯示FTP服務器的圖示。 -SetupOfFTPClientModuleNotComplete=FTP客戶端模組設定似乎不完整 -FTPFeatureNotSupportedByYourPHP=您的PHP不支援FTP功能 -FailedToConnectToFTPServer=無法連接到FTP服務器(服務器%s,港口%s) -FailedToConnectToFTPServerWithCredentials=無法登錄到FTP服務器的定義登錄/密碼 -FTPFailedToRemoveFile=無法刪除文件%s。 -FTPFailedToRemoveDir=無法刪除資料夾%s :檢查權限,並且確認資料夾內無檔案。 -FTPPassiveMode=被動模式 -ChooseAFTPEntryIntoMenu=從選單中選擇一個FTP站台... -FailedToGetFile=無法獲取檔案 %s diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index e6f560d7a42..147f07b7e1b 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -690,7 +690,7 @@ class Loan extends CommonObject public function info($id) { $sql = 'SELECT l.rowid, l.datec, l.fk_user_author, l.fk_user_modif,'; - $sql .= ' l.tms'; + $sql .= ' l.tms as datem'; $sql .= ' WHERE l.rowid = '.((int) $id); dol_syslog(get_class($this).'::info', LOG_DEBUG); @@ -700,21 +700,11 @@ class Loan extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } - $this->date_creation = $this->db->jdate($obj->datec); - if (empty($obj->fk_user_modif)) { - $obj->tms = ""; - } - $this->date_modification = $this->db->jdate($obj->tms); + + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); $this->db->free($result); return 1; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index de14cae280b..bea27a09cab 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -131,7 +131,7 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login $inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database $inj += preg_match('/'."\n"; + $parameters = array('help_url' => $help_url); + $reshook = $hookmanager->executeHooks('changeHelpURL', $parameters); + if ($reshook > 0) { + $help_url = $hookmanager->resPrint; + } + // top menu and left menu area if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && !GETPOST('dol_openinpopup', 'aZ09')) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url); diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index 68aa224423c..3416c1c69b8 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -71,6 +71,12 @@ $file = GETPOST('file', 'alpha'); $modulename = dol_sanitizeFileName(GETPOST('modulename', 'alpha')); $objectname = dol_sanitizeFileName(GETPOST('objectname', 'alpha')); $dicname = dol_sanitizeFileName(GETPOST('dicname', 'alpha')); +$editorname= GETPOST('editorname', 'alpha'); +$editorurl= GETPOST('editorurl', 'alpha'); +$version= GETPOST('version', 'alpha'); +$family= GETPOST('family', 'alpha'); +$picto= GETPOST('idpicto', 'alpha'); +$idmodule= GETPOST('idmodule', 'alpha'); // Security check if (!isModEnabled('modulebuilder')) { @@ -334,7 +340,13 @@ if ($dirins && $action == 'initmodule' && $modulename) { 'Mon module'=>$modulename, 'mon module'=>$modulename, 'htdocs/modulebuilder/template'=>strtolower($modulename), - '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email ? ' <'.$user->email.'>' : '') + '---Put here your own copyright and developer email---'=>dol_print_date($now, '%Y').' '.$user->getFullName($langs).($user->email ? ' <'.$user->email.'>' : ''), + 'Editor name'=>$editorname, + 'https://www.example.com'=>$editorurl, + '1.0'=>$version, + 'idpicto'=>(empty($picto)) ? 'generic' : $picto, + "modulefamily" =>$family, + 500000=>$idmodule ); if (!empty($conf->global->MODULEBUILDER_SPECIFIC_EDITOR_NAME)) { @@ -350,7 +362,7 @@ if ($dirins && $action == 'initmodule' && $modulename) { $arrayreplacement['1.0'] = $conf->global->MODULEBUILDER_SPECIFIC_VERSION; } if (!empty($conf->global->MODULEBUILDER_SPECIFIC_FAMILY)) { - $arrayreplacement['other'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; + $arrayreplacement['modulefamily'] = $conf->global->MODULEBUILDER_SPECIFIC_FAMILY; } $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); @@ -2075,10 +2087,32 @@ if ($module == 'initmodule') { print ''.$langs->trans("ModuleBuilderDesc2", 'conf/conf.php', $newdircustom).'
'; - print $langs->trans("EnterNameOfModuleDesc").'
'; print '
'; - print '
'; + print ''; + print ' '.$form->textwithpicto('', $langs->trans("EnterNameOfModuleDesc")).'
'; + + + + print '
'; + print '
'; + print '
'; + print '
'; + print $langs->trans("Family").'
'; + print '
'; print '
'; print ''; @@ -2280,6 +2314,13 @@ if ($module == 'initmodule') { } print ''; + print ''; + print $langs->trans("Picto"); + print ''; + print $moduleobj->picto; + print '   '.img_picto('', $moduleobj->picto, 'class="valignmiddle pictomodule paddingrightonly"'); + print ''; + print ''; print $langs->trans("Description"); print ''; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 64b4c080ec0..eedb4de0b13 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -59,9 +59,9 @@ class MyObject extends CommonObject public $isextrafieldmanaged = 1; /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + * @var string String with name of icon for myobject. Must be a 'fa-xxx' fontawesome code (or 'fa-xxx_fa_color_size') or 'myobject@mymodule' if picto is file 'img/object_myobject.png'. */ - public $picto = 'myobject@mymodule'; + public $picto = 'fa-file'; const STATUS_DRAFT = 0; @@ -240,7 +240,7 @@ class MyObject extends CommonObject $this->db = $db; - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { $this->fields['rowid']['visible'] = 0; } if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { @@ -915,7 +915,8 @@ class MyObject extends CommonObject */ public function info($id) { - $sql = "SELECT rowid, date_creation as datec, tms as datem,"; + $sql = "SELECT rowid,"; + $sql .= " date_creation as datec, tms as datem,"; $sql .= " fk_user_creat, fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; $sql .= " WHERE t.rowid = ".((int) $id); @@ -927,28 +928,15 @@ class MyObject extends CommonObject $this->id = $obj->rowid; - if (!empty($obj->fk_user_creat)) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_creat); - $this->user_creation = $cuser; - } - - if (!empty($obj->fk_user_modif)) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } - + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; if (!empty($obj->fk_user_valid)) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; + $this->user_validation_id = $obj->fk_user_valid; } - $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); if (!empty($obj->datev)) { - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); } } diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index 7702aa6699b..ec818206705 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -92,7 +92,7 @@ $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', __FILE__); // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 14fd3a52171..aaf93d1e229 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -97,7 +97,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', __FILE__); // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $mode = GETPOST('mode', 'aZ'); @@ -570,7 +570,7 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } if (!empty($arrayfields['t.'.$key]['checked'])) { @@ -632,7 +632,7 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index eb7e99501f7..09f4ad8d268 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -1229,27 +1229,11 @@ class Mo extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/multicurrency/multicurrency_rate.php b/htdocs/multicurrency/multicurrency_rate.php index 46742995bec..91dc0bce0ad 100644 --- a/htdocs/multicurrency/multicurrency_rate.php +++ b/htdocs/multicurrency/multicurrency_rate.php @@ -66,7 +66,7 @@ $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; if (!$sortfield) $sortfield = "cr.date_sync"; -if (!$sortorder) $sortorder = "ASC"; +if (!$sortorder) $sortorder = "DESC"; // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks @@ -106,13 +106,27 @@ if (!$user->admin || empty($conf->multicurrency->enabled)) { accessforbidden(); } +$error = 0; + /* * Actions */ if ($action == "create") { - if (!empty($rateinput)) { + if (empty($multicurrency_code) || $multicurrency_code == '-1') { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Currency")), null, "errors"); + $error++; + } + if ($rateinput === '0') { + setEventMessages($langs->trans('NoEmptyRate'), null, "errors"); + $error++; + } elseif (empty($rateinput)) { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Rate")), null, "errors"); + $error++; + } + + if (!$error) { $currencyRate_static = new CurrencyRate($db); $currency_static = new MultiCurrency($db); $fk_currency = $currency_static->getIdFromCode($db, $multicurrency_code); @@ -129,8 +143,6 @@ if ($action == "create") { dol_syslog("currencyRate:createRate", LOG_WARNING); setEventMessages($currencyRate_static->error, $currencyRate_static->errors, 'errors'); } - } else { - setEventMessages($langs->trans('NoEmptyRate'), null, "errors"); } } @@ -261,7 +273,7 @@ if (!in_array($action, array("updateRate", "deleteRate"))) { print ' '.$langs->trans('Currency').''; print ''.$form->selectMultiCurrency((GETPOSTISSET('multicurrency_code') ? GETPOST('multicurrency_code', 'alpha') : $multicurrency_code), 'multicurrency_code', 1, " code != '".$db->escape($conf->currency)."'", true).''; - print ' '.$langs->trans('Rate').''; + print ' '.$langs->trans('Rate').' / '.$langs->getCurrencySymbol($conf->currency).''; print ' '; print ''; @@ -280,7 +292,7 @@ if (!in_array($action, array("updateRate", "deleteRate"))) { -$sql = 'SELECT cr.rowid, cr.date_sync, cr.rate, cr.entity, m.code, m.name '; +$sql = 'SELECT cr.rowid, cr.date_sync, cr.rate, cr.entity, m.code, m.name'; // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -496,7 +508,8 @@ if ($resql) { // code if (! empty($arrayfields['m.code']['checked'])) { print ''; - print $obj->code." ".$obj->name; + print $obj->code; + print ' - '.$obj->name.''; print "\n"; if (! $i) $totalarray['nbfield']++; diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index a14a5a93ff0..85787075f28 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -205,7 +205,7 @@ class Partnership extends CommonObject $this->fields['fk_soc'] = array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'picto'=>'company', 'css'=>'maxwidth500', 'csslist'=>'tdoverflowmax150'); } - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) { + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid']) && !empty($this->fields['ref'])) { $this->fields['rowid']['visible'] = 0; } // if (empty($conf->multicompany->enabled) && isset($this->fields['entity'])) { @@ -1126,27 +1126,11 @@ class Partnership extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/partnership/class/partnership_type.class.php b/htdocs/partnership/class/partnership_type.class.php index e298b94fdd9..e0163ba4dfc 100644 --- a/htdocs/partnership/class/partnership_type.class.php +++ b/htdocs/partnership/class/partnership_type.class.php @@ -516,27 +516,11 @@ class PartnershipType extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php index 014d576f5d6..a237a359b25 100644 --- a/htdocs/partnership/partnership_list.php +++ b/htdocs/partnership/partnership_list.php @@ -43,9 +43,10 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'partnershiplist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', __FILE__); // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') +$mode = GETPOST('mode', 'aZ'); $id = GETPOST('id', 'int'); @@ -55,8 +56,9 @@ $sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + // If $page is not defined, or '' or -1 or if we click on clear filters $page = 0; -} // If $page is not defined, or '' or -1 or if we click on clear filters +} $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; @@ -88,7 +90,7 @@ if (!$sortorder) { } // Initialize array of search criterias -$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); +$search_all = GETPOST('search_all', 'alphanohtml'); $search = array(); foreach ($object->fields as $key => $val) { if (GETPOST('search_'.$key, 'alpha') !== '') { @@ -118,11 +120,11 @@ $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field if (!empty($val['visible'])) { - $visible = (int) dol_eval($val['visible'], 1, 1, '1'); + $visible = (int) dol_eval($val['visible'], 1); $arrayfields['t.'.$key] = array( 'label'=>$val['label'], 'checked'=>(($visible < 0) ? 0 : 1), - 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1, 1, '1')), + 'enabled'=>(abs($visible) != 3 && dol_eval($val['enabled'], 1)), 'position'=>$val['position'], 'help'=> isset($val['help']) ? $val['help'] : '' ); @@ -150,14 +152,13 @@ if ($user->socid > 0) { // Protection if external user //$result = restrictedArea($user, 'partnership'); //if (!$permissiontoread) accessforbidden(); +$error = 0; /* * Actions */ -$error = 0; - if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; @@ -187,7 +188,6 @@ if (empty($reshook)) { } $toselect = array(); $search_array_options = array(); - $search_filter = ""; } if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) { @@ -285,7 +285,7 @@ $now = dol_now(); //$help_url="EN:Module_Partnership|FR:Module_Partnership_FR|ES:Módulo_Partnership"; $help_url = ''; -$title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("Partnerships")); +$title = $langs->trans("Partnerships"); $morejs = array(); $morecss = array(); @@ -341,17 +341,17 @@ foreach ($search as $key => $val) { $mode_search = 2; } if ($search[$key] != '') { - $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); + $sql .= natural_search("t.".$db->escape($key), $search[$key], (($key == 'status') ? 2 : $mode_search)); } } else { if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { if (preg_match('/_dtstart$/', $key)) { - $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; + $sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'"; } if (preg_match('/_dtend$/', $key)) { - $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; + $sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'"; } } } @@ -382,11 +382,13 @@ $sql .= $hookmanager->resPrint; /* If a group by is required $sql.= " GROUP BY "; foreach($object->fields as $key => $val) { - $sql .= "t.".$key.", "; + $sql .= "t.".$db->escape($key).", "; } // Add fields from extrafields if (! empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { + $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + } } // Add where from hooks $parameters=array(); @@ -395,35 +397,41 @@ $sql.=$hookmanager->resPrint; $sql=preg_replace('/,\s*$/','', $sql); */ -$sql .= $db->order($sortfield, $sortorder); - // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); + /* The fast and low memory method to get and count full list converts the sql into a sql count */ + $sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql); + $resql = $db->query($sqlforcount); + if ($resql) { + $objforcount = $db->fetch_object($resql); + $nbtotalofrecords = $objforcount->nbtotalofrecords; + } else { + dol_print_error($db); + } + if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0 $page = 0; $offset = 0; } + $db->free($resql); } -// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. -if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { - $num = $nbtotalofrecords; -} else { - if ($limit) { - $sql .= $db->plimit($limit + 1, $offset); - } - $resql = $db->query($sql); - if (!$resql) { - dol_print_error($db); - exit; - } - - $num = $db->num_rows($resql); +// Complete request and execute it with limit +$sql .= $db->order($sortfield, $sortorder); +if ($limit) { + $sql .= $db->plimit($limit + 1, $offset); } +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); + exit; +} + +$num = $db->num_rows($resql); + + // Direct jump if only one record found if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { $obj = $db->fetch_object($resql); @@ -451,9 +459,11 @@ if ($limit > 0 && $limit != $conf->liste_limit) { foreach ($search as $key => $val) { if (is_array($search[$key]) && count($search[$key])) { foreach ($search[$key] as $skey) { - $param .= '&search_'.$key.'[]='.urlencode($skey); + if ($skey != '') { + $param .= '&search_'.$key.'[]='.urlencode($skey); + } } - } else { + } elseif ($search[$key] != '') { $param .= '&search_'.$key.'='.urlencode($search[$key]); } } @@ -496,9 +506,12 @@ print ''; print ''; print ''; +print ''; print ''; +print ''; -$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/partnership/partnership_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); +$newcardbutton = ''; +$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/partnership/partnership_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -510,10 +523,13 @@ $trackid = 'pship'.$object->id; include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; if ($search_all) { + $setupstring = ''; foreach ($fieldstosearchall as $key => $val) { $fieldstosearchall[$key] = $langs->trans($val); + $setupstring .= $key."=".$val.";"; } - print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; + print ''."\n"; + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'."\n"; } $moreforfilter = ''; @@ -536,7 +552,7 @@ if (!empty($moreforfilter)) { } $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table @@ -551,25 +567,31 @@ if ($managedfor == 'member') { // Fields title search // -------------------------------------------------------------------- print ''; +// Action column +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + $searchpicto = $form->showFilterButtons('left'); + print $searchpicto; + print ''; +} foreach ($object->fields as $key => $val) { - $cssforfield = (empty($val['css']) ? '' : $val['css']); + $searchkey = empty($search[$key]) ? '' : $search[$key]; + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) { - print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); + print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1); } elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) { - print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth125', 1); - } elseif (!preg_match('/^(date|timestamp|datetime)/', $val['type'])) { - print ''; + print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1); } elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) { print '
'; print $form->selectDate($search[$key.'_dtstart'] ? $search[$key.'_dtstart'] : '', "search_".$key."_dtstart", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); @@ -577,6 +599,12 @@ foreach ($object->fields as $key => $val) { print '
'; print $form->selectDate($search[$key.'_dtend'] ? $search[$key.'_dtend'] : '', "search_".$key."_dtend", 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
'; + } elseif ($key == 'lang') { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + $formadmin = new FormAdmin($db); + print $formadmin->select_language($search[$key], 'search_lang', 0, null, 1, 0, 0, 'minwidth150 maxwidth200', 2); + } else { + print ''; } print ''; } @@ -596,16 +624,23 @@ $parameters = array('arrayfields'=>$arrayfields); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print ''; -$searchpicto = $form->showFilterButtons(); -print $searchpicto; -print ''; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; +} print ''."\n"; +$totalarray = array(); +$totalarray['nbfield'] = 0; // Fields title label // -------------------------------------------------------------------- print ''; +if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} foreach ($object->fields as $key => $val) { $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); if ($key == 'status') { @@ -614,11 +649,13 @@ foreach ($object->fields as $key => $val) { $cssforfield .= ($cssforfield ? ' ' : '').'center'; } elseif (in_array($val['type'], array('timestamp'))) { $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') { + } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { $cssforfield .= ($cssforfield ? ' ' : '').'right'; } + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label if (!empty($arrayfields['t.'.$key]['checked'])) { print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; + $totalarray['nbfield']++; } } // End of subscription date @@ -630,11 +667,14 @@ if ($managedfor == 'member') { // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields -$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; // Action column -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +} +$totalarray['nbfield']++; print ''."\n"; @@ -652,8 +692,11 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar // Loop on record // -------------------------------------------------------------------- $i = 0; +$savnbfield = $totalarray['nbfield']; $totalarray = array(); -while ($i < ($limit ? min($num, $limit) : $num)) { +$totalarray['nbfield'] = 0; +$imaxinloop = ($limit ? min($num, $limit) : $num); +while ($i < $imaxinloop) { $obj = $db->fetch_object($resql); if (empty($obj)) { break; // Should not happen @@ -662,98 +705,132 @@ while ($i < ($limit ? min($num, $limit) : $num)) { // Store properties in $object $object->setVarsFromFetchObj($obj); - // Show here line of result - print ''; - foreach ($object->fields as $key => $val) { - $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; - } elseif ($key == 'status') { - $cssforfield .= ($cssforfield ? ' ' : '').'center'; + if ($mode == 'kanban') { + if ($i == 0) { + print ''; + print '
'; } - - if (in_array($val['type'], array('timestamp'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - } elseif ($key == 'ref') { - $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + // Output Kanban + print $object->getKanbanView(''); + if ($i == ($imaxinloop - 1)) { + print '
'; + print ''; } - - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status'))) { - $cssforfield .= ($cssforfield ? ' ' : '').'right'; - } - //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; - - if (!empty($arrayfields['t.'.$key]['checked'])) { - print ''; - if ($key == 'status') { - print $object->getLibStatut(5); - } else { - print $object->showOutputField($val, $key, $object->$key, ''); + } else { + // Show here line of result + $j = 0; + print ''; + // Action column + if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; } print ''; - if (!$i) { - $totalarray['nbfield']++; + } + foreach ($object->fields as $key => $val) { + $cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']); + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; + } elseif ($key == 'status') { + $cssforfield .= ($cssforfield ? ' ' : '').'center'; } - if (!empty($val['isameasure']) && $val['isameasure'] == 1) { + + if (in_array($val['type'], array('timestamp'))) { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } elseif ($key == 'ref') { + $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + } + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status')) && empty($val['arrayofkeyval'])) { + $cssforfield .= ($cssforfield ? ' ' : '').'right'; + } + //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + + if (!empty($arrayfields['t.'.$key]['checked'])) { + print ''; + if ($key == 'status') { + print $object->getLibStatut(5); + } elseif ($key == 'rowid') { + print $object->showOutputField($val, $key, $object->id, ''); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } + print ''; if (!$i) { - $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + $totalarray['nbfield']++; } - if (!isset($totalarray['val'])) { - $totalarray['val'] = array(); + if (!empty($val['isameasure']) && $val['isameasure'] == 1) { + if (!$i) { + $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + } + if (!isset($totalarray['val'])) { + $totalarray['val'] = array(); + } + if (!isset($totalarray['val']['t.'.$key])) { + $totalarray['val']['t.'.$key] = 0; + } + $totalarray['val']['t.'.$key] += $object->$key; } - if (!isset($totalarray['val']['t.'.$key])) { - $totalarray['val']['t.'.$key] = 0; - } - $totalarray['val']['t.'.$key] += $object->$key; } } - } - // End of subscription date - if ($managedfor == 'member') { - print ''; - $result = $adherent->fetch($object->fk_member); - if ($result) { - $datefin = $adherent->datefin; - if ($datefin) { - print dol_print_date($datefin, 'day'); - if ($adherent->hasDelay()) { - $textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')'; - print " ".img_warning($langs->trans("SubscriptionLate").$textlate); - } - } else { - if ($adherent->subscription == 'yes') { - print $langs->trans("SubscriptionNotReceived"); - if ($adherent->statut > 0) { - print " ".img_warning(); + // End of subscription date + if ($managedfor == 'member') { + print ''; + $result = $adherent->fetch($object->fk_member); + if ($result) { + $datefin = $adherent->datefin; + if ($datefin) { + print dol_print_date($datefin, 'day'); + if ($adherent->hasDelay()) { + $textlate .= ' ('.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24) >= 0 ? '+' : '').ceil($conf->adherent->subscription->warning_delay / 60 / 60 / 24).' '.$langs->trans("days").')'; + print " ".img_warning($langs->trans("SubscriptionLate").$textlate); } } else { - print ' '; + if ($adherent->subscription == 'yes') { + print $langs->trans("SubscriptionNotReceived"); + if ($adherent->statut > 0) { + print " ".img_warning(); + } + } else { + print ' '; + } } } + print ''; } - print ''; - } - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - // Action column - print ''; - if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - $selected = 0; - if (in_array($object->id, $arrayofselected)) { - $selected = 1; + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column + if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) { + print ''; + if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + $selected = 0; + if (in_array($object->id, $arrayofselected)) { + $selected = 1; + } + print ''; + } + print ''; + } + if (!$i) { + $totalarray['nbfield']++; } - print ''; - } - print ''; - if (!$i) { - $totalarray['nbfield']++; - } - print ''."\n"; + print ''."\n"; + } $i++; } @@ -771,14 +848,14 @@ if ($num == 0) { } } if ($managedfor != 'member') $colspan++; // End of subscription date - print ''.$langs->trans("NoRecordFound").''; + print ''.$langs->trans("NoRecordFound").''; } $db->free($resql); $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); -$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; print ''."\n"; diff --git a/htdocs/product/stock/class/entrepot.class.php b/htdocs/product/stock/class/entrepot.class.php index fb8c8d55768..b47430bffc2 100644 --- a/htdocs/product/stock/class/entrepot.class.php +++ b/htdocs/product/stock/class/entrepot.class.php @@ -517,20 +517,9 @@ class Entrepot extends CommonObject $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - + $this->user_creation_id = $obj->fk_user_author; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php index fe0308974cf..80e3f73b646 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php @@ -860,27 +860,11 @@ class StockTransfer extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php index 31549e04832..427d577b436 100644 --- a/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php +++ b/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php @@ -879,27 +879,11 @@ class StockTransferLine extends CommonObjectLine if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/projet/list.php b/htdocs/projet/list.php index eaf9c5022a3..2c111a30c2c 100644 --- a/htdocs/projet/list.php +++ b/htdocs/projet/list.php @@ -108,6 +108,7 @@ $search_accept_conference_suggestions = GETPOST('search_accept_conference_sugges $search_accept_booth_suggestions = GETPOST('search_accept_booth_suggestions', 'int'); $search_price_registration = GETPOST("search_price_registration", 'alpha'); $search_price_booth = GETPOST("search_price_booth", 'alpha'); +$search_login = GETPOST('search_login', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha'); $mine = ((GETPOST('mode') == 'mine') ? 1 : 0); @@ -201,6 +202,7 @@ $arrayfields['s.nom'] = array('label'=>$langs->trans("ThirdParty"), 'checked'=>1 $arrayfields['commercial'] = array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>0, 'position'=>23); $arrayfields['c.assigned'] = array('label'=>$langs->trans("AssignedTo"), 'checked'=>-1, 'position'=>120); $arrayfields['opp_weighted_amount'] = array('label'=>$langs->trans('OpportunityWeightedAmountShort'), 'checked'=>0, 'position'=> 116, 'enabled'=>(empty($conf->global->PROJECT_USE_OPPORTUNITIES) ? 0 : 1), 'position'=>106); +$arrayfields['u.login'] = array('label'=>"Author", 'checked'=>1, 'position'=>165); // Force some fields according to search_usage filter... if (GETPOST('search_usage_opportunity')) { //$arrayfields['p.usage_opportunity']['visible'] = 1; // Not require, filter on search_opp_status is enough @@ -285,6 +287,7 @@ if (empty($reshook)) { $search_accept_booth_suggestions = ''; $search_price_registration = ''; $search_price_booth = ''; + $search_login = ''; $toselect = array(); $search_array_options = array(); $search_category_array = array(); @@ -390,10 +393,11 @@ $sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as statu $sql .= " p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount,"; $sql .= " p.usage_opportunity, p.usage_task, p.usage_bill_time, p.usage_organize_event,"; $sql .= " p.email_msgid,"; -$sql .= " accept_conference_suggestions, accept_booth_suggestions, price_registration, price_booth,"; +$sql .= " p.accept_conference_suggestions, p.accept_booth_suggestions, p.price_registration, p.price_booth,"; $sql .= " s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.code_client,"; $sql .= " country.code as country_code,"; -$sql .= " cls.code as opp_status_code"; +$sql .= " cls.code as opp_status_code,"; +$sql .= ' u.login, u.lastname, u.firstname, u.email as user_email, u.statut as user_statut, u.entity, u.photo, u.office_phone, u.office_fax, u.user_mobile, u.job, u.gender'; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { @@ -415,6 +419,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label']) &&is_array $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on p.fk_soc = s.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON p.fk_user_creat = u.rowid'; // We'll need this table joined to the select in order to filter by sale // No check is done on company permission because readability is managed by public status of project and assignement. //if ($search_sale > 0 || (! $user->rights->societe->client->voir && ! $socid)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON sc.fk_soc = s.rowid"; @@ -544,6 +549,9 @@ if ($search_price_registration != '') { if ($search_price_booth != '') { $sql .= natural_search('p.price_booth', $search_price_booth, 1); } +if ($search_login) { + $sql .= natural_search(array('u.login', 'u.firstname', 'u.lastname'), $search_login); +} // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks @@ -735,6 +743,9 @@ if ($search_price_registration != '') { if ($search_price_booth != '') { $param .= '&search_price_booth='.urlencode($search_price_booth); } +if ($search_login) { + $param .= '&search_login='.urlencode($search_login); +} if ($optioncss != '') { $param .= '&optioncss='.urlencode($optioncss); } @@ -999,6 +1010,12 @@ if (!empty($arrayfields['p.price_booth']['checked'])) { print ''; print ''; } +if (!empty($arrayfields['u.login']['checked'])) { + // Author + print ''; + print ''; + print ''; +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -1104,6 +1121,9 @@ if (!empty($arrayfields['p.price_registration']['checked'])) { if (!empty($arrayfields['p.price_booth']['checked'])) { print_liste_field_titre($arrayfields['p.price_booth']['label'], $_SERVER["PHP_SELF"], 'p.price_booth', "", $param, '', $sortfield, $sortorder, 'right '); } +if (!empty($arrayfields['u.login']['checked'])) { + print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], 'u.login', '', $param, 'align="center"', $sortfield, $sortorder); +} // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields @@ -1125,6 +1145,8 @@ if (!empty($arrayfields['p.fk_statut']['checked'])) { print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; +$userstatic = new User($db); + $i = 0; $totalarray = array( 'nbfield' => 0, @@ -1473,6 +1495,33 @@ while ($i < min($num, $limit)) { $totalarray['pos'][$totalarray['nbfield']] = 'p.price_booth'; } } + // Author + $userstatic->id = $obj->fk_user_creat; + $userstatic->login = $obj->login; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->email = $obj->user_email; + $userstatic->statut = $obj->user_statut; + $userstatic->entity = $obj->entity; + $userstatic->photo = $obj->photo; + $userstatic->office_phone = $obj->office_phone; + $userstatic->office_fax = $obj->office_fax; + $userstatic->user_mobile = $obj->user_mobile; + $userstatic->job = $obj->job; + $userstatic->gender = $obj->gender; + + if (!empty($arrayfields['u.login']['checked'])) { + print ''; + if ($userstatic->id) { + print $userstatic->getNomUrl(-1); + } else { + print ' '; + } + print "\n"; + if (!$i) { + $totalarray['nbfield']++; + } + } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook diff --git a/htdocs/projet/tasks/time.php b/htdocs/projet/tasks/time.php index ab93e3561b0..801e0cb0a00 100644 --- a/htdocs/projet/tasks/time.php +++ b/htdocs/projet/tasks/time.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; // Load translation files required by the page -$langsLoad=array('projects', 'bills', 'orders'); +$langsLoad=array('projects', 'bills', 'orders', 'companies'); if (!empty($conf->eventorganization->enabled)) { $langsLoad[]='eventorganization'; } @@ -73,6 +73,7 @@ $search_task_ref = GETPOST('search_task_ref', 'alpha'); $search_task_label = GETPOST('search_task_label', 'alpha'); $search_user = GETPOST('search_user', 'int'); $search_valuebilled = GETPOST('search_valuebilled', 'int'); +$search_company = GETPOST('$search_company', 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); @@ -161,6 +162,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_date_creation = ''; $search_date_update = ''; $search_task_ref = ''; + $search_company = ''; $search_task_label = ''; $search_user = 0; $search_valuebilled = ''; @@ -1071,6 +1073,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser // Definition of fields for list $arrayfields = array(); $arrayfields['t.task_date'] = array('label'=>$langs->trans("Date"), 'checked'=>1); + $arrayfields['p.fk_soc'] = array('label'=>$langs->trans("ThirdParty"), 'type'=>'integer:Societe:/societe/class/societe.class.php:1','checked'=>1); if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task $arrayfields['t.task_ref'] = array('label'=>$langs->trans("RefTask"), 'checked'=>1); $arrayfields['t.task_label'] = array('label'=>$langs->trans("LabelTask"), 'checked'=>1); @@ -1104,6 +1107,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref != '') { $param .= '&search_task_ref='.urlencode($search_task_ref); } + if ($search_company != '') { + $param .= '&$search_company='.urlencode($search_company); + } if ($search_task_label != '') { $param .= '&search_task_label='.urlencode($search_task_label); } @@ -1304,6 +1310,7 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $sql .= " pt.ref, pt.label, pt.fk_projet,"; $sql .= " u.lastname, u.firstname, u.login, u.photo, u.statut as user_status,"; $sql .= " il.fk_facture as invoice_id, inv.fk_statut,"; + $sql .= " p.fk_soc,"; // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook @@ -1312,13 +1319,16 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facturedet as il ON il.rowid = t.invoice_line_id"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as inv ON inv.rowid = il.fk_facture"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."projet_task as pt ON pt.rowid = t.fk_task"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."user as u ON t.fk_user = u.rowid"; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = pt.fk_projet"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; + // Add table from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - $sql .= ", ".MAIN_DB_PREFIX."projet_task as pt, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid"; - + $sql .= " WHERE 1 = 1 "; if (empty($projectidforalltimes) && empty($allprojectforuser)) { // Limit on one task $sql .= " AND t.fk_task =".((int) $object->id); @@ -1339,6 +1349,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if ($search_task_ref) { $sql .= natural_search('pt.ref', $search_task_ref); } + if ($search_company) { + $sql .= natural_search('s.nom', $search_company); + } if ($search_task_label) { $sql .= natural_search('pt.label', $search_task_label); } @@ -1572,6 +1585,11 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser print $formother->selectyear($search_year, 'search_year', 1, 20, 5); print ''; } + // Thirdparty + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print ''; + } + if (!empty($allprojectforuser)) { print ''; } @@ -1624,6 +1642,9 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser if (!empty($arrayfields['t.task_date']['checked'])) { print_liste_field_titre($arrayfields['t.task_date']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); } + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER['PHP_SELF'], 't.task_date,t.task_datehour,t.rowid', '', $param, '', $sortfield, $sortorder); + } if (!empty($allprojectforuser)) { print_liste_field_titre("Project", $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); } @@ -1697,6 +1718,23 @@ if (($id > 0 || !empty($ref)) || $projectidforalltimes > 0 || $allprojectforuser } } + // Thirdparty + if (!empty($arrayfields['p.fk_soc']['checked'])) { + print ''; + if (empty($conf->cache['thridparty'][$task_time->fk_soc])) { + $tmpsociete = new Societe($db); + $tmpsociete->fetch($task_time->fk_soc); + $conf->cache['thridparty'][$task_time->fk_soc] = $tmpsociete; + } else { + $tmpsociete = $conf->cache['thridparty'][$task_time->fk_soc]; + } + print $tmpsociete->getNomUrl(1); + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + // Project ref if (!empty($allprojectforuser)) { print ''; diff --git a/htdocs/recruitment/class/recruitmentcandidature.class.php b/htdocs/recruitment/class/recruitmentcandidature.class.php index db8a8d08186..021ed614a5f 100644 --- a/htdocs/recruitment/class/recruitmentcandidature.class.php +++ b/htdocs/recruitment/class/recruitmentcandidature.class.php @@ -849,27 +849,11 @@ class RecruitmentCandidature extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 89351997596..cc56b1c9cd7 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -941,27 +941,11 @@ class RecruitmentJobPosition extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/salaries/class/salary.class.php b/htdocs/salaries/class/salary.class.php index 668bd1de299..968320ce394 100644 --- a/htdocs/salaries/class/salary.class.php +++ b/htdocs/salaries/class/salary.class.php @@ -597,7 +597,7 @@ class Salary extends CommonObject */ public function info($id) { - $sql = 'SELECT ps.rowid, ps.datec, ps.tms, ps.fk_user_author, ps.fk_user_modif'; + $sql = 'SELECT ps.rowid, ps.datec, ps.tms as datem, ps.fk_user_author, ps.fk_user_modif'; $sql .= ' FROM '.MAIN_DB_PREFIX.'salary as ps'; $sql .= ' WHERE ps.rowid = '.((int) $id); @@ -608,19 +608,11 @@ class Salary extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } + $this->user_creation_id = $obj->fk_user_author; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->tms); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); } else { diff --git a/htdocs/societe/ajax/company.php b/htdocs/societe/ajax/company.php index 5c02afe85dc..f845c161ab2 100644 --- a/htdocs/societe/ajax/company.php +++ b/htdocs/societe/ajax/company.php @@ -50,7 +50,8 @@ $outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0); $action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $excludeids = GETPOST('excludeids', 'intcomma'); -$showtype = GETPOST('showtype', 'int'); +$showtype = GETPOSTINT('showtype'); +$showcode = GETPOSTINT('showcode'); $object = new Societe($db); if ($id > 0) { @@ -123,7 +124,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) { $excludeids = array(); } - $arrayresult = $form->select_thirdparty_list(0, $htmlname, $filter, 1, $showtype, 0, null, $searchkey, $outjson, 0, 'minwidth100', '', false, $excludeids); + $arrayresult = $form->select_thirdparty_list(0, $htmlname, $filter, 1, $showtype, 0, null, $searchkey, $outjson, 0, 'minwidth100', '', false, $excludeids, $showcode); $db->close(); diff --git a/htdocs/societe/class/companypaymentmode.class.php b/htdocs/societe/class/companypaymentmode.class.php index ba924279ce2..2cce0ccac86 100644 --- a/htdocs/societe/class/companypaymentmode.class.php +++ b/htdocs/societe/class/companypaymentmode.class.php @@ -554,27 +554,11 @@ class CompanyPaymentMode extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 83fe2b22282..d13893ca7dd 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2784,29 +2784,30 @@ class Societe extends CommonObject /** * Return link(s) on type of thirdparty (with picto) * - * @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only) - * @param string $option ''=All - * @param int $notooltip 1=Disable tooltip - * @return string String with URL + * @param int $withpicto Add picto into link (0=No picto, 1=Include picto with link, 2=Picto only) + * @param string $option ''=All + * @param int $notooltip 1=Disable tooltip + * @param string $tag Tag 'a' or 'span' + * @return string String with URL */ - public function getTypeUrl($withpicto = 0, $option = '', $notooltip = 0) + public function getTypeUrl($withpicto = 0, $option = '', $notooltip = 0, $tag = 'a') { global $conf, $langs; $s = ''; if (empty($option) || preg_match('/prospect/', $option)) { if (($this->client == 2 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) { - $s .= ''.dol_substr($langs->trans("Prospect"), 0, 1).''; + $s .= '<'.$tag.' class="customer-back opacitymedium" title="'.$langs->trans("Prospect").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Prospect"), 0, 1).''; } } if (empty($option) || preg_match('/customer/', $option)) { if (($this->client == 1 || $this->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { - $s .= ''.dol_substr($langs->trans("Customer"), 0, 1).''; + $s .= '<'.$tag.' class="customer-back" title="'.$langs->trans("Customer").'" href="'.DOL_URL_ROOT.'/comm/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Customer"), 0, 1).''; } } if (empty($option) || preg_match('/supplier/', $option)) { if (((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) && $this->fournisseur) { - $s .= ''.dol_substr($langs->trans("Supplier"), 0, 1).''; + $s .= '<'.$tag.' class="vendor-back" title="'.$langs->trans("Supplier").'" href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$this->id.'">'.dol_substr($langs->trans("Supplier"), 0, 1).''; } } return $s; @@ -3876,7 +3877,7 @@ class Societe extends CommonObject */ public function info($id) { - $sql = "SELECT s.rowid, s.nom as name, s.datec as date_creation, tms as date_modification,"; + $sql = "SELECT s.rowid, s.nom as name, s.datec, tms as datem,"; $sql .= " fk_user_creat, fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " WHERE s.rowid = ".((int) $id); @@ -3888,21 +3889,12 @@ class Societe extends CommonObject $this->id = $obj->rowid; - if ($obj->fk_user_creat) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_creat); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_modif) { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); $this->ref = $obj->name; - $this->date_creation = $this->db->jdate($obj->date_creation); - $this->date_modification = $this->db->jdate($obj->date_modification); } $this->db->free($result); diff --git a/htdocs/societe/class/societeaccount.class.php b/htdocs/societe/class/societeaccount.class.php index f73c460b4a4..79f5aedbe68 100644 --- a/htdocs/societe/class/societeaccount.class.php +++ b/htdocs/societe/class/societeaccount.class.php @@ -520,27 +520,12 @@ class SocieteAccount extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index a92ca5ed11c..255152744f7 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1347,10 +1347,10 @@ if (!empty($arrayfields['s.idprof4']['checked'])) { print_liste_field_titre($form->textwithpicto($langs->trans("ProfId4Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof4", "", $param, '', $sortfield, $sortorder, 'nowrap '); } if (!empty($arrayfields['s.idprof5']['checked'])) { - print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap '); + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId5Short"), $textprofid[5], 1, 0), $_SERVER["PHP_SELF"], "s.idprof5", "", $param, '', $sortfield, $sortorder, 'nowrap '); } if (!empty($arrayfields['s.idprof6']['checked'])) { - print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[4], 1, 0), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap '); + print_liste_field_titre($form->textwithpicto($langs->trans("ProfId6Short"), $textprofid[6], 1, 0), $_SERVER["PHP_SELF"], "s.idprof6", "", $param, '', $sortfield, $sortorder, 'nowrap '); } if (!empty($arrayfields['s.tva_intra']['checked'])) { print_liste_field_titre($arrayfields['s.tva_intra']['label'], $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder, 'nowrap '); @@ -1583,7 +1583,7 @@ while ($i < min($num, $limit)) { } } if (!empty($arrayfields['s.email']['checked'])) { - print ''.dol_print_email($obj->email, $obj->rowid, $obj->socid, 'AC_EMAIL', 0, 0, 1)."\n"; + print ''.dol_print_email($obj->email, $obj->rowid, $obj->rowid, 'AC_EMAIL', 0, 0, 1)."\n"; if (!$i) { $totalarray['nbfield']++; } diff --git a/htdocs/societe/paymentmodes.php b/htdocs/societe/paymentmodes.php index d623e5699de..005c55c260a 100644 --- a/htdocs/societe/paymentmodes.php +++ b/htdocs/societe/paymentmodes.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2018 Laurent Destailleur + * Copyright (C) 2004-2022 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * Copyright (C) 2013 Peter Fontaine * Copyright (C) 2015-2016 Marcos García @@ -999,8 +999,8 @@ if ($socid && $action != 'edit' && $action != 'create' && $action != 'editcard' print ''; print $companypaymentmodetemp->id; print ''; - print ''; - print $companypaymentmodetemp->label; + print ''; + print dol_escape_htmltag($companypaymentmodetemp->label); print ''; print ''; print $companypaymentmodetemp->stripe_card_ref; @@ -1624,7 +1624,7 @@ if ($socid && $action == 'edit' && $permissiontoaddupdatepaymentinformation) { print ''; print '
'; - if ($conf->prelevement->enabled) { + if (isModEnabled('prelevement')) { print '
'; print '
'; @@ -1785,7 +1785,7 @@ if ($socid && $action == 'create' && $permissiontoaddupdatepaymentinformation) { print ''; - if ($conf->prelevement->enabled) { + if (isModEnabled('prelevement')) { print '
'; print ''; diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 8f0c1d36919..794a4542f10 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -1149,8 +1149,10 @@ class SupplierProposal extends CommonObject } // Clear fields - $this->user_author = $user->id; - $this->user_valid = ''; + $this->user_author = $user->id; // deprecated + $this->user_author_id = $user->id; + $this->user_valid = 0; // deprecated + $this->user_valid_id = 0; $this->date = $now; // Set ref diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 2f82eefffeb..70b5285fb2c 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -2739,6 +2739,7 @@ li.tmenu:hover .tmenuimage:not(.menuhider), li.tmenu:hover .tmenuimage:not(.menu print "div.mainmenu.".$val." {\n"; print " background-image: url(".$url.");\n"; print " background-position-y: 3px;\n"; + print " filter: saturate(0);\n"; print "}\n"; } } @@ -3091,7 +3092,10 @@ a.vsmenu:link, a.vsmenu:visited, a.vsmenu:hover, a.vsmenu:active, span.vsmenu { margin: 1px 1px 1px 6px; } span.vsmenudisabled, font.vsmenudisabled { - font-family: ; text-align: ; color: #aaa; + font-family: ; + text-align: ; + color: #aaa; + white-space: nowrap; } a.vsmenu:link, a.vsmenu:visited { color: var(--colortextbackvmenu); @@ -7255,6 +7259,8 @@ span.clipboardCPValue.hidewithsize { display: inline-block; color: transparent; white-space: nowrap; + overflow-x: hidden; + vertical-align: middle; } div.clipboardCPValue.hidewithsize { width: 0 !important; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index bcd2598740a..90607fd31be 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -2702,7 +2702,7 @@ div.mainmenu.menu { print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n"; print 'div.mainmenu.'.$val.'::before { content: "\f249"; - }'; + }'."\n"; } else { print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one. */\n"; print "/* Overwrite this definition in your own css with a different content to use your own font awesome icon. */\n"; @@ -2715,6 +2715,7 @@ div.mainmenu.menu { } else { print "div.mainmenu.".$val." {\n"; print " background-image: url(".$url.");\n"; + print " filter: saturate(0);\n"; print "}\n"; } } @@ -3055,6 +3056,7 @@ span.vsmenudisabled, font.vsmenudisabled { text-align: ; font-weight: normal; color: #aaa; + white-space: nowrap; } a.vsmenu:link, a.vsmenu:visited { color: var(--colortextbackvmenu); @@ -7024,6 +7026,8 @@ span.clipboardCPValue.hidewithsize { display: inline-block; color: transparent; white-space: nowrap; + overflow-x: hidden; + vertical-align: middle; } div.clipboardCPValue.hidewithsize { width: 0 !important; @@ -7291,20 +7295,20 @@ div.clipboardCPValue.hidewithsize { .a-mesure, .a-mesure-disabled { text-align: center; } - - + + .underbanner.underbanner-before-box { border-bottom: none; } - + div.divButAction { margin-bottom: 0.5em; } - + div#card-errors { max-width: unset; } - + #dolpaymenttable { padding: 5px; } diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index 558faf1775a..aa971d9a5d5 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -626,27 +626,12 @@ class CTicketCategory extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index b47781a9db4..ee6d0e7bd14 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -3796,7 +3796,7 @@ class User extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key." = ".((int) $value); - } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { + } elseif (isset($this->fields[$key]['type']) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { $sqlwhere[] = $key." = '".$this->db->idate($value)."'"; } elseif ($key == 'customsql') { $sqlwhere[] = $value; diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index d768f7c5c36..17df9e672dc 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -869,27 +869,12 @@ class Target extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if (!empty($obj->fk_user_author)) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if (!empty($obj->fk_user_valid)) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if (!empty($obj->fk_user_cloture)) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index 2f084916a75..1213929fed9 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -881,27 +881,11 @@ class Workstation extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/htdocs/zapier/class/hook.class.php b/htdocs/zapier/class/hook.class.php index d2e656d15f1..64259f5a592 100644 --- a/htdocs/zapier/class/hook.class.php +++ b/htdocs/zapier/class/hook.class.php @@ -635,27 +635,12 @@ class Hook extends CommonObject if ($this->db->num_rows($result)) { $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - if ($obj->fk_user_author) { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - if ($obj->fk_user_cloture) { - $cluser = new User($this->db); - $cluser->fetch($obj->fk_user_cloture); - $this->user_cloture = $cluser; - } - - $this->date_creation = $this->db->jdate($obj->datec); - $this->date_modification = $this->db->jdate($obj->datem); - $this->date_validation = $this->db->jdate($obj->datev); + $this->user_creation_id = $obj->fk_user_creat; + $this->user_modification_id = $obj->fk_user_modif; + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); } $this->db->free($result); diff --git a/test/phpunit/BankAccountTest.php b/test/phpunit/BankAccountTest.php index 3e229d3b41c..4ce31e8bd60 100644 --- a/test/phpunit/BankAccountTest.php +++ b/test/phpunit/BankAccountTest.php @@ -28,6 +28,7 @@ global $conf,$user,$langs,$db; //require_once 'PHPUnit/Autoload.php'; require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; require_once dirname(__FILE__).'/../../htdocs/compta/bank/class/account.class.php'; +require_once dirname(__FILE__).'/../../htdocs/core/lib/bank.lib.php'; if (empty($user->id)) { print "Load permissions for admin user nb 1\n"; @@ -205,6 +206,19 @@ class BankAccountTest extends PHPUnit\Framework\TestCase //print __METHOD__." localobject->date_creation=".$localobject->date_creation."\n"; $this->assertEquals(1, $result); + // Test checkIbanForAccount for FR account + $result = checkIbanForAccount($localobject); + print __METHOD__." checkIbanForAccount(".$localobject->iban.") = ".$result."\n"; + $this->assertTrue($result); + + // Test checkIbanForAccount for CI account + $localobject2=new Account($this->savdb); + $localobject2->country = 'CI'; + $localobject2->iban = 'CI77A12312341234123412341234'; + $result = checkIbanForAccount($localobject2); + print __METHOD__." checkIbanForAccount(".$localobject2->iban.") = ".$result."\n"; + $this->assertTrue($result); + return $localobject->id; } diff --git a/test/phpunit/DateLibTest.php b/test/phpunit/DateLibTest.php index c40d9dabbfa..983ad2af489 100644 --- a/test/phpunit/DateLibTest.php +++ b/test/phpunit/DateLibTest.php @@ -367,6 +367,11 @@ class DateLibTest extends PHPUnit\Framework\TestCase print __METHOD__." result=".$result."\n"; $this->assertEquals('1970-01-01 00:00:00', $result); + // Same with T and Z + $result=dol_print_date(0, '%Y-%m-%dT%H:%M:%SZ', true); + print __METHOD__." result=".$result."\n"; + $this->assertEquals('1970-01-01T00:00:00Z', $result); + // Check %Y-%m-%d %H:%M:%S format $result=dol_print_date(16725225600, '%Y-%m-%d %H:%M:%S', true); // http://www.epochconverter.com/ print __METHOD__." result=".$result."\n"; diff --git a/test/phpunit/SecurityTest.php b/test/phpunit/SecurityTest.php index cf7536799a1..4f7a78790f1 100644 --- a/test/phpunit/SecurityTest.php +++ b/test/phpunit/SecurityTest.php @@ -217,9 +217,17 @@ class SecurityTest extends PHPUnit\Framework\TestCase $result=testSqlAndScriptInject($test, 1); $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL1b. Should find an attack on GET param and did not.'); + $test = '... update ... set ... ='; + $result=testSqlAndScriptInject($test, 1); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2a. Should find an attack on GET param and did not.'); + + $test = 'action=update& ... set ... ='; + $result=testSqlAndScriptInject($test, 1); + $this->assertEquals(0, $result, 'Error on testSqlAndScriptInject for SQL2b. Should not find an attack on GET param and did.'); + $test = '... union ... selection '; $result=testSqlAndScriptInject($test, 1); - $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2. Should find an attack on GET param and did not.'); + $this->assertEquals($expectedresult, $result, 'Error on testSqlAndScriptInject for SQL2c. Should find an attack on GET param and did not.'); $test = 'javascript:'; $result=testSqlAndScriptInject($test, 0);